agenticdome-python-sdk 1.0.4__tar.gz → 1.0.5__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/PKG-INFO +266 -83
  2. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/README.md +265 -82
  3. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_python_sdk.egg-info/PKG-INFO +266 -83
  4. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/pyproject.toml +1 -1
  5. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/setup.py +1 -1
  6. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/MANIFEST.in +0 -0
  7. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_python_sdk.egg-info/SOURCES.txt +0 -0
  8. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_python_sdk.egg-info/dependency_links.txt +0 -0
  9. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_python_sdk.egg-info/requires.txt +0 -0
  10. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_python_sdk.egg-info/top_level.txt +0 -0
  11. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_sdk/__init__.py +0 -0
  12. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_sdk/client.py +0 -0
  13. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_sdk/crewai.py +0 -0
  14. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_sdk/pydantic.py +0 -0
  15. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/agenticdome_sdk/scenarios.py +0 -0
  16. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/agno_lateral_refund.py +0 -0
  17. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/ai_foundry_callback_export.py +0 -0
  18. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/crewai_agenticdome_firewall.py +0 -0
  19. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/crewai_lateral_refund.py +0 -0
  20. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/mcp_remote_patch.py +0 -0
  21. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/mesh_output_redaction.py +0 -0
  22. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/microsoft_metadata_exfil.py +0 -0
  23. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/salesforce_hidden_bcc.py +0 -0
  24. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/examples/servicenow_delete_logs.py +0 -0
  25. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/setup.cfg +0 -0
  26. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/tests/test_client.py +0 -0
  27. {agenticdome_python_sdk-1.0.4 → agenticdome_python_sdk-1.0.5}/tests/test_pydanticai_integration.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agenticdome-python-sdk
3
- Version: 1.0.4
3
+ Version: 1.0.5
4
4
  Summary: Official Python SDK for AgentGuard Intelligence Engine and Action Firewall.
5
5
  Home-page: https://github.com/agenticdome/agenticdome-python-sdk-python
6
6
  Author: AgenticDome
@@ -35,26 +35,33 @@ Requires-Dist: twine>=5.0.0; extra == "dev"
35
35
  Dynamic: home-page
36
36
  Dynamic: requires-python
37
37
 
38
+ ```md
38
39
  # AgenticDome Python SDK
39
40
 
40
41
  [![PyPI version](https://img.shields.io/pypi/v/agenticdome-python-sdk.svg)](https://pypi.org/project/agenticdome-python-sdk/)
41
42
  [![Python Versions](https://img.shields.io/pypi/pyversions/agenticdome-python-sdk.svg)](https://pypi.org/project/agenticdome-python-sdk/)
42
43
  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
43
44
 
44
- > **Production-grade security guardrails, DLP, and multi-agent delegation enforcement for autonomous AI runtimes.**
45
+ > **Production-grade security guardrails, DLP, tool authorization, and multi-agent delegation enforcement for Python autonomous AI runtimes.**
45
46
 
46
47
  `agenticdome-python-sdk` is the official Python SDK and middleware package for AgenticDome. It provides deterministic security controls for agentic systems, including prompt guardrails, data loss prevention, tool authorization, incident reporting, and cryptographically validated multi-agent delegation workflows.
47
48
 
48
- This package includes:
49
+ The package includes:
49
50
 
50
- - The core Python SDK client
51
+ - Core Python SDK client
51
52
  - CrewAI middleware hooks
53
+ - PydanticAI firewall integration
52
54
  - Manager-to-specialist delegation token handling
53
55
  - Output DLP and sanitization workflows
54
56
  - Optional Redis-backed distributed token storage
55
57
  - Enterprise-ready fail-open / fail-closed runtime behavior
56
58
 
57
- AgenticDome is designed for autonomous multi-agent frameworks such as **CrewAI Open Source**, **CrewAI Enterprise**, and custom Python orchestration systems.
59
+ Supported runtime integrations include:
60
+
61
+ - **CrewAI Open Source / Enterprise**
62
+ - **PydanticAI**
63
+ - **Custom Python agent runtimes**
64
+ - **Multi-agent routers and tool gateways**
58
65
 
59
66
  ---
60
67
 
@@ -62,36 +69,36 @@ AgenticDome is designed for autonomous multi-agent frameworks such as **CrewAI O
62
69
 
63
70
  AgenticDome operates on a **hybrid split-plane architecture**.
64
71
 
65
- Your local runtime executes agents, tools, and workflows. The AgenticDome central governance plane provides policy decisions, security analytics, tenant isolation, API-key authentication, and incident tracking.
72
+ Your local Python runtime executes agents, tools, workflows, and framework-specific lifecycle hooks. The AgenticDome central governance plane provides policy decisions, API-key authentication, tenant isolation, incident tracking, delegation-token validation, and threat analytics.
66
73
 
67
74
  ```text
68
75
  [ LOCAL ENTERPRISE RUNTIME PERIMETER ] [ AGENTICDOME CENTRAL PLANE ]
69
76
 
70
77
  +-------------------------------------------------+ +-----------------------------+
71
- | CrewAI Core Orchestrator | | https://au.agenticdome.io |
72
- | Open Source / Enterprise Runtime | | Centralized Policy Engine |
78
+ | Python Agent Runtime | | https://au.agenticdome.io |
79
+ | CrewAI / PydanticAI / Custom Apps | | Centralized Policy Engine |
73
80
  +-------------------------------------------------+ +-----------------------------+
74
81
  | | ^ ^
75
- | 1. before_llm_call | 2. Before | 4. Verdict / Token |
76
- v | Tool Call | Enforcement |
82
+ | 1. Prompt Ingress | 2. Tool | 4. Verdict / Token |
83
+ v | Call | Enforcement |
77
84
  +-------------------------+ | v | Validate
78
85
  | Ingress Guardrail Scan | | +-----------------------------------+ | Token via
79
- +-------------------------+ | | AgenticDome Shield Python Module |----+ RPC
86
+ +-------------------------+ | | AgenticDome Python Shield |----+ RPC
80
87
  | +-----------------------------------+ |
81
- | | If Manager Delegation Detected |
88
+ | | If Delegation Detected |
82
89
  v v v
83
90
  +---------------------------------------------+ |
84
91
  | Distributed Shared Token Store |----+
85
92
  | InMemory Lock / Redis Multi-Worker Cache |
86
93
  +---------------------------------------------+
87
94
  |
88
- | 3. Execute Tool Task
95
+ | 3. Execute Tool / Skill
89
96
  v
90
97
  +------------------------+
91
98
  | Specialized Workforce |
92
99
  +------------------------+
93
100
  |
94
- | 5. after_tool_call
101
+ | 5. Output Review
95
102
  v
96
103
  +------------------------+
97
104
  | Egress DLP Firewall |
@@ -103,18 +110,40 @@ Your local runtime executes agents, tools, and workflows. The AgenticDome centra
103
110
 
104
111
  | Persona / Component | Responsibilities | Financial Model |
105
112
  | :--- | :--- | :--- |
106
- | **Enterprise / Organization** | Hosts the local CrewAI or Python runtime. Uses the AgenticDome console to create policies, obtain a Tenant ID, generate API keys, and monitor security events. | **Paid Subscriber**, SaaS license or API volume |
107
- | **Agent / Tool Developer** | Builds tools, skills, agents, and workflow components. Can use the SDK and middleware to support secure tool calls and delegation metadata. | **Free Ecosystem Partner**, no subscription required |
108
- | **This Python SDK** | Runs inside the local Python process. It intercepts CrewAI lifecycle hooks, calls the AgenticDome central plane, manages tokens, and enforces policy results. | **Runtime Security Utility** |
109
- | **AgenticDome Cloud Plane** | Provides centralized policy evaluation, threat analytics, incident tracking, tenant isolation, and governance workflows. | **Cloud Governance Plane** |
113
+ | **Enterprise / Organization** | Hosts the local CrewAI, PydanticAI, or Python runtime. Uses the AgenticDome console to create policies, obtain a Tenant ID, generate API keys, and monitor security events. | **Paid Subscriber**, SaaS license or API volume |
114
+ | **Agent / Tool Developer** | Builds tools, skills, agents, and workflow components. Uses the SDK to support secure tool calls, delegation metadata, and DLP-aware outputs. | **Free Ecosystem Partner**, no subscription required |
115
+ | **This Python SDK** | Runs inside the local Python process. It intercepts framework lifecycle hooks, calls the AgenticDome central plane, manages tokens, and enforces policy results. | **Runtime Security Utility** |
116
+ | **AgenticDome Cloud Plane** | Provides centralized policy evaluation, threat analytics, incident tracking, tenant isolation, governance workflows, and delegation verification. | **Cloud Governance Plane** |
110
117
 
111
118
  ---
112
119
 
113
120
  ## Key Capabilities
114
121
 
122
+ ### Prompt Ingress Guardrails
123
+
124
+ Screens inbound prompts before agent execution to detect:
125
+
126
+ - Prompt injection
127
+ - Jailbreak attempts
128
+ - System prompt extraction
129
+ - Malicious instruction override
130
+ - Policy bypass attempts
131
+
132
+ ### Tool and Skill Authorization
133
+
134
+ Authorizes tool calls before execution using:
135
+
136
+ - Agent identity
137
+ - Tool name
138
+ - Tool arguments
139
+ - Session context
140
+ - Source agent metadata
141
+ - Policy context
142
+ - Delegation chain
143
+
115
144
  ### Manager-to-Specialist Cryptographic Handoffs
116
145
 
117
- AgenticDome transparently intercepts multi-agent delegation workflows and issues decision tokens that bind:
146
+ AgenticDome can transparently authorize multi-agent delegation workflows and issue decision tokens that bind:
118
147
 
119
148
  - Source manager agent
120
149
  - Target specialist agent
@@ -124,7 +153,7 @@ AgenticDome transparently intercepts multi-agent delegation workflows and issues
124
153
  - Tenant context
125
154
  - Policy decision
126
155
 
127
- This prevents unauthorized lateral privilege escalation between agents.
156
+ This helps prevent unauthorized lateral privilege escalation between agents.
128
157
 
129
158
  ### Inline Output Data Loss Prevention, DLP
130
159
 
@@ -152,7 +181,7 @@ Production deployments should normally use fail-closed mode.
152
181
 
153
182
  ### Local or Distributed Token Storage
154
183
 
155
- Token storage can run in:
184
+ Delegation token storage can run in:
156
185
 
157
186
  - Local in-memory mode for single-process runtimes
158
187
  - Redis-backed mode for distributed multi-worker deployments
@@ -185,6 +214,12 @@ Install with CrewAI support:
185
214
  pip install "agenticdome-python-sdk[crewai]"
186
215
  ```
187
216
 
217
+ Install with PydanticAI support:
218
+
219
+ ```bash
220
+ pip install "agenticdome-python-sdk[pydanticai]"
221
+ ```
222
+
188
223
  Install with Redis support for distributed token storage:
189
224
 
190
225
  ```bash
@@ -215,6 +250,7 @@ export AGENTICDOME_TENANT_ID="your_tenant_id_xyz789..."
215
250
 
216
251
  ```bash
217
252
  # Runtime platform label used in policy context.
253
+ # Recommended values: crewai, pydanticai, python
218
254
  export AGENTICDOME_PLATFORM="crewai"
219
255
 
220
256
  # If true, execution is blocked when AgenticDome checks fail.
@@ -232,6 +268,9 @@ export AGENTICDOME_BLOCK_ON_SENSITIVE_OUTPUT="false"
232
268
  # Require delegated specialist executions to include a valid decision token.
233
269
  export AGENTICDOME_REQUIRE_TOKEN="true"
234
270
 
271
+ # Require explicit session IDs instead of fallback local IDs.
272
+ export AGENTICDOME_REQUIRE_SESSION_ID="false"
273
+
235
274
  # Default tool platform when a framework does not provide one.
236
275
  export AGENTICDOME_DEFAULT_TOOL_PLATFORM="unknown"
237
276
 
@@ -242,7 +281,7 @@ export AGENTICDOME_HANDOFF_TOKEN_TTL_S="900"
242
281
  export AGENTICDOME_REDIS_URL="redis://localhost:6379/0"
243
282
 
244
283
  # Optional Redis key prefix.
245
- export AGENTICDOME_REDIS_KEY_PREFIX="AgenticDome:crewai:handoff"
284
+ export AGENTICDOME_REDIS_KEY_PREFIX="AgenticDome:runtime:handoff"
246
285
 
247
286
  # Report blocked actions and middleware failures as incidents.
248
287
  export AGENTICDOME_REPORT_INCIDENTS="true"
@@ -260,27 +299,44 @@ export AGENTICDOME_BLOCKED_INCIDENT_SEVERITY="medium"
260
299
  | `AGENTICDOME_API_BASE` | string | `https://au.agenticdome.io` | AgenticDome regional API and console endpoint. |
261
300
  | `AGENTICDOME_API_KEY` | string | required | API key generated in the AgenticDome console. |
262
301
  | `AGENTICDOME_TENANT_ID` | string | required | Tenant or organization isolation namespace. |
263
- | `AGENTICDOME_PLATFORM` | string | `crewai` | Runtime platform label included in policy context. |
302
+ | `AGENTICDOME_PLATFORM` | string | framework-specific | Runtime platform label included in policy context. |
264
303
  | `AGENTICDOME_TIMEOUT_S` | integer | `20` | HTTP timeout in seconds for SDK calls. |
265
304
  | `AGENTICDOME_FAIL_CLOSED` | boolean | `true` | Blocks execution if security checks fail. |
266
305
  | `AGENTICDOME_REDACT_PII` | boolean | `true` | Enables PII redaction for output review. |
267
306
  | `AGENTICDOME_REDACT_SECRETS` | boolean | `true` | Enables secret and credential redaction. |
268
307
  | `AGENTICDOME_BLOCK_ON_SENSITIVE_OUTPUT` | boolean | `false` | Blocks entire output when sensitive content is detected. |
269
308
  | `AGENTICDOME_REQUIRE_TOKEN` | boolean | `true` | Requires delegated specialist executions to include a token. |
270
- | `AGENTICDOME_DEFAULT_TOOL_PLATFORM` | string | `unknown` | Fallback platform for tools. |
309
+ | `AGENTICDOME_REQUIRE_SESSION_ID` | boolean | framework-specific | Requires explicit session ID for strict audit mapping. |
310
+ | `AGENTICDOME_DEFAULT_TOOL_PLATFORM` | string | `unknown` / `python` | Fallback platform for tools. |
271
311
  | `AGENTICDOME_HANDOFF_TOKEN_TTL_S` | integer | `900` | Delegation token TTL in seconds. |
272
312
  | `AGENTICDOME_REDIS_URL` | string | empty | Optional Redis connection URL for distributed token storage. |
273
- | `AGENTICDOME_REDIS_KEY_PREFIX` | string | `AgenticDome:crewai:handoff` | Redis key prefix. |
313
+ | `AGENTICDOME_REDIS_KEY_PREFIX` | string | framework-specific | Redis key prefix. |
274
314
  | `AGENTICDOME_REPORT_INCIDENTS` | boolean | `true` | Reports blocked actions and middleware failures. |
275
315
  | `AGENTICDOME_BLOCKED_INCIDENT_SEVERITY` | string | `medium` | Default severity for incident reports. |
276
316
 
277
317
  ---
278
318
 
279
- ## Quickstart: CrewAI Integration
319
+ ## CrewAI Integration
280
320
 
281
- To activate global security policies across CrewAI agents, import the CrewAI integration once at the application entry point, such as `main.py`, `app.py`, or your worker bootstrap file.
321
+ AgenticDome provides native CrewAI lifecycle hook integration.
322
+
323
+ Importing the CrewAI module once registers global hooks for:
324
+
325
+ ```text
326
+ before_llm_call
327
+ before_tool_call
328
+ after_tool_call
329
+ ```
330
+
331
+ ### Install CrewAI Support
332
+
333
+ ```bash
334
+ pip install "agenticdome-python-sdk[crewai]"
335
+ ```
336
+
337
+ ### CrewAI Quickstart
282
338
 
283
- Importing the module automatically registers CrewAI lifecycle hooks.
339
+ To activate global security policies across CrewAI agents, import the CrewAI integration once at the application entry point, such as `main.py`, `app.py`, or your worker bootstrap file.
284
340
 
285
341
  ```python
286
342
  import os
@@ -319,58 +375,190 @@ result = crew.kickoff()
319
375
  print(result)
320
376
  ```
321
377
 
322
- The AgenticDome middleware automatically hooks into:
378
+ ### CrewAI Security Flow
323
379
 
324
- ```text
325
- before_llm_call
326
- before_tool_call
327
- after_tool_call
380
+ #### 1. Prompt Ingress Screening
381
+
382
+ Before the LLM is called, AgenticDome screens prompts for hostile or policy-violating input.
383
+
384
+ #### 2. Tool Authorization
385
+
386
+ Before a tool is executed, AgenticDome validates tool name, tool arguments, session context, agent identity, and policy metadata.
387
+
388
+ #### 3. Manager Delegation Authorization
389
+
390
+ When a manager agent delegates work to a specialist, AgenticDome authorizes the handoff and can return a cryptographic decision token.
391
+
392
+ #### 4. Specialist Token Verification
393
+
394
+ When the specialist executes the delegated tool, the token is verified against the AgenticDome central plane.
395
+
396
+ #### 5. Output DLP
397
+
398
+ After tool execution, AgenticDome reviews output content for sensitive data and can redact or block it before it leaves the runtime boundary.
399
+
400
+ ### CrewAI Import Reference
401
+
402
+ ```python
403
+ import agenticdome_sdk.crewai
404
+ ```
405
+
406
+ Optional exported CrewAI objects:
407
+
408
+ ```python
409
+ from agenticdome_sdk.crewai import (
410
+ CONFIG,
411
+ CLIENT,
412
+ DecisionTokenRecord,
413
+ DecisionTokenStore,
414
+ InMemoryDecisionTokenStore,
415
+ RedisDecisionTokenStore,
416
+ AgenticDome_before_tool_call,
417
+ AgenticDome_after_tool_call,
418
+ AgenticDome_before_llm_call,
419
+ )
328
420
  ```
329
421
 
330
422
  ---
331
423
 
332
- ## CrewAI Security Flow
424
+ ## PydanticAI Integration
333
425
 
334
- ### 1. Prompt Ingress Screening
426
+ AgenticDome also provides a native PydanticAI firewall integration.
335
427
 
336
- Before the LLM is called, AgenticDome screens prompts for:
428
+ The PydanticAI integration supports:
337
429
 
338
- - Jailbreak attempts
339
- - Prompt injection
340
- - System prompt extraction
341
- - Malicious instruction override
342
- - Policy bypass attempts
430
+ - Prompt ingress checks where lifecycle hooks are available
431
+ - Tool perimeter authorization through `@firewall.secure_tool`
432
+ - Delegation-token generation for handoff tools
433
+ - Specialist decision-token verification
434
+ - Egress output DLP
435
+ - Redis-backed multi-worker handoff-token storage
343
436
 
344
- ### 2. Tool Authorization
437
+ ### Install PydanticAI Support
345
438
 
346
- Before a tool is executed, AgenticDome checks:
439
+ ```bash
440
+ pip install "agenticdome-python-sdk[pydanticai]"
441
+ ```
347
442
 
348
- - Agent identity
349
- - Tool name
350
- - Tool arguments
351
- - Session context
352
- - Policy context
353
- - Delegation chain
443
+ ### PydanticAI Component Topology
354
444
 
355
- ### 3. Manager Delegation Authorization
445
+ ```text
446
+ [ PYDANTICAI AGENT RUNTIME PERIMETER ] [ AGENTICDOME CONTROL PLANE ]
356
447
 
357
- When a manager agent delegates work to a specialist, AgenticDome authorizes the handoff and returns a cryptographic decision token.
448
+ +-------------------------------------------------+ +-----------------------------+
449
+ | Agent.run() Execution Loop | | https://au.agenticdome.io |
450
+ +-------------------------------------------------+ +-----------------------------+
451
+ | | ^ ^
452
+ | 1. before_runner_init | 4. after | Verdict / DLP |
453
+ v | run end | Enforcement |
454
+ +-------------------------+ | v |
455
+ | Ingress Prompt Shield | | +-----------------------+ |
456
+ +-------------------------+ | | Egress DLP Firewall | |
457
+ | +-----------------------+ |
458
+ | ^ |
459
+ | 2. Secure | 3. Tool Output |
460
+ | Tool | |
461
+ v | |
462
+ +------------------------------------+ |
463
+ | @secure_tool Interceptor |-----------------+
464
+ | Token Verification / Tool Policy |
465
+ +------------------------------------+
466
+ ```
358
467
 
359
- The middleware attaches this token to the downstream execution parameters.
468
+ ### PydanticAI Quickstart
360
469
 
361
- ### 4. Specialist Token Verification
470
+ ```python
471
+ import os
472
+ from typing import Any
362
473
 
363
- When the specialist executes the delegated tool, the token is verified against the AgenticDome central plane.
474
+ from pydantic_ai import Agent, RunContext
364
475
 
365
- This prevents unauthorized lateral movement between agents.
476
+ from agenticdome_sdk.pydantic import CyberSecFirewall, FirewallConfig
366
477
 
367
- ### 5. Output DLP
368
478
 
369
- After tool execution, AgenticDome reviews output content for sensitive data and can redact or block it before it leaves the runtime boundary.
479
+ # 1. Instantiate the enterprise firewall capability.
480
+ firewall = CyberSecFirewall(
481
+ config=FirewallConfig(
482
+ api_base=os.getenv("AGENTICDOME_API_BASE", "https://au.agenticdome.io"),
483
+ api_key=os.getenv("AGENTICDOME_API_KEY", ""),
484
+ tenant_id=os.getenv("AGENTICDOME_TENANT_ID", ""),
485
+ fail_closed=True,
486
+ block_on_sensitive_output=True,
487
+ )
488
+ )
489
+
490
+
491
+ # 2. Define your PydanticAI Agent.
492
+ customer_support_agent = Agent(
493
+ "gemini-2.5-flash",
494
+ name="customer_support_agent",
495
+ result_type=str,
496
+ system_prompt="You are a helpful customer platform support assistant.",
497
+ )
498
+
499
+
500
+ # 3. Attach ingress/egress lifecycle protections where supported by the runtime.
501
+ firewall.attach_to_agent(customer_support_agent)
502
+
503
+
504
+ # 4. Protect capability tools using the perimeter decorator.
505
+ @customer_support_agent.tool
506
+ @firewall.secure_tool
507
+ async def fetch_user_profile(ctx: RunContext[Any], user_id: str) -> dict:
508
+ """Retrieves account management metadata profiles for a corporate ID."""
509
+ return {
510
+ "user_id": user_id,
511
+ "status": "active",
512
+ "passport_number": "A-1234567",
513
+ }
514
+ ```
515
+
516
+ ### PydanticAI Manual Firewall Usage
517
+
518
+ You can also use the firewall object directly in custom routers, test harnesses, or execution gateways.
519
+
520
+ ```python
521
+ import os
522
+
523
+ from agenticdome_sdk.pydantic import CyberSecFirewall, FirewallConfig
524
+
525
+
526
+ firewall = CyberSecFirewall(
527
+ FirewallConfig(
528
+ api_base=os.getenv("AGENTICDOME_API_BASE", "https://au.agenticdome.io"),
529
+ api_key=os.getenv("AGENTICDOME_API_KEY", ""),
530
+ tenant_id=os.getenv("AGENTICDOME_TENANT_ID", ""),
531
+ fail_closed=True,
532
+ )
533
+ )
534
+ ```
535
+
536
+ ### PydanticAI Import Reference
537
+
538
+ ```python
539
+ from agenticdome_sdk.pydantic import (
540
+ CyberSecFirewall,
541
+ FirewallConfig,
542
+ PydanticAIFirewallError,
543
+ PydanticAIFirewallDenied,
544
+ DecisionTokenRecord,
545
+ DecisionTokenStore,
546
+ InMemoryDecisionTokenStore,
547
+ RedisDecisionTokenStore,
548
+ )
549
+ ```
550
+
551
+ ### PydanticAI Notes
552
+
553
+ PydanticAI lifecycle hook APIs may vary between framework versions. The firewall handles this safely:
554
+
555
+ - If compatible lifecycle decorators are available, `attach_to_agent()` attaches prompt ingress and egress DLP hooks.
556
+ - If lifecycle decorators are not available, `@firewall.secure_tool` still protects tool execution.
557
+ - Tool authorization and DLP remain available through the secure tool decorator.
370
558
 
371
559
  ---
372
560
 
373
- ## Python SDK Core Client Usage
561
+ ## Core Python SDK Client Usage
374
562
 
375
563
  If you need to call AgenticDome APIs manually, use the core SDK client.
376
564
 
@@ -389,7 +577,7 @@ client.report_incident(
389
577
  incident_type="unauthorized_escalation_attempt",
390
578
  severity="high",
391
579
  details="Agent attempted parameter mutation inside a prohibited database connector.",
392
- platform="crewai",
580
+ platform="python",
393
581
  )
394
582
  ```
395
583
 
@@ -412,7 +600,7 @@ result = client.guardrail_validate(
412
600
  agent_id="support-agent-01",
413
601
  direction="input",
414
602
  session_id="sess_prod_01J4X",
415
- platform="crewai",
603
+ platform="python",
416
604
  policy_context={
417
605
  "request_purpose": "customer_support",
418
606
  },
@@ -436,12 +624,12 @@ client = AgentGuardClient(
436
624
  )
437
625
 
438
626
  result = client.guardrail_validate(
439
- text="CrewAI agent wants to update a customer refund record.",
627
+ text="Agent wants to update a customer refund record.",
440
628
  agent_id="refund-agent-01",
441
629
  direction="outbound",
442
630
  session_id="sess_prod_01J4X",
443
- platform="crewai",
444
- source_platform="crewai",
631
+ platform="python",
632
+ source_platform="python",
445
633
  tool_platform="payments",
446
634
  tool_name="payments.refund.create",
447
635
  tool_args={
@@ -475,8 +663,8 @@ authorization = client.a2a_authorize_tool(
475
663
  text="Manager delegates payment refund to specialist agent.",
476
664
  agent_id="payments-specialist-01",
477
665
  source_agent_id="operations-manager-01",
478
- platform="crewai",
479
- source_platform="crewai",
666
+ platform="python",
667
+ source_platform="python",
480
668
  tool_platform="payments",
481
669
  tool_name="payments.refund.create",
482
670
  tool_args={
@@ -518,7 +706,7 @@ verification = client.a2a_verify_decision_token_rpc(
518
706
  },
519
707
  agent_id="payments-specialist-01",
520
708
  source_agent_id="operations-manager-01",
521
- platform="crewai",
709
+ platform="python",
522
710
  require_allowed=True,
523
711
  )
524
712
 
@@ -543,13 +731,13 @@ result = client.mesh_validate(
543
731
  agent_id="support-agent-01",
544
732
  session_id="sess_prod_01J4X",
545
733
  direction="output",
546
- platform="crewai",
734
+ platform="python",
547
735
  text="Customer email is alice@example.com and API key is sk_live_example...",
548
736
  redact_pii=True,
549
737
  redact_secrets=True,
550
738
  block_on_sensitive_output=False,
551
739
  policy_context={
552
- "request_purpose": "crewai_output_review",
740
+ "request_purpose": "output_review",
553
741
  },
554
742
  )
555
743
 
@@ -560,7 +748,7 @@ print(result)
560
748
 
561
749
  ## Redis Token Store for Production Clusters
562
750
 
563
- For horizontally scaled CrewAI deployments, use Redis so manager handoff tokens are shared across workers.
751
+ For horizontally scaled deployments, use Redis so manager handoff tokens are shared across workers.
564
752
 
565
753
  Install Redis support:
566
754
 
@@ -572,7 +760,7 @@ Configure:
572
760
 
573
761
  ```bash
574
762
  export AGENTICDOME_REDIS_URL="redis://redis.example.internal:6379/0"
575
- export AGENTICDOME_REDIS_KEY_PREFIX="AgenticDome:crewai:handoff"
763
+ export AGENTICDOME_REDIS_KEY_PREFIX="AgenticDome:runtime:handoff"
576
764
  ```
577
765
 
578
766
  In-memory token storage is suitable for local development and single-process workers. Redis is recommended for multi-worker or containerized production deployments.
@@ -583,6 +771,9 @@ In-memory token storage is suitable for local development and single-process wor
583
771
 
584
772
  ```bash
585
773
  export AGENTICDOME_API_BASE="https://au.agenticdome.io"
774
+ export AGENTICDOME_API_KEY="your_api_key"
775
+ export AGENTICDOME_TENANT_ID="your_tenant_id"
776
+
586
777
  export AGENTICDOME_FAIL_CLOSED="true"
587
778
  export AGENTICDOME_REDACT_PII="true"
588
779
  export AGENTICDOME_REDACT_SECRETS="true"
@@ -621,20 +812,10 @@ CrewAI middleware registration:
621
812
  import agenticdome_sdk.crewai
622
813
  ```
623
814
 
624
- Optional exported CrewAI objects:
815
+ PydanticAI firewall:
625
816
 
626
817
  ```python
627
- from agenticdome_sdk.crewai import (
628
- CONFIG,
629
- CLIENT,
630
- DecisionTokenRecord,
631
- DecisionTokenStore,
632
- InMemoryDecisionTokenStore,
633
- RedisDecisionTokenStore,
634
- AgenticDome_before_tool_call,
635
- AgenticDome_after_tool_call,
636
- AgenticDome_before_llm_call,
637
- )
818
+ from agenticdome_sdk.pydantic import CyberSecFirewall, FirewallConfig
638
819
  ```
639
820
 
640
821
  ---
@@ -649,10 +830,11 @@ source .venv/bin/activate
649
830
 
650
831
  python -m pip install --upgrade pip setuptools wheel build twine pytest
651
832
  python -m pip install -e ".[dev]"
833
+ python -m pip install -e ".[crewai,pydanticai,redis]"
652
834
 
653
835
  pytest -q
654
836
 
655
- rm -rf build dist *.egg-info agenticdome_sdk.egg-info
837
+ rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
656
838
  python -m build
657
839
  python -m twine check dist/*
658
840
  ```
@@ -668,3 +850,4 @@ For enterprise deployments, advanced governance workflows, dedicated regional co
668
850
  ```text
669
851
  https://au.agenticdome.io
670
852
  ```
853
+ ```