agenticdome-python-sdk 1.2.1__tar.gz → 1.2.2__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.
- {agenticdome_python_sdk-1.2.1/agenticdome_python_sdk.egg-info → agenticdome_python_sdk-1.2.2}/PKG-INFO +162 -9
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/README.md +145 -2
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2/agenticdome_python_sdk.egg-info}/PKG-INFO +162 -9
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_python_sdk.egg-info/SOURCES.txt +6 -1
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_python_sdk.egg-info/requires.txt +19 -6
- agenticdome_python_sdk-1.2.2/agenticdome_sdk/_framework_firewall.py +614 -0
- agenticdome_python_sdk-1.2.2/agenticdome_sdk/claude.py +420 -0
- agenticdome_python_sdk-1.2.2/agenticdome_sdk/smolagents.py +488 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/pyproject.toml +21 -8
- agenticdome_python_sdk-1.2.2/tests/test_claude_integration.py +243 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_packaging_contract.py +7 -0
- agenticdome_python_sdk-1.2.2/tests/test_smolagents_integration.py +181 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/LICENSE +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/MANIFEST.in +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_python_sdk.egg-info/dependency_links.txt +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_python_sdk.egg-info/top_level.txt +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/__init__.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/agno.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/aws_bedrock.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/client.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/crewai.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/google_adk.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/identity.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/langgraph.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/llamaindex.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/mcp_host.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/microsoft_agent_framework.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/microsoft_ai_foundry.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/openai_agents.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/proof.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/pydantic.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/agenticdome_sdk/scenarios.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/agno_lateral_refund.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/ai_foundry_callback_export.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/attack_demo.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/crewai_agenticdome_firewall.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/crewai_lateral_refund.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/mcp_remote_patch.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/mesh_output_redaction.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/microsoft_metadata_exfil.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/salesforce_hidden_bcc.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/examples/servicenow_delete_logs.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/setup.cfg +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/setup.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_agno_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_aws_bedrock_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_client.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_crewai_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_google_adk_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_identity_context.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_langgraph_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_live_tenant.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_llamaindex_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_mcp_host_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_microsoft_agent_framework_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_microsoft_ai_foundry_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/tests/test_openai_agents_integration.py +0 -0
- {agenticdome_python_sdk-1.2.1 → agenticdome_python_sdk-1.2.2}/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.2.
|
|
3
|
+
Version: 1.2.2
|
|
4
4
|
Summary: Official Python SDK for AgenticDome security guardrails, DLP, tool authorization, and multi-agent delegation enforcement.
|
|
5
5
|
Author: AgenticDome
|
|
6
6
|
License: Proprietary
|
|
@@ -33,14 +33,15 @@ Requires-Dist: redis>=4.5.0; extra == "redis"
|
|
|
33
33
|
Provides-Extra: pop
|
|
34
34
|
Requires-Dist: cryptography>=42.0.0; extra == "pop"
|
|
35
35
|
Provides-Extra: pydanticai
|
|
36
|
-
Requires-Dist: pydantic-ai==2.
|
|
36
|
+
Requires-Dist: pydantic-ai==2.16.0; extra == "pydanticai"
|
|
37
37
|
Requires-Dist: anyio>=4.0.0; extra == "pydanticai"
|
|
38
38
|
Provides-Extra: pydantic
|
|
39
|
-
Requires-Dist: pydantic-ai==2.
|
|
39
|
+
Requires-Dist: pydantic-ai==2.16.0; extra == "pydantic"
|
|
40
40
|
Requires-Dist: anyio>=4.0.0; extra == "pydantic"
|
|
41
41
|
Provides-Extra: langgraph
|
|
42
42
|
Requires-Dist: langgraph==1.2.9; extra == "langgraph"
|
|
43
43
|
Requires-Dist: langchain-core==1.5.0; extra == "langgraph"
|
|
44
|
+
Requires-Dist: langchain-openai==1.3.5; extra == "langgraph"
|
|
44
45
|
Requires-Dist: anyio>=4.0.0; extra == "langgraph"
|
|
45
46
|
Provides-Extra: microsoft
|
|
46
47
|
Provides-Extra: foundry
|
|
@@ -53,9 +54,9 @@ Requires-Dist: openai-agents==0.18.3; extra == "openai-agents"
|
|
|
53
54
|
Provides-Extra: mcp
|
|
54
55
|
Requires-Dist: mcp<=1.28.1,>=1.26.0; extra == "mcp"
|
|
55
56
|
Provides-Extra: bedrock
|
|
56
|
-
Requires-Dist: boto3==1.43.
|
|
57
|
+
Requires-Dist: boto3==1.43.54; extra == "bedrock"
|
|
57
58
|
Provides-Extra: aws-bedrock
|
|
58
|
-
Requires-Dist: boto3==1.43.
|
|
59
|
+
Requires-Dist: boto3==1.43.54; extra == "aws-bedrock"
|
|
59
60
|
Provides-Extra: llamaindex
|
|
60
61
|
Requires-Dist: llama-index==0.14.23; extra == "llamaindex"
|
|
61
62
|
Provides-Extra: llama-index
|
|
@@ -64,22 +65,31 @@ Provides-Extra: google-adk
|
|
|
64
65
|
Requires-Dist: google-adk==2.5.0; extra == "google-adk"
|
|
65
66
|
Provides-Extra: adk
|
|
66
67
|
Requires-Dist: google-adk==2.5.0; extra == "adk"
|
|
68
|
+
Provides-Extra: claude
|
|
69
|
+
Requires-Dist: claude-agent-sdk==0.2.126; extra == "claude"
|
|
70
|
+
Provides-Extra: claude-agent-sdk
|
|
71
|
+
Requires-Dist: claude-agent-sdk==0.2.126; extra == "claude-agent-sdk"
|
|
72
|
+
Provides-Extra: smolagents
|
|
73
|
+
Requires-Dist: smolagents==1.26.0; extra == "smolagents"
|
|
67
74
|
Provides-Extra: all
|
|
68
75
|
Requires-Dist: crewai==1.15.5; extra == "all"
|
|
69
76
|
Requires-Dist: redis>=4.5.0; extra == "all"
|
|
70
77
|
Requires-Dist: cryptography>=42.0.0; extra == "all"
|
|
71
|
-
Requires-Dist: pydantic-ai==2.
|
|
78
|
+
Requires-Dist: pydantic-ai==2.16.0; extra == "all"
|
|
72
79
|
Requires-Dist: anyio>=4.0.0; extra == "all"
|
|
73
80
|
Requires-Dist: langgraph==1.2.9; extra == "all"
|
|
74
81
|
Requires-Dist: langchain-core==1.5.0; extra == "all"
|
|
82
|
+
Requires-Dist: langchain-openai==1.3.5; extra == "all"
|
|
75
83
|
Requires-Dist: agno==2.8.0; extra == "all"
|
|
76
84
|
Requires-Dist: azure-ai-projects==2.3.0; extra == "all"
|
|
77
85
|
Requires-Dist: azure-identity==1.25.3; extra == "all"
|
|
78
86
|
Requires-Dist: openai-agents==0.18.3; extra == "all"
|
|
79
87
|
Requires-Dist: mcp<=1.28.1,>=1.26.0; extra == "all"
|
|
80
|
-
Requires-Dist: boto3==1.43.
|
|
88
|
+
Requires-Dist: boto3==1.43.54; extra == "all"
|
|
81
89
|
Requires-Dist: llama-index==0.14.23; extra == "all"
|
|
82
90
|
Requires-Dist: google-adk==2.5.0; extra == "all"
|
|
91
|
+
Requires-Dist: claude-agent-sdk==0.2.126; extra == "all"
|
|
92
|
+
Requires-Dist: smolagents==1.26.0; extra == "all"
|
|
83
93
|
Provides-Extra: dev
|
|
84
94
|
Requires-Dist: pytest>=8.0.0; extra == "dev"
|
|
85
95
|
Requires-Dist: tomli>=2.0.0; python_version < "3.11" and extra == "dev"
|
|
@@ -99,7 +109,7 @@ Dynamic: license-file
|
|
|
99
109
|
|
|
100
110
|
`agenticdome-python-sdk` is the official Python SDK and middleware package for [AgenticDome](https://agenticdome.io). It enforces deterministic security controls at every boundary your agents cross — prompt ingress, tool execution, agent-to-agent handoffs, and output egress — backed by the AgenticDome central policy plane.
|
|
101
111
|
|
|
102
|
-
**One security pattern,
|
|
112
|
+
**One security pattern, fourteen runtimes:** CrewAI · PydanticAI · LangGraph/LangChain · Microsoft Agent Framework · Microsoft AI Foundry · OpenAI Agents SDK · Claude Agent SDK · Hugging Face smolagents · Agno · Google ADK · LlamaIndex · AWS Bedrock · MCP hosts/gateways · custom Python.
|
|
103
113
|
|
|
104
114
|
```python
|
|
105
115
|
# The 30-second version: block a prompt-injected refund before it executes.
|
|
@@ -286,6 +296,8 @@ pip install agenticdome-python-sdk
|
|
|
286
296
|
| Microsoft Agent Framework | `pip install "agenticdome-python-sdk[microsoft]"` |
|
|
287
297
|
| Microsoft AI Foundry | `pip install "agenticdome-python-sdk[foundry]"` |
|
|
288
298
|
| OpenAI Agents SDK | `pip install "agenticdome-python-sdk[openai-agents]"` |
|
|
299
|
+
| Anthropic Claude Agent SDK | `pip install "agenticdome-python-sdk[claude]"` |
|
|
300
|
+
| Hugging Face smolagents | `pip install "agenticdome-python-sdk[smolagents]"` |
|
|
289
301
|
| Agno | `pip install "agenticdome-python-sdk[agno]"` |
|
|
290
302
|
| Google ADK | `pip install "agenticdome-python-sdk[google-adk]"` |
|
|
291
303
|
| LlamaIndex | `pip install "agenticdome-python-sdk[llamaindex]"` |
|
|
@@ -394,7 +406,7 @@ export AGENTICDOME_PRODUCTION_MODE="false" # production hardening (st
|
|
|
394
406
|
<details>
|
|
395
407
|
<summary><strong>Full configuration reference — per-adapter variables</strong></summary>
|
|
396
408
|
|
|
397
|
-
Every framework adapter exposes the same family of local hardening controls, prefixed per adapter: `AGENTICDOME_CREWAI_*`, `AGENTICDOME_PYDANTICAI_*`, `AGENTICDOME_LANGGRAPH_*`, `AGENTICDOME_MSAF_*` (Microsoft Agent Framework), `AGENTICDOME_FOUNDRY_*`, `AGENTICDOME_OPENAI_AGENTS_*`, `AGENTICDOME_AGNO_*`, `AGENTICDOME_BEDROCK_*`, `AGENTICDOME_GOOGLE_ADK_*`, and `AGENTICDOME_MCP_*`.
|
|
409
|
+
Every framework adapter exposes the same family of local hardening controls, prefixed per adapter: `AGENTICDOME_CREWAI_*`, `AGENTICDOME_PYDANTICAI_*`, `AGENTICDOME_LANGGRAPH_*`, `AGENTICDOME_MSAF_*` (Microsoft Agent Framework), `AGENTICDOME_FOUNDRY_*`, `AGENTICDOME_OPENAI_AGENTS_*`, `AGENTICDOME_CLAUDE_*`, `AGENTICDOME_SMOLAGENTS_*`, `AGENTICDOME_AGNO_*`, `AGENTICDOME_BEDROCK_*`, `AGENTICDOME_GOOGLE_ADK_*`, and `AGENTICDOME_MCP_*`.
|
|
398
410
|
|
|
399
411
|
**Common per-adapter pattern** (substitute the prefix for your adapter):
|
|
400
412
|
|
|
@@ -421,6 +433,11 @@ Every framework adapter exposes the same family of local hardening controls, pre
|
|
|
421
433
|
| `AGENTICDOME_LANGGRAPH_AGENT_ID` | string | `langgraph_orchestrator` | Default LangGraph orchestrator node identity. |
|
|
422
434
|
| `AGENTICDOME_LANGGRAPH_FINAL_ID` | string | `langgraph_final_node` | Default LangGraph final-output node identity. |
|
|
423
435
|
| `AGENTICDOME_LANGGRAPH_REQUIRE_SERVER_TOKENS` | boolean | `false` | Requires handoff authorization responses to include server-issued decision tokens. |
|
|
436
|
+
| `AGENTICDOME_CLAUDE_AGENT_ID` | string | `claude_agent` | Default Claude Agent SDK identity. |
|
|
437
|
+
| `AGENTICDOME_CLAUDE_STRICT_DELEGATED_EXECUTION` | boolean | `true` | Requires server-issued decision tokens for Claude multi-agent handoffs. |
|
|
438
|
+
| `AGENTICDOME_SMOLAGENTS_AGENT_ID` | string | `smolagent` | Default smolagents identity. |
|
|
439
|
+
| `AGENTICDOME_SMOLAGENTS_SCAN_CODE_EXPRESSIONS` | boolean | `true` | Reviews CodeAgent-generated Python immediately before executor invocation. |
|
|
440
|
+
| `AGENTICDOME_SMOLAGENTS_STRICT_DELEGATED_EXECUTION` | boolean | `true` | Authorizes and verifies managed-agent handoffs using bound decision tokens. |
|
|
424
441
|
| `AGENTICDOME_LANGGRAPH_STRICT_DELEGATED_EXECUTION` | boolean | `true` | Blocks delegated executions that carry delegation metadata without a valid token. |
|
|
425
442
|
| `AGENTICDOME_FOUNDRY_REQUIRE_OUTPUT_SANITIZATION_IN_PROD` | boolean | `true` | Requires API-key-backed Mesh output sanitization when Foundry production mode is enabled. |
|
|
426
443
|
| `AGENTICDOME_BEDROCK_AGENT_ID` | string | `aws_bedrock_agent` | Default agent identity for Bedrock runtime calls and local action handlers. |
|
|
@@ -469,6 +486,8 @@ One table, one decision. Find your runtime, apply the required code action, and
|
|
|
469
486
|
| [Microsoft Agent Framework](#microsoft-agent-framework) | `agenticdome_sdk.microsoft_agent_framework` | Module where agents, workflows, tools, or middleware are declared | `create_middleware()`, `install_on_agent()`, or `run_agent_securely()` | `@firewall.secure_tool`, `wrap_tool_handler`, `secure_delegated_tool`, `wrap_delegated_tool_handler` |
|
|
470
487
|
| [Microsoft AI Foundry](#microsoft-ai-foundry) | `agenticdome_sdk.microsoft_ai_foundry` | Module handling Foundry runs, function calls, or client construction | `create_middleware()`, `install_on_client()`, or `run_secure()` | `wrap_tool_executor()`, `@firewall.secure_tool(...)`, `before_tool_call()`, delegation verifiers |
|
|
471
488
|
| [OpenAI Agents SDK](#openai-agents-sdk) | `agenticdome_sdk.openai_agents` | Module where `Agent`, `Runner.run(...)`, `@function_tool`, guardrails, or handoffs are declared | `run_agent_securely()`, `run_agent_stream_securely()`, `create_input_guardrail()`, `create_output_guardrail()` | `wrap_tool_handler()`, `wrap_delegated_tool_handler()`, `@firewall.secure_tool(...)`, handoff verifiers |
|
|
489
|
+
| [Claude Agent SDK](#claude-agent-sdk) | `agenticdome_sdk.claude` | Module constructing `ClaudeAgentOptions`, `ClaudeSDKClient`, SDK MCP tools, or `query()` | `install_on_options()` plus `run_client_securely()`, or `secure_query()` | Native `PreToolUse`/`PostToolUse` hooks, `wrap_tool_handler()`, and `secure_sdk_tool()` |
|
|
490
|
+
| [smolagents](#hugging-face-smolagents) | `agenticdome_sdk.smolagents` | Module constructing `CodeAgent`, `ToolCallingAgent`, tools, or managed agents | `run_agent_securely()` or `attach_firewall()` | Native `Tool` wrappers, CodeAgent executor proxy, observation callback, and managed-agent token verification |
|
|
472
491
|
| [Agno](#agno) | `agenticdome_sdk.agno` | Module where `Agent`, Team, Workflow, or AgentOS components are declared | `attach_firewall(agent_or_team)`, `create_hook_bundle()`, `create_middleware()`, or `create_plugin()` | `@firewall.secure_tool(...)` for high-risk local tools |
|
|
473
492
|
| [Google ADK](#google-adk) | `agenticdome_sdk.google_adk` | Module where `LlmAgent(...)` or ADK plugins are declared | `build_callback_kwargs()`, `create_plugin()`, or `install_on_agent(...)` | `wrap_tool_handler()` or `@firewall.secure_tool(...)` |
|
|
474
493
|
| [LlamaIndex](#llamaindex) | `agenticdome_sdk.llamaindex` | Module where tools, query engines, retrievers, callbacks, or agents are assembled | `run_query_securely()`, `wrap_query_engine()`, `wrap_retriever()`, `create_node_postprocessor()`, `create_callback_handler()` | `wrap_tool_function()`, `to_function_tool()`, `@firewall.secure_tool(...)`, handoff verifiers |
|
|
@@ -1269,6 +1288,138 @@ from agenticdome_sdk.openai_agents import (
|
|
|
1269
1288
|
|
|
1270
1289
|
---
|
|
1271
1290
|
|
|
1291
|
+
### Claude Agent SDK
|
|
1292
|
+
|
|
1293
|
+
The adapter uses Claude Agent SDK's native hook contract for prompt submission, pre-tool permission decisions, and post-tool output replacement. It also wraps the asynchronous `query()` and `ClaudeSDKClient.receive_response()` pipelines so final assistant text is reviewed before your application returns it.
|
|
1294
|
+
|
|
1295
|
+
```bash
|
|
1296
|
+
pip install "agenticdome-python-sdk[claude]"
|
|
1297
|
+
```
|
|
1298
|
+
|
|
1299
|
+
**Secure a `ClaudeSDKClient` and its built-in/MCP tools:**
|
|
1300
|
+
|
|
1301
|
+
```python
|
|
1302
|
+
from claude_agent_sdk import ClaudeAgentOptions, ClaudeSDKClient
|
|
1303
|
+
from agenticdome_sdk.claude import AgenticDomeClaudeFirewall
|
|
1304
|
+
|
|
1305
|
+
firewall = AgenticDomeClaudeFirewall()
|
|
1306
|
+
options = ClaudeAgentOptions(allowed_tools=["Read", "mcp__crm__lookup"])
|
|
1307
|
+
firewall.install_on_options(
|
|
1308
|
+
options,
|
|
1309
|
+
session_id="sess_prod_01J4X",
|
|
1310
|
+
agent_id="claude_support_agent",
|
|
1311
|
+
)
|
|
1312
|
+
|
|
1313
|
+
async with ClaudeSDKClient(options=options) as client:
|
|
1314
|
+
async for message in firewall.run_client_securely(
|
|
1315
|
+
client,
|
|
1316
|
+
"Look up the customer's active support case.",
|
|
1317
|
+
session_id="sess_prod_01J4X",
|
|
1318
|
+
agent_id="claude_support_agent",
|
|
1319
|
+
):
|
|
1320
|
+
consume(message)
|
|
1321
|
+
```
|
|
1322
|
+
|
|
1323
|
+
For the one-shot API, iterate `firewall.secure_query(prompt, session_id=..., options=...)`. If the run may execute built-in tools, install the returned hook matchers on its options as well; `secure_query()` itself covers ingress and returned messages.
|
|
1324
|
+
|
|
1325
|
+
**Compose with Claude's native SDK MCP `@tool`:**
|
|
1326
|
+
|
|
1327
|
+
```python
|
|
1328
|
+
@firewall.secure_sdk_tool(
|
|
1329
|
+
"lookup_customer",
|
|
1330
|
+
"Look up a customer support profile",
|
|
1331
|
+
{"customer_id": str},
|
|
1332
|
+
session_id="sess_prod_01J4X",
|
|
1333
|
+
agent_id="claude_support_agent",
|
|
1334
|
+
tool_platform="crm",
|
|
1335
|
+
)
|
|
1336
|
+
async def lookup_customer(args):
|
|
1337
|
+
return {"content": [{"type": "text", "text": crm_lookup(args["customer_id"])}]}
|
|
1338
|
+
```
|
|
1339
|
+
|
|
1340
|
+
The `PreToolUse` hook returns Claude's native `permissionDecision: deny` response before local side effects. If policy supplies sanitized arguments, it returns `updatedInput`. The `PostToolUse` hook uses `updatedToolOutput` so DLP-reviewed tool data is what the model sees.
|
|
1341
|
+
|
|
1342
|
+
```bash
|
|
1343
|
+
export AGENTICDOME_PLATFORM="claude_agent_sdk"
|
|
1344
|
+
export AGENTICDOME_CLAUDE_AGENT_ID="claude_support_agent"
|
|
1345
|
+
export AGENTICDOME_CLAUDE_MAX_INPUT_CHARS="50000"
|
|
1346
|
+
export AGENTICDOME_CLAUDE_MAX_OUTPUT_CHARS="100000"
|
|
1347
|
+
export AGENTICDOME_CLAUDE_MAX_TOOL_ARG_CHARS="20000"
|
|
1348
|
+
export AGENTICDOME_CLAUDE_STREAMING_BUFFER_CHARS="4000"
|
|
1349
|
+
export AGENTICDOME_CLAUDE_RATE_LIMIT_PER_MINUTE="60"
|
|
1350
|
+
export AGENTICDOME_CLAUDE_RETRY_ATTEMPTS="2"
|
|
1351
|
+
export AGENTICDOME_CLAUDE_RETRY_BACKOFF_S="0.25"
|
|
1352
|
+
export AGENTICDOME_CLAUDE_CIRCUIT_BREAKER_FAILURES="5"
|
|
1353
|
+
export AGENTICDOME_CLAUDE_CIRCUIT_BREAKER_RESET_S="60"
|
|
1354
|
+
export AGENTICDOME_CLAUDE_AUDIT_LOGGING="true"
|
|
1355
|
+
export AGENTICDOME_CLAUDE_OTEL_ENABLED="true"
|
|
1356
|
+
export AGENTICDOME_CLAUDE_STRICT_DELEGATED_EXECUTION="true"
|
|
1357
|
+
export AGENTICDOME_CLAUDE_EMERGENCY_BLOCK_TOOLS=""
|
|
1358
|
+
export AGENTICDOME_CLAUDE_EMERGENCY_BLOCK_AGENTS=""
|
|
1359
|
+
```
|
|
1360
|
+
|
|
1361
|
+
Use `authorize_manager_handoff()` and `verify_specialist_execution()` when a manager delegates sensitive work. Configure Redis and `AGENTICDOME_TOKEN_HMAC_SECRET` when authorization and specialist execution can land on different workers. Claude hooks protect operations visible to the local SDK process; externally hosted services still require enforcement at their local gateway or MCP host.
|
|
1362
|
+
|
|
1363
|
+
Official references: [Claude Agent SDK Python](https://github.com/anthropics/claude-agent-sdk-python) · [Claude Agent SDK overview](https://platform.claude.com/docs/en/agent-sdk/overview)
|
|
1364
|
+
|
|
1365
|
+
---
|
|
1366
|
+
|
|
1367
|
+
### Hugging Face smolagents
|
|
1368
|
+
|
|
1369
|
+
smolagents `CodeAgent` generates Python and invokes `python_executor(code)` before step callbacks run. The adapter therefore wraps the executor itself, wraps every native `Tool`, sanitizes step observations before the next model turn, and enforces managed-agent handoffs with bound decision tokens.
|
|
1370
|
+
|
|
1371
|
+
```bash
|
|
1372
|
+
pip install "agenticdome-python-sdk[smolagents]"
|
|
1373
|
+
```
|
|
1374
|
+
|
|
1375
|
+
```python
|
|
1376
|
+
from smolagents import CodeAgent, InferenceClientModel, tool
|
|
1377
|
+
from agenticdome_sdk.smolagents import AgenticDomeSmolagentsFirewall
|
|
1378
|
+
|
|
1379
|
+
@tool
|
|
1380
|
+
def lookup_customer(customer_id: str) -> str:
|
|
1381
|
+
"""Look up a customer by ID."""
|
|
1382
|
+
return crm_lookup(customer_id)
|
|
1383
|
+
|
|
1384
|
+
agent = CodeAgent(tools=[lookup_customer], model=InferenceClientModel())
|
|
1385
|
+
firewall = AgenticDomeSmolagentsFirewall()
|
|
1386
|
+
|
|
1387
|
+
result = firewall.run_agent_securely(
|
|
1388
|
+
agent,
|
|
1389
|
+
"Look up customer cust_123 for their active support case.",
|
|
1390
|
+
session_id="sess_prod_01J4X",
|
|
1391
|
+
agent_id="smol_support_agent",
|
|
1392
|
+
)
|
|
1393
|
+
```
|
|
1394
|
+
|
|
1395
|
+
`attach_firewall(agent, session_id=...)` is idempotent and can be used when another component owns `agent.run()`. For streaming, use `run_agent_stream_securely()` so event output is reviewed before it is yielded. Direct `agent.run()` after attachment still gets tool, code, managed-agent, and step-observation enforcement, but the application should use the secure run wrapper for final-output DLP.
|
|
1396
|
+
|
|
1397
|
+
```bash
|
|
1398
|
+
export AGENTICDOME_PLATFORM="smolagents"
|
|
1399
|
+
export AGENTICDOME_SMOLAGENTS_AGENT_ID="smol_support_agent"
|
|
1400
|
+
export AGENTICDOME_SMOLAGENTS_MAX_INPUT_CHARS="50000"
|
|
1401
|
+
export AGENTICDOME_SMOLAGENTS_MAX_OUTPUT_CHARS="100000"
|
|
1402
|
+
export AGENTICDOME_SMOLAGENTS_MAX_TOOL_ARG_CHARS="20000"
|
|
1403
|
+
export AGENTICDOME_SMOLAGENTS_STREAMING_BUFFER_CHARS="4000"
|
|
1404
|
+
export AGENTICDOME_SMOLAGENTS_RATE_LIMIT_PER_MINUTE="60"
|
|
1405
|
+
export AGENTICDOME_SMOLAGENTS_RETRY_ATTEMPTS="2"
|
|
1406
|
+
export AGENTICDOME_SMOLAGENTS_RETRY_BACKOFF_S="0.25"
|
|
1407
|
+
export AGENTICDOME_SMOLAGENTS_CIRCUIT_BREAKER_FAILURES="5"
|
|
1408
|
+
export AGENTICDOME_SMOLAGENTS_CIRCUIT_BREAKER_RESET_S="60"
|
|
1409
|
+
export AGENTICDOME_SMOLAGENTS_AUDIT_LOGGING="true"
|
|
1410
|
+
export AGENTICDOME_SMOLAGENTS_OTEL_ENABLED="true"
|
|
1411
|
+
export AGENTICDOME_SMOLAGENTS_EMERGENCY_BLOCK_TOOLS=""
|
|
1412
|
+
export AGENTICDOME_SMOLAGENTS_EMERGENCY_BLOCK_AGENTS=""
|
|
1413
|
+
export AGENTICDOME_SMOLAGENTS_STRICT_DELEGATED_EXECUTION="true"
|
|
1414
|
+
export AGENTICDOME_SMOLAGENTS_SCAN_CODE_EXPRESSIONS="true"
|
|
1415
|
+
```
|
|
1416
|
+
|
|
1417
|
+
Keep code-expression scanning enabled in production. It adds business-intent policy before smolagents' local or remote executor; it does not replace the executor's OS/container/WASM sandbox. The adapter intentionally sends generated code and serialized tool arguments to the configured AgenticDome sidecar, so place that sidecar within the approved trust boundary and apply normal data-residency controls.
|
|
1418
|
+
|
|
1419
|
+
Official references: [smolagents agents](https://huggingface.co/docs/smolagents/main/reference/agents) · [smolagents tools](https://huggingface.co/docs/smolagents/main/reference/tools)
|
|
1420
|
+
|
|
1421
|
+
---
|
|
1422
|
+
|
|
1272
1423
|
### Agno
|
|
1273
1424
|
|
|
1274
1425
|
Agno's Agent reference documents `pre_hooks`, `post_hooks`, and `tool_hooks`; the adapter attaches to those boundaries so policy is enforced before prompts/tools run and before output returns. Middleware/plugin-shaped helpers are available for applications that centralize hook registration.
|
|
@@ -2244,6 +2395,8 @@ python -m pytest -q tests/test_langgraph_integration.py
|
|
|
2244
2395
|
| Microsoft Agent Framework | `python -m pytest -q tests/test_microsoft_agent_framework_integration.py` | Tool/run boundaries, delegated tool verification, middleware install helpers, identity context, Copilot enforcement hooks, streaming output |
|
|
2245
2396
|
| Microsoft AI Foundry | `python -m pytest -q tests/test_microsoft_ai_foundry_integration.py` | Prompt threat contracts, local tool executors, run boundaries, bearer/API-key configuration, delegated execution, circuit breaker, stream DLP |
|
|
2246
2397
|
| OpenAI Agents SDK | `python -m pytest -q tests/test_openai_agents_integration.py` | Runner wrappers, guardrail helpers, function-tool wrappers, handoff/delegated tools, HMAC token storage, schema checks, retries, streaming output |
|
|
2398
|
+
| Claude Agent SDK | `python -m pytest -q tests/test_claude_integration.py` | Native prompt/tool hooks, tool-output replacement, secure query responses, decision-token binding and one-time consumption |
|
|
2399
|
+
| Hugging Face smolagents | `python -m pytest -q tests/test_smolagents_integration.py` | Native Tool wrapper, pre-execution CodeAgent scanning, idempotent attachment, managed-agent handoff verification, output DLP |
|
|
2247
2400
|
| Agno | `python -m pytest -q tests/test_agno_integration.py` | Agent/team hooks, tool hooks, middleware/plugin helpers, delegated specialist execution, retrieved text sanitization, schema checks, stream DLP |
|
|
2248
2401
|
| MCP host / gateway | `python -m pytest -q tests/test_mcp_host_integration.py` | JSON-RPC preflight, tool/resource/prompt authorization, private metadata stripping, delegated token verification, response filtering, forwarder DLP |
|
|
2249
2402
|
| AWS Bedrock | `python -m pytest -q tests/test_aws_bedrock_integration.py` | Converse/InvokeModel wrappers, Bedrock Agents streams, action-group Lambda wrappers, retrieval DLP, tool authorization, handoff tokens, retries |
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
`agenticdome-python-sdk` is the official Python SDK and middleware package for [AgenticDome](https://agenticdome.io). It enforces deterministic security controls at every boundary your agents cross — prompt ingress, tool execution, agent-to-agent handoffs, and output egress — backed by the AgenticDome central policy plane.
|
|
10
10
|
|
|
11
|
-
**One security pattern,
|
|
11
|
+
**One security pattern, fourteen runtimes:** CrewAI · PydanticAI · LangGraph/LangChain · Microsoft Agent Framework · Microsoft AI Foundry · OpenAI Agents SDK · Claude Agent SDK · Hugging Face smolagents · Agno · Google ADK · LlamaIndex · AWS Bedrock · MCP hosts/gateways · custom Python.
|
|
12
12
|
|
|
13
13
|
```python
|
|
14
14
|
# The 30-second version: block a prompt-injected refund before it executes.
|
|
@@ -195,6 +195,8 @@ pip install agenticdome-python-sdk
|
|
|
195
195
|
| Microsoft Agent Framework | `pip install "agenticdome-python-sdk[microsoft]"` |
|
|
196
196
|
| Microsoft AI Foundry | `pip install "agenticdome-python-sdk[foundry]"` |
|
|
197
197
|
| OpenAI Agents SDK | `pip install "agenticdome-python-sdk[openai-agents]"` |
|
|
198
|
+
| Anthropic Claude Agent SDK | `pip install "agenticdome-python-sdk[claude]"` |
|
|
199
|
+
| Hugging Face smolagents | `pip install "agenticdome-python-sdk[smolagents]"` |
|
|
198
200
|
| Agno | `pip install "agenticdome-python-sdk[agno]"` |
|
|
199
201
|
| Google ADK | `pip install "agenticdome-python-sdk[google-adk]"` |
|
|
200
202
|
| LlamaIndex | `pip install "agenticdome-python-sdk[llamaindex]"` |
|
|
@@ -303,7 +305,7 @@ export AGENTICDOME_PRODUCTION_MODE="false" # production hardening (st
|
|
|
303
305
|
<details>
|
|
304
306
|
<summary><strong>Full configuration reference — per-adapter variables</strong></summary>
|
|
305
307
|
|
|
306
|
-
Every framework adapter exposes the same family of local hardening controls, prefixed per adapter: `AGENTICDOME_CREWAI_*`, `AGENTICDOME_PYDANTICAI_*`, `AGENTICDOME_LANGGRAPH_*`, `AGENTICDOME_MSAF_*` (Microsoft Agent Framework), `AGENTICDOME_FOUNDRY_*`, `AGENTICDOME_OPENAI_AGENTS_*`, `AGENTICDOME_AGNO_*`, `AGENTICDOME_BEDROCK_*`, `AGENTICDOME_GOOGLE_ADK_*`, and `AGENTICDOME_MCP_*`.
|
|
308
|
+
Every framework adapter exposes the same family of local hardening controls, prefixed per adapter: `AGENTICDOME_CREWAI_*`, `AGENTICDOME_PYDANTICAI_*`, `AGENTICDOME_LANGGRAPH_*`, `AGENTICDOME_MSAF_*` (Microsoft Agent Framework), `AGENTICDOME_FOUNDRY_*`, `AGENTICDOME_OPENAI_AGENTS_*`, `AGENTICDOME_CLAUDE_*`, `AGENTICDOME_SMOLAGENTS_*`, `AGENTICDOME_AGNO_*`, `AGENTICDOME_BEDROCK_*`, `AGENTICDOME_GOOGLE_ADK_*`, and `AGENTICDOME_MCP_*`.
|
|
307
309
|
|
|
308
310
|
**Common per-adapter pattern** (substitute the prefix for your adapter):
|
|
309
311
|
|
|
@@ -330,6 +332,11 @@ Every framework adapter exposes the same family of local hardening controls, pre
|
|
|
330
332
|
| `AGENTICDOME_LANGGRAPH_AGENT_ID` | string | `langgraph_orchestrator` | Default LangGraph orchestrator node identity. |
|
|
331
333
|
| `AGENTICDOME_LANGGRAPH_FINAL_ID` | string | `langgraph_final_node` | Default LangGraph final-output node identity. |
|
|
332
334
|
| `AGENTICDOME_LANGGRAPH_REQUIRE_SERVER_TOKENS` | boolean | `false` | Requires handoff authorization responses to include server-issued decision tokens. |
|
|
335
|
+
| `AGENTICDOME_CLAUDE_AGENT_ID` | string | `claude_agent` | Default Claude Agent SDK identity. |
|
|
336
|
+
| `AGENTICDOME_CLAUDE_STRICT_DELEGATED_EXECUTION` | boolean | `true` | Requires server-issued decision tokens for Claude multi-agent handoffs. |
|
|
337
|
+
| `AGENTICDOME_SMOLAGENTS_AGENT_ID` | string | `smolagent` | Default smolagents identity. |
|
|
338
|
+
| `AGENTICDOME_SMOLAGENTS_SCAN_CODE_EXPRESSIONS` | boolean | `true` | Reviews CodeAgent-generated Python immediately before executor invocation. |
|
|
339
|
+
| `AGENTICDOME_SMOLAGENTS_STRICT_DELEGATED_EXECUTION` | boolean | `true` | Authorizes and verifies managed-agent handoffs using bound decision tokens. |
|
|
333
340
|
| `AGENTICDOME_LANGGRAPH_STRICT_DELEGATED_EXECUTION` | boolean | `true` | Blocks delegated executions that carry delegation metadata without a valid token. |
|
|
334
341
|
| `AGENTICDOME_FOUNDRY_REQUIRE_OUTPUT_SANITIZATION_IN_PROD` | boolean | `true` | Requires API-key-backed Mesh output sanitization when Foundry production mode is enabled. |
|
|
335
342
|
| `AGENTICDOME_BEDROCK_AGENT_ID` | string | `aws_bedrock_agent` | Default agent identity for Bedrock runtime calls and local action handlers. |
|
|
@@ -378,6 +385,8 @@ One table, one decision. Find your runtime, apply the required code action, and
|
|
|
378
385
|
| [Microsoft Agent Framework](#microsoft-agent-framework) | `agenticdome_sdk.microsoft_agent_framework` | Module where agents, workflows, tools, or middleware are declared | `create_middleware()`, `install_on_agent()`, or `run_agent_securely()` | `@firewall.secure_tool`, `wrap_tool_handler`, `secure_delegated_tool`, `wrap_delegated_tool_handler` |
|
|
379
386
|
| [Microsoft AI Foundry](#microsoft-ai-foundry) | `agenticdome_sdk.microsoft_ai_foundry` | Module handling Foundry runs, function calls, or client construction | `create_middleware()`, `install_on_client()`, or `run_secure()` | `wrap_tool_executor()`, `@firewall.secure_tool(...)`, `before_tool_call()`, delegation verifiers |
|
|
380
387
|
| [OpenAI Agents SDK](#openai-agents-sdk) | `agenticdome_sdk.openai_agents` | Module where `Agent`, `Runner.run(...)`, `@function_tool`, guardrails, or handoffs are declared | `run_agent_securely()`, `run_agent_stream_securely()`, `create_input_guardrail()`, `create_output_guardrail()` | `wrap_tool_handler()`, `wrap_delegated_tool_handler()`, `@firewall.secure_tool(...)`, handoff verifiers |
|
|
388
|
+
| [Claude Agent SDK](#claude-agent-sdk) | `agenticdome_sdk.claude` | Module constructing `ClaudeAgentOptions`, `ClaudeSDKClient`, SDK MCP tools, or `query()` | `install_on_options()` plus `run_client_securely()`, or `secure_query()` | Native `PreToolUse`/`PostToolUse` hooks, `wrap_tool_handler()`, and `secure_sdk_tool()` |
|
|
389
|
+
| [smolagents](#hugging-face-smolagents) | `agenticdome_sdk.smolagents` | Module constructing `CodeAgent`, `ToolCallingAgent`, tools, or managed agents | `run_agent_securely()` or `attach_firewall()` | Native `Tool` wrappers, CodeAgent executor proxy, observation callback, and managed-agent token verification |
|
|
381
390
|
| [Agno](#agno) | `agenticdome_sdk.agno` | Module where `Agent`, Team, Workflow, or AgentOS components are declared | `attach_firewall(agent_or_team)`, `create_hook_bundle()`, `create_middleware()`, or `create_plugin()` | `@firewall.secure_tool(...)` for high-risk local tools |
|
|
382
391
|
| [Google ADK](#google-adk) | `agenticdome_sdk.google_adk` | Module where `LlmAgent(...)` or ADK plugins are declared | `build_callback_kwargs()`, `create_plugin()`, or `install_on_agent(...)` | `wrap_tool_handler()` or `@firewall.secure_tool(...)` |
|
|
383
392
|
| [LlamaIndex](#llamaindex) | `agenticdome_sdk.llamaindex` | Module where tools, query engines, retrievers, callbacks, or agents are assembled | `run_query_securely()`, `wrap_query_engine()`, `wrap_retriever()`, `create_node_postprocessor()`, `create_callback_handler()` | `wrap_tool_function()`, `to_function_tool()`, `@firewall.secure_tool(...)`, handoff verifiers |
|
|
@@ -1178,6 +1187,138 @@ from agenticdome_sdk.openai_agents import (
|
|
|
1178
1187
|
|
|
1179
1188
|
---
|
|
1180
1189
|
|
|
1190
|
+
### Claude Agent SDK
|
|
1191
|
+
|
|
1192
|
+
The adapter uses Claude Agent SDK's native hook contract for prompt submission, pre-tool permission decisions, and post-tool output replacement. It also wraps the asynchronous `query()` and `ClaudeSDKClient.receive_response()` pipelines so final assistant text is reviewed before your application returns it.
|
|
1193
|
+
|
|
1194
|
+
```bash
|
|
1195
|
+
pip install "agenticdome-python-sdk[claude]"
|
|
1196
|
+
```
|
|
1197
|
+
|
|
1198
|
+
**Secure a `ClaudeSDKClient` and its built-in/MCP tools:**
|
|
1199
|
+
|
|
1200
|
+
```python
|
|
1201
|
+
from claude_agent_sdk import ClaudeAgentOptions, ClaudeSDKClient
|
|
1202
|
+
from agenticdome_sdk.claude import AgenticDomeClaudeFirewall
|
|
1203
|
+
|
|
1204
|
+
firewall = AgenticDomeClaudeFirewall()
|
|
1205
|
+
options = ClaudeAgentOptions(allowed_tools=["Read", "mcp__crm__lookup"])
|
|
1206
|
+
firewall.install_on_options(
|
|
1207
|
+
options,
|
|
1208
|
+
session_id="sess_prod_01J4X",
|
|
1209
|
+
agent_id="claude_support_agent",
|
|
1210
|
+
)
|
|
1211
|
+
|
|
1212
|
+
async with ClaudeSDKClient(options=options) as client:
|
|
1213
|
+
async for message in firewall.run_client_securely(
|
|
1214
|
+
client,
|
|
1215
|
+
"Look up the customer's active support case.",
|
|
1216
|
+
session_id="sess_prod_01J4X",
|
|
1217
|
+
agent_id="claude_support_agent",
|
|
1218
|
+
):
|
|
1219
|
+
consume(message)
|
|
1220
|
+
```
|
|
1221
|
+
|
|
1222
|
+
For the one-shot API, iterate `firewall.secure_query(prompt, session_id=..., options=...)`. If the run may execute built-in tools, install the returned hook matchers on its options as well; `secure_query()` itself covers ingress and returned messages.
|
|
1223
|
+
|
|
1224
|
+
**Compose with Claude's native SDK MCP `@tool`:**
|
|
1225
|
+
|
|
1226
|
+
```python
|
|
1227
|
+
@firewall.secure_sdk_tool(
|
|
1228
|
+
"lookup_customer",
|
|
1229
|
+
"Look up a customer support profile",
|
|
1230
|
+
{"customer_id": str},
|
|
1231
|
+
session_id="sess_prod_01J4X",
|
|
1232
|
+
agent_id="claude_support_agent",
|
|
1233
|
+
tool_platform="crm",
|
|
1234
|
+
)
|
|
1235
|
+
async def lookup_customer(args):
|
|
1236
|
+
return {"content": [{"type": "text", "text": crm_lookup(args["customer_id"])}]}
|
|
1237
|
+
```
|
|
1238
|
+
|
|
1239
|
+
The `PreToolUse` hook returns Claude's native `permissionDecision: deny` response before local side effects. If policy supplies sanitized arguments, it returns `updatedInput`. The `PostToolUse` hook uses `updatedToolOutput` so DLP-reviewed tool data is what the model sees.
|
|
1240
|
+
|
|
1241
|
+
```bash
|
|
1242
|
+
export AGENTICDOME_PLATFORM="claude_agent_sdk"
|
|
1243
|
+
export AGENTICDOME_CLAUDE_AGENT_ID="claude_support_agent"
|
|
1244
|
+
export AGENTICDOME_CLAUDE_MAX_INPUT_CHARS="50000"
|
|
1245
|
+
export AGENTICDOME_CLAUDE_MAX_OUTPUT_CHARS="100000"
|
|
1246
|
+
export AGENTICDOME_CLAUDE_MAX_TOOL_ARG_CHARS="20000"
|
|
1247
|
+
export AGENTICDOME_CLAUDE_STREAMING_BUFFER_CHARS="4000"
|
|
1248
|
+
export AGENTICDOME_CLAUDE_RATE_LIMIT_PER_MINUTE="60"
|
|
1249
|
+
export AGENTICDOME_CLAUDE_RETRY_ATTEMPTS="2"
|
|
1250
|
+
export AGENTICDOME_CLAUDE_RETRY_BACKOFF_S="0.25"
|
|
1251
|
+
export AGENTICDOME_CLAUDE_CIRCUIT_BREAKER_FAILURES="5"
|
|
1252
|
+
export AGENTICDOME_CLAUDE_CIRCUIT_BREAKER_RESET_S="60"
|
|
1253
|
+
export AGENTICDOME_CLAUDE_AUDIT_LOGGING="true"
|
|
1254
|
+
export AGENTICDOME_CLAUDE_OTEL_ENABLED="true"
|
|
1255
|
+
export AGENTICDOME_CLAUDE_STRICT_DELEGATED_EXECUTION="true"
|
|
1256
|
+
export AGENTICDOME_CLAUDE_EMERGENCY_BLOCK_TOOLS=""
|
|
1257
|
+
export AGENTICDOME_CLAUDE_EMERGENCY_BLOCK_AGENTS=""
|
|
1258
|
+
```
|
|
1259
|
+
|
|
1260
|
+
Use `authorize_manager_handoff()` and `verify_specialist_execution()` when a manager delegates sensitive work. Configure Redis and `AGENTICDOME_TOKEN_HMAC_SECRET` when authorization and specialist execution can land on different workers. Claude hooks protect operations visible to the local SDK process; externally hosted services still require enforcement at their local gateway or MCP host.
|
|
1261
|
+
|
|
1262
|
+
Official references: [Claude Agent SDK Python](https://github.com/anthropics/claude-agent-sdk-python) · [Claude Agent SDK overview](https://platform.claude.com/docs/en/agent-sdk/overview)
|
|
1263
|
+
|
|
1264
|
+
---
|
|
1265
|
+
|
|
1266
|
+
### Hugging Face smolagents
|
|
1267
|
+
|
|
1268
|
+
smolagents `CodeAgent` generates Python and invokes `python_executor(code)` before step callbacks run. The adapter therefore wraps the executor itself, wraps every native `Tool`, sanitizes step observations before the next model turn, and enforces managed-agent handoffs with bound decision tokens.
|
|
1269
|
+
|
|
1270
|
+
```bash
|
|
1271
|
+
pip install "agenticdome-python-sdk[smolagents]"
|
|
1272
|
+
```
|
|
1273
|
+
|
|
1274
|
+
```python
|
|
1275
|
+
from smolagents import CodeAgent, InferenceClientModel, tool
|
|
1276
|
+
from agenticdome_sdk.smolagents import AgenticDomeSmolagentsFirewall
|
|
1277
|
+
|
|
1278
|
+
@tool
|
|
1279
|
+
def lookup_customer(customer_id: str) -> str:
|
|
1280
|
+
"""Look up a customer by ID."""
|
|
1281
|
+
return crm_lookup(customer_id)
|
|
1282
|
+
|
|
1283
|
+
agent = CodeAgent(tools=[lookup_customer], model=InferenceClientModel())
|
|
1284
|
+
firewall = AgenticDomeSmolagentsFirewall()
|
|
1285
|
+
|
|
1286
|
+
result = firewall.run_agent_securely(
|
|
1287
|
+
agent,
|
|
1288
|
+
"Look up customer cust_123 for their active support case.",
|
|
1289
|
+
session_id="sess_prod_01J4X",
|
|
1290
|
+
agent_id="smol_support_agent",
|
|
1291
|
+
)
|
|
1292
|
+
```
|
|
1293
|
+
|
|
1294
|
+
`attach_firewall(agent, session_id=...)` is idempotent and can be used when another component owns `agent.run()`. For streaming, use `run_agent_stream_securely()` so event output is reviewed before it is yielded. Direct `agent.run()` after attachment still gets tool, code, managed-agent, and step-observation enforcement, but the application should use the secure run wrapper for final-output DLP.
|
|
1295
|
+
|
|
1296
|
+
```bash
|
|
1297
|
+
export AGENTICDOME_PLATFORM="smolagents"
|
|
1298
|
+
export AGENTICDOME_SMOLAGENTS_AGENT_ID="smol_support_agent"
|
|
1299
|
+
export AGENTICDOME_SMOLAGENTS_MAX_INPUT_CHARS="50000"
|
|
1300
|
+
export AGENTICDOME_SMOLAGENTS_MAX_OUTPUT_CHARS="100000"
|
|
1301
|
+
export AGENTICDOME_SMOLAGENTS_MAX_TOOL_ARG_CHARS="20000"
|
|
1302
|
+
export AGENTICDOME_SMOLAGENTS_STREAMING_BUFFER_CHARS="4000"
|
|
1303
|
+
export AGENTICDOME_SMOLAGENTS_RATE_LIMIT_PER_MINUTE="60"
|
|
1304
|
+
export AGENTICDOME_SMOLAGENTS_RETRY_ATTEMPTS="2"
|
|
1305
|
+
export AGENTICDOME_SMOLAGENTS_RETRY_BACKOFF_S="0.25"
|
|
1306
|
+
export AGENTICDOME_SMOLAGENTS_CIRCUIT_BREAKER_FAILURES="5"
|
|
1307
|
+
export AGENTICDOME_SMOLAGENTS_CIRCUIT_BREAKER_RESET_S="60"
|
|
1308
|
+
export AGENTICDOME_SMOLAGENTS_AUDIT_LOGGING="true"
|
|
1309
|
+
export AGENTICDOME_SMOLAGENTS_OTEL_ENABLED="true"
|
|
1310
|
+
export AGENTICDOME_SMOLAGENTS_EMERGENCY_BLOCK_TOOLS=""
|
|
1311
|
+
export AGENTICDOME_SMOLAGENTS_EMERGENCY_BLOCK_AGENTS=""
|
|
1312
|
+
export AGENTICDOME_SMOLAGENTS_STRICT_DELEGATED_EXECUTION="true"
|
|
1313
|
+
export AGENTICDOME_SMOLAGENTS_SCAN_CODE_EXPRESSIONS="true"
|
|
1314
|
+
```
|
|
1315
|
+
|
|
1316
|
+
Keep code-expression scanning enabled in production. It adds business-intent policy before smolagents' local or remote executor; it does not replace the executor's OS/container/WASM sandbox. The adapter intentionally sends generated code and serialized tool arguments to the configured AgenticDome sidecar, so place that sidecar within the approved trust boundary and apply normal data-residency controls.
|
|
1317
|
+
|
|
1318
|
+
Official references: [smolagents agents](https://huggingface.co/docs/smolagents/main/reference/agents) · [smolagents tools](https://huggingface.co/docs/smolagents/main/reference/tools)
|
|
1319
|
+
|
|
1320
|
+
---
|
|
1321
|
+
|
|
1181
1322
|
### Agno
|
|
1182
1323
|
|
|
1183
1324
|
Agno's Agent reference documents `pre_hooks`, `post_hooks`, and `tool_hooks`; the adapter attaches to those boundaries so policy is enforced before prompts/tools run and before output returns. Middleware/plugin-shaped helpers are available for applications that centralize hook registration.
|
|
@@ -2153,6 +2294,8 @@ python -m pytest -q tests/test_langgraph_integration.py
|
|
|
2153
2294
|
| Microsoft Agent Framework | `python -m pytest -q tests/test_microsoft_agent_framework_integration.py` | Tool/run boundaries, delegated tool verification, middleware install helpers, identity context, Copilot enforcement hooks, streaming output |
|
|
2154
2295
|
| Microsoft AI Foundry | `python -m pytest -q tests/test_microsoft_ai_foundry_integration.py` | Prompt threat contracts, local tool executors, run boundaries, bearer/API-key configuration, delegated execution, circuit breaker, stream DLP |
|
|
2155
2296
|
| OpenAI Agents SDK | `python -m pytest -q tests/test_openai_agents_integration.py` | Runner wrappers, guardrail helpers, function-tool wrappers, handoff/delegated tools, HMAC token storage, schema checks, retries, streaming output |
|
|
2297
|
+
| Claude Agent SDK | `python -m pytest -q tests/test_claude_integration.py` | Native prompt/tool hooks, tool-output replacement, secure query responses, decision-token binding and one-time consumption |
|
|
2298
|
+
| Hugging Face smolagents | `python -m pytest -q tests/test_smolagents_integration.py` | Native Tool wrapper, pre-execution CodeAgent scanning, idempotent attachment, managed-agent handoff verification, output DLP |
|
|
2156
2299
|
| Agno | `python -m pytest -q tests/test_agno_integration.py` | Agent/team hooks, tool hooks, middleware/plugin helpers, delegated specialist execution, retrieved text sanitization, schema checks, stream DLP |
|
|
2157
2300
|
| MCP host / gateway | `python -m pytest -q tests/test_mcp_host_integration.py` | JSON-RPC preflight, tool/resource/prompt authorization, private metadata stripping, delegated token verification, response filtering, forwarder DLP |
|
|
2158
2301
|
| AWS Bedrock | `python -m pytest -q tests/test_aws_bedrock_integration.py` | Converse/InvokeModel wrappers, Bedrock Agents streams, action-group Lambda wrappers, retrieval DLP, tool authorization, handoff tokens, retries |
|