agenticdome-python-sdk 1.2.13__tar.gz → 1.2.14__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.13 → agenticdome_python_sdk-1.2.14}/PKG-INFO +1 -1
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_python_sdk.egg-info/PKG-INFO +1 -1
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/agno.md +33 -8
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/autogen.md +22 -7
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/aws-bedrock.md +28 -11
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/claude-agent-sdk.md +29 -9
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/crewai.md +15 -4
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/custom-python.md +39 -23
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/google-adk.md +22 -7
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/langgraph.md +32 -10
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/llamaindex.md +33 -14
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/microsoft-agent-framework.md +27 -8
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/microsoft-ai-foundry.md +27 -8
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/openai-agents.md +34 -13
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/pydanticai.md +30 -9
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/smolagents.md +22 -9
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/pyproject.toml +1 -1
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_framework_guides.py +41 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/CONTRIBUTING.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/LICENSE +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/MANIFEST.in +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/NOTICE +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/README.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/SECURITY.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_python_sdk.egg-info/SOURCES.txt +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_python_sdk.egg-info/dependency_links.txt +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_python_sdk.egg-info/entry_points.txt +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_python_sdk.egg-info/requires.txt +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_python_sdk.egg-info/top_level.txt +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/__init__.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/_framework_firewall.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/_mode.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/agno.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/autogen.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/aws_bedrock.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/claude.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/client.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/crewai.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/demo.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/google_adk.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/identity.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/langgraph.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/llamaindex.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/mcp_host.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/microsoft_agent_framework.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/microsoft_ai_foundry.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/openai_agents.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/proof.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/pydantic.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/simulation.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/smolagents.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/README.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/mcp-integration.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/performance-evidence.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/PRODUCTION_INTEGRATION.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/README.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/attack_demo.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/crewai_agenticdome_firewall.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/README.md +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/_shared.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/agno.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/autogen.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/aws_bedrock.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/claude_agent_sdk.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/crewai.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/custom_python.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/google_adk.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/langgraph.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/llamaindex.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/mcp.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/microsoft_agent_framework.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/microsoft_ai_foundry.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/openai_agents.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/pydanticai.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/smolagents.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/langgraph_agenticdome_firewall.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/local_simulation_gallery.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/mcp_gateway_action_firewall.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/setup.cfg +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/setup.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_agno_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_attack_demo.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_autogen_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_aws_bedrock_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_claude_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_client.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_crewai_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_execution_broker.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_google_adk_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_identity_context.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_langgraph_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_llamaindex_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_local_simulation.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_mcp_host_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_mcp_launch_example.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_microsoft_agent_framework_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_microsoft_ai_foundry_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_openai_agents_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_pydanticai_integration.py +0 -0
- {agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_smolagents_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.14
|
|
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-Expression: Apache-2.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.14
|
|
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-Expression: Apache-2.0
|
|
@@ -14,18 +14,43 @@ agenticdome-demo --framework agno --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime, and make sure simulation is not inherited by
|
|
18
|
+
the production process:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
unset AGENTICDOME_MODE
|
|
22
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
23
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
24
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
This factory receives the application-owned model and CRM operation explicitly,
|
|
28
|
+
defines the secured tool before registration, then attaches hooks before the
|
|
29
|
+
agent's first run:
|
|
30
|
+
|
|
17
31
|
```python
|
|
32
|
+
from typing import Any, Callable, Tuple
|
|
33
|
+
|
|
34
|
+
from agno.agent import Agent
|
|
18
35
|
from agenticdome_sdk.agno import AgenticDomeAgnoFirewall
|
|
19
36
|
|
|
20
|
-
|
|
21
|
-
|
|
37
|
+
def build_secured_agent(
|
|
38
|
+
*,
|
|
39
|
+
model: Any,
|
|
40
|
+
crm_lookup: Callable[[str], Any],
|
|
41
|
+
) -> Tuple[Any, AgenticDomeAgnoFirewall]:
|
|
42
|
+
firewall = AgenticDomeAgnoFirewall()
|
|
43
|
+
|
|
44
|
+
@firewall.secure_tool(
|
|
45
|
+
tool_name="crm.customer.read",
|
|
46
|
+
tool_platform="crm",
|
|
47
|
+
)
|
|
48
|
+
def read_customer(agent_context: Any, customer_id: str) -> Any:
|
|
49
|
+
return crm_lookup(customer_id)
|
|
22
50
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
)
|
|
27
|
-
def read_customer(agent, customer_id: str):
|
|
28
|
-
return crm.read_customer(customer_id)
|
|
51
|
+
agent = Agent(name="support-agent", model=model, tools=[read_customer])
|
|
52
|
+
firewall.attach_firewall(agent)
|
|
53
|
+
return agent, firewall
|
|
29
54
|
```
|
|
30
55
|
|
|
31
56
|
Use `create_hook_bundle()`, `create_middleware()` or `create_plugin()` when the
|
|
@@ -14,16 +14,31 @@ agenticdome-demo --framework autogen --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned team and task into an async boundary rather than
|
|
27
|
+
copying a top-level `await` statement:
|
|
28
|
+
|
|
17
29
|
```python
|
|
30
|
+
from typing import Any
|
|
31
|
+
|
|
18
32
|
from agenticdome_sdk.autogen import AgenticDomeAutoGenFirewall
|
|
19
33
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
34
|
+
async def run_secured_team(*, team: Any, user_prompt: str) -> Any:
|
|
35
|
+
firewall = AgenticDomeAutoGenFirewall()
|
|
36
|
+
secure_team = firewall.wrap_team(
|
|
37
|
+
team,
|
|
38
|
+
session_id="stable-session-id",
|
|
39
|
+
agent_id="operations-team",
|
|
40
|
+
)
|
|
41
|
+
return await secure_team.run(task=user_prompt)
|
|
27
42
|
```
|
|
28
43
|
|
|
29
44
|
For AutoGen Core, install `create_intervention_handler(...)` when constructing
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/aws-bedrock.md
RENAMED
|
@@ -14,20 +14,37 @@ agenticdome-demo --framework bedrock --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Create the application-owned boto3 client in your AWS bootstrap, then pass it
|
|
27
|
+
and the real request into this async boundary:
|
|
28
|
+
|
|
17
29
|
```python
|
|
18
|
-
import
|
|
19
|
-
from agenticdome_sdk.aws_bedrock import AgenticDomeAWSBedrockFirewall
|
|
30
|
+
from typing import Any, Dict, List
|
|
20
31
|
|
|
21
|
-
|
|
22
|
-
firewall = AgenticDomeAWSBedrockFirewall()
|
|
32
|
+
from agenticdome_sdk.aws_bedrock import AgenticDomeAWSBedrockFirewall
|
|
23
33
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
)
|
|
34
|
+
async def converse_with_policy(
|
|
35
|
+
*,
|
|
36
|
+
bedrock_runtime_client: Any,
|
|
37
|
+
model_id: str,
|
|
38
|
+
messages: List[Dict[str, Any]],
|
|
39
|
+
) -> Any:
|
|
40
|
+
firewall = AgenticDomeAWSBedrockFirewall()
|
|
41
|
+
return await firewall.converse_securely(
|
|
42
|
+
bedrock_runtime_client=bedrock_runtime_client,
|
|
43
|
+
model_id=model_id,
|
|
44
|
+
messages=messages,
|
|
45
|
+
agent_id="support-agent",
|
|
46
|
+
session_id="stable-session-id",
|
|
47
|
+
)
|
|
31
48
|
```
|
|
32
49
|
|
|
33
50
|
Use the corresponding secure methods for streaming, `InvokeModel` and Bedrock
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/claude-agent-sdk.md
RENAMED
|
@@ -14,19 +14,39 @@ agenticdome-demo --framework claude --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned options and message consumer explicitly. Keeping
|
|
27
|
+
the async iterator inside a function makes the example valid Python:
|
|
28
|
+
|
|
17
29
|
```python
|
|
30
|
+
from typing import Any, Callable
|
|
31
|
+
|
|
18
32
|
from agenticdome_sdk.claude import AgenticDomeClaudeFirewall
|
|
19
33
|
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
async def run_secured_query(
|
|
35
|
+
*,
|
|
36
|
+
options: Any,
|
|
37
|
+
user_prompt: str,
|
|
38
|
+
consume: Callable[[Any], None],
|
|
39
|
+
) -> None:
|
|
40
|
+
firewall = AgenticDomeClaudeFirewall()
|
|
41
|
+
secured_options = firewall.install_on_options(options)
|
|
22
42
|
|
|
23
|
-
async for message in firewall.secure_query(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
):
|
|
29
|
-
|
|
43
|
+
async for message in firewall.secure_query(
|
|
44
|
+
prompt=user_prompt,
|
|
45
|
+
options=secured_options,
|
|
46
|
+
session_id="stable-session-id",
|
|
47
|
+
agent_id="support-agent",
|
|
48
|
+
):
|
|
49
|
+
consume(message)
|
|
30
50
|
```
|
|
31
51
|
|
|
32
52
|
Use `run_client_securely(...)` for a constructed SDK client and
|
|
@@ -18,15 +18,26 @@ contacting a sidecar or executing either demonstration tool.
|
|
|
18
18
|
## Attach in production
|
|
19
19
|
|
|
20
20
|
Configure the assigned runtime sidecar URL, Runtime/SDK key and matching tenant
|
|
21
|
-
ID,
|
|
22
|
-
|
|
21
|
+
ID, and make sure simulation is not inherited by the production process:
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
unset AGENTICDOME_MODE
|
|
25
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
26
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
27
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Then import the adapter in application bootstrap **before** constructing the
|
|
31
|
+
application-owned agents or crews:
|
|
23
32
|
|
|
24
33
|
```python
|
|
25
34
|
import agenticdome_sdk.crewai # registers the process-wide hooks
|
|
26
35
|
|
|
27
|
-
from crewai import
|
|
36
|
+
from crewai import Crew
|
|
28
37
|
|
|
29
|
-
|
|
38
|
+
def build_secured_crew(*, agents: list, tasks: list) -> Crew:
|
|
39
|
+
# Agents and tasks are constructed by the application after hooks load.
|
|
40
|
+
return Crew(agents=agents, tasks=tasks)
|
|
30
41
|
```
|
|
31
42
|
|
|
32
43
|
For explicit lifecycle control, instantiate `AgenticDomeCrewAIFirewall` and
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/custom-python.md
RENAMED
|
@@ -14,32 +14,48 @@ agenticdome-demo --framework custom-python --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first. The executor remains application-owned:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
17
26
|
```python
|
|
27
|
+
from typing import Any, Callable, Dict
|
|
28
|
+
|
|
18
29
|
from agenticdome_sdk import AgentGuardClient
|
|
19
30
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
31
|
+
def secured_customer_lookup(
|
|
32
|
+
*,
|
|
33
|
+
customer_id: str,
|
|
34
|
+
execute_customer_lookup: Callable[[str], Any],
|
|
35
|
+
) -> Dict[str, Any]:
|
|
36
|
+
client = AgentGuardClient()
|
|
37
|
+
decision = client.guardrail_validate(
|
|
38
|
+
text="Support agent requests a customer lookup.",
|
|
39
|
+
agent_id="support-agent",
|
|
40
|
+
session_id="stable-session-id",
|
|
41
|
+
direction="outbound",
|
|
42
|
+
platform="python",
|
|
43
|
+
tool_name="crm.customer.read",
|
|
44
|
+
tool_args={"customer_id": customer_id},
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
if decision.get("verdict") == "BLOCKED":
|
|
48
|
+
raise PermissionError(decision.get("reason", "Action blocked"))
|
|
49
|
+
|
|
50
|
+
effective_args = decision.get("sanitized_tool_args") or {"customer_id": customer_id}
|
|
51
|
+
raw_output = execute_customer_lookup(str(effective_args["customer_id"]))
|
|
52
|
+
return client.mesh_validate(
|
|
53
|
+
agent_id="support-agent",
|
|
54
|
+
session_id="stable-session-id",
|
|
55
|
+
direction="output",
|
|
56
|
+
platform="python",
|
|
57
|
+
text=str(raw_output),
|
|
58
|
+
)
|
|
43
59
|
```
|
|
44
60
|
|
|
45
61
|
Use the A2A authorization and verification methods when a manager delegates a
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/google-adk.md
RENAMED
|
@@ -14,17 +14,32 @@ agenticdome-demo --framework google-adk --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned model into the same factory that constructs every
|
|
27
|
+
protected ADK agent:
|
|
28
|
+
|
|
17
29
|
```python
|
|
30
|
+
from typing import Any
|
|
31
|
+
|
|
18
32
|
from google.adk.agents import LlmAgent
|
|
19
33
|
from agenticdome_sdk.google_adk import AgenticDomeGoogleADKFirewall
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
35
|
+
def build_secured_agent(*, model: Any) -> LlmAgent:
|
|
36
|
+
firewall = AgenticDomeGoogleADKFirewall()
|
|
37
|
+
return LlmAgent(
|
|
38
|
+
name="support-agent",
|
|
39
|
+
model=model,
|
|
40
|
+
instruction="Help support users safely.",
|
|
41
|
+
**firewall.build_callback_kwargs(),
|
|
42
|
+
)
|
|
28
43
|
```
|
|
29
44
|
|
|
30
45
|
Use `install_on_agent(...)` for an existing agent, `create_plugin()` for
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/langgraph.md
RENAMED
|
@@ -14,20 +14,42 @@ agenticdome-demo --framework langgraph --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned agent and tool nodes into the graph factory; do not
|
|
27
|
+
leave raw execution nodes reachable through another edge:
|
|
28
|
+
|
|
17
29
|
```python
|
|
30
|
+
from typing import Any, Callable
|
|
31
|
+
|
|
18
32
|
from langgraph.graph import START, StateGraph
|
|
19
33
|
from agenticdome_sdk.langgraph import AgentState, AgenticDomeLangGraphFirewall
|
|
20
34
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
graph
|
|
28
|
-
graph.
|
|
29
|
-
|
|
30
|
-
|
|
35
|
+
def build_secured_graph(
|
|
36
|
+
*,
|
|
37
|
+
agent_node: Callable[[AgentState], Any],
|
|
38
|
+
tool_node: Callable[[AgentState], Any],
|
|
39
|
+
) -> Any:
|
|
40
|
+
firewall = AgenticDomeLangGraphFirewall()
|
|
41
|
+
graph = StateGraph(AgentState)
|
|
42
|
+
graph.add_node("input_security", firewall.input_node(agent_id="support"))
|
|
43
|
+
graph.add_node("agent", agent_node)
|
|
44
|
+
graph.add_node("tool_security", firewall.transition_node(agent_id="support"))
|
|
45
|
+
graph.add_node("tools", tool_node)
|
|
46
|
+
graph.add_node("output_security", firewall.output_node(agent_id="support"))
|
|
47
|
+
graph.add_edge(START, "input_security")
|
|
48
|
+
graph.add_edge("input_security", "agent")
|
|
49
|
+
graph.add_edge("agent", "tool_security")
|
|
50
|
+
graph.add_edge("tool_security", "tools")
|
|
51
|
+
graph.add_edge("tools", "output_security")
|
|
52
|
+
return graph.compile()
|
|
31
53
|
```
|
|
32
54
|
|
|
33
55
|
Alternatively use `wrap_agent_node()`, `wrap_tool_node()`, or
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/llamaindex.md
RENAMED
|
@@ -14,23 +14,42 @@ agenticdome-demo --framework llamaindex --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned lookup function and query engine into the assembly
|
|
27
|
+
function instead of relying on undeclared example globals:
|
|
28
|
+
|
|
17
29
|
```python
|
|
30
|
+
from typing import Any, Callable, Tuple
|
|
31
|
+
|
|
18
32
|
from agenticdome_sdk.llamaindex import AgenticDomeLlamaIndexFirewall
|
|
19
33
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
lookup_customer,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
def build_secured_rag(
|
|
35
|
+
*,
|
|
36
|
+
lookup_customer: Callable[..., Any],
|
|
37
|
+
query_engine: Any,
|
|
38
|
+
) -> Tuple[Any, Any]:
|
|
39
|
+
firewall = AgenticDomeLlamaIndexFirewall()
|
|
40
|
+
secure_lookup = firewall.to_function_tool(
|
|
41
|
+
lookup_customer,
|
|
42
|
+
tool_name="crm.customer.read",
|
|
43
|
+
tool_platform="crm",
|
|
44
|
+
agent_id="support-agent",
|
|
45
|
+
session_id="stable-session-id",
|
|
46
|
+
)
|
|
47
|
+
secure_query_engine = firewall.wrap_query_engine(
|
|
48
|
+
query_engine,
|
|
49
|
+
agent_id="support-agent",
|
|
50
|
+
session_id="stable-session-id",
|
|
51
|
+
)
|
|
52
|
+
return secure_lookup, secure_query_engine
|
|
34
53
|
```
|
|
35
54
|
|
|
36
55
|
Also wrap retrievers or install the node postprocessor before retrieved text is
|
|
@@ -16,17 +16,36 @@ Install the Microsoft packages used by your application separately.
|
|
|
16
16
|
|
|
17
17
|
## Attach in production
|
|
18
18
|
|
|
19
|
+
Configure the assigned runtime first:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
unset AGENTICDOME_MODE
|
|
23
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
24
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
25
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Pass the application-owned agent and real tool handler into the assembly
|
|
29
|
+
function, then register only the returned secured handler:
|
|
30
|
+
|
|
19
31
|
```python
|
|
20
|
-
from
|
|
32
|
+
from typing import Any, Callable, Tuple
|
|
21
33
|
|
|
22
|
-
|
|
23
|
-
agent = firewall.install_on_agent(agent)
|
|
34
|
+
from agenticdome_sdk.microsoft_agent_framework import AgenticDomeMicrosoftAgentFirewall
|
|
24
35
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
)
|
|
36
|
+
def secure_agent_and_tool(
|
|
37
|
+
*,
|
|
38
|
+
agent: Any,
|
|
39
|
+
raw_lookup: Callable[..., Any],
|
|
40
|
+
) -> Tuple[Any, Callable[..., Any]]:
|
|
41
|
+
firewall = AgenticDomeMicrosoftAgentFirewall()
|
|
42
|
+
secured_agent = firewall.install_on_agent(agent)
|
|
43
|
+
secure_lookup = firewall.wrap_tool_handler(
|
|
44
|
+
tool_name="crm.customer.read",
|
|
45
|
+
tool_platform="crm",
|
|
46
|
+
handler=raw_lookup,
|
|
47
|
+
)
|
|
48
|
+
return secured_agent, secure_lookup
|
|
30
49
|
```
|
|
31
50
|
|
|
32
51
|
Applications that own invocation should call `run_agent_securely(...)`. Use
|
|
@@ -14,17 +14,36 @@ agenticdome-demo --framework foundry --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned Foundry client and executor into the assembly
|
|
27
|
+
function, then publish only the secured executor to the dispatch table:
|
|
28
|
+
|
|
17
29
|
```python
|
|
18
|
-
from
|
|
30
|
+
from typing import Any, Callable, Tuple
|
|
19
31
|
|
|
20
|
-
|
|
21
|
-
client = firewall.install_on_client(client)
|
|
32
|
+
from agenticdome_sdk.microsoft_ai_foundry import AgenticDomeMicrosoftAIFoundryFirewall
|
|
22
33
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
)
|
|
34
|
+
def secure_foundry_client(
|
|
35
|
+
*,
|
|
36
|
+
client: Any,
|
|
37
|
+
raw_refund_executor: Callable[..., Any],
|
|
38
|
+
) -> Tuple[Any, Callable[..., Any]]:
|
|
39
|
+
firewall = AgenticDomeMicrosoftAIFoundryFirewall()
|
|
40
|
+
secured_client = firewall.install_on_client(client)
|
|
41
|
+
secure_executor = firewall.wrap_tool_executor(
|
|
42
|
+
tool_name="payments.refund.create",
|
|
43
|
+
tool_platform="payments",
|
|
44
|
+
handler=raw_refund_executor,
|
|
45
|
+
)
|
|
46
|
+
return secured_client, secure_executor
|
|
28
47
|
```
|
|
29
48
|
|
|
30
49
|
Call `run_secure(...)` when the application controls the complete run. Register
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/openai-agents.md
RENAMED
|
@@ -14,22 +14,43 @@ agenticdome-demo --framework openai-agents --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned runner, agent and raw handler into an async boundary.
|
|
27
|
+
Register only `secure_lookup` with the framework's function-tool mechanism:
|
|
28
|
+
|
|
17
29
|
```python
|
|
30
|
+
from typing import Any, Callable, Tuple
|
|
31
|
+
|
|
18
32
|
from agenticdome_sdk.openai_agents import AgenticDomeOpenAIAgentsFirewall
|
|
19
33
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
)
|
|
34
|
+
async def run_secured_agent(
|
|
35
|
+
*,
|
|
36
|
+
runner: Any,
|
|
37
|
+
agent: Any,
|
|
38
|
+
user_prompt: str,
|
|
39
|
+
raw_lookup: Callable[..., Any],
|
|
40
|
+
) -> Tuple[Any, Callable[..., Any]]:
|
|
41
|
+
firewall = AgenticDomeOpenAIAgentsFirewall()
|
|
42
|
+
secure_lookup = firewall.wrap_tool_handler(
|
|
43
|
+
tool_name="crm.customer.read",
|
|
44
|
+
tool_platform="crm",
|
|
45
|
+
handler=raw_lookup,
|
|
46
|
+
)
|
|
47
|
+
result = await firewall.run_agent_securely(
|
|
48
|
+
runner=runner,
|
|
49
|
+
agent=agent,
|
|
50
|
+
input_text=user_prompt,
|
|
51
|
+
session_id="stable-session-id",
|
|
52
|
+
)
|
|
53
|
+
return result, secure_lookup
|
|
33
54
|
```
|
|
34
55
|
|
|
35
56
|
Register `secure_lookup` with `@function_tool`; do not register `raw_lookup`.
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/pydanticai.md
RENAMED
|
@@ -14,19 +14,40 @@ agenticdome-demo --framework pydanticai --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned agent and CRM coroutine into the same factory that
|
|
27
|
+
registers tools; no undeclared globals are required:
|
|
28
|
+
|
|
17
29
|
```python
|
|
30
|
+
from typing import Any, Awaitable, Callable
|
|
31
|
+
|
|
18
32
|
from agenticdome_sdk.pydantic import CyberSecFirewall
|
|
19
33
|
|
|
20
|
-
|
|
21
|
-
|
|
34
|
+
def attach_secured_tools(
|
|
35
|
+
*,
|
|
36
|
+
agent: Any,
|
|
37
|
+
crm_lookup: Callable[[str], Awaitable[Any]],
|
|
38
|
+
) -> CyberSecFirewall:
|
|
39
|
+
firewall = CyberSecFirewall()
|
|
40
|
+
firewall.install_native_hooks(agent)
|
|
41
|
+
|
|
42
|
+
@agent.tool
|
|
43
|
+
@firewall.secure_tool(
|
|
44
|
+
tool_name="crm.customer.read",
|
|
45
|
+
tool_platform="crm",
|
|
46
|
+
)
|
|
47
|
+
async def read_customer(ctx: Any, customer_id: str) -> Any:
|
|
48
|
+
return await crm_lookup(customer_id)
|
|
22
49
|
|
|
23
|
-
|
|
24
|
-
@firewall.secure_tool(
|
|
25
|
-
tool_name="crm.customer.read",
|
|
26
|
-
tool_platform="crm",
|
|
27
|
-
)
|
|
28
|
-
async def read_customer(ctx, customer_id: str):
|
|
29
|
-
return await crm.read_customer(customer_id)
|
|
50
|
+
return firewall
|
|
30
51
|
```
|
|
31
52
|
|
|
32
53
|
Create the firewall after configuring the assigned sidecar URL, Runtime/SDK
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/frameworks/smolagents.md
RENAMED
|
@@ -14,18 +14,31 @@ agenticdome-demo --framework smolagents --scenario both
|
|
|
14
14
|
|
|
15
15
|
## Attach in production
|
|
16
16
|
|
|
17
|
+
Configure the assigned runtime first:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
unset AGENTICDOME_MODE
|
|
21
|
+
export AGENTICDOME_API_BASE="https://your-assigned-sidecar.example.com"
|
|
22
|
+
export AGENTICDOME_API_KEY="your-runtime-sdk-key"
|
|
23
|
+
export AGENTICDOME_TENANT_ID="your-tenant-id"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Pass the application-owned agent and prompt into the execution boundary:
|
|
27
|
+
|
|
17
28
|
```python
|
|
18
|
-
from
|
|
29
|
+
from typing import Any
|
|
19
30
|
|
|
20
|
-
|
|
21
|
-
agent = firewall.attach_firewall(agent, session_id="stable-session-id")
|
|
31
|
+
from agenticdome_sdk.smolagents import AgenticDomeSmolagentsFirewall
|
|
22
32
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
33
|
+
def run_secured_agent(*, agent: Any, user_prompt: str) -> Any:
|
|
34
|
+
firewall = AgenticDomeSmolagentsFirewall()
|
|
35
|
+
secured_agent = firewall.attach_firewall(agent, session_id="stable-session-id")
|
|
36
|
+
return firewall.run_agent_securely(
|
|
37
|
+
secured_agent,
|
|
38
|
+
user_prompt,
|
|
39
|
+
session_id="stable-session-id",
|
|
40
|
+
agent_id="support-agent",
|
|
41
|
+
)
|
|
29
42
|
```
|
|
30
43
|
|
|
31
44
|
Wrap sensitive native tools with `wrap_tool(...)`. Use
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "agenticdome-python-sdk"
|
|
7
|
-
version = "1.2.
|
|
7
|
+
version = "1.2.14"
|
|
8
8
|
description = "Official Python SDK for AgenticDome security guardrails, DLP, tool authorization, and multi-agent delegation enforcement."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_framework_guides.py
RENAMED
|
@@ -2,10 +2,15 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import ast
|
|
5
6
|
import importlib
|
|
6
7
|
import re
|
|
8
|
+
import subprocess
|
|
9
|
+
import sys
|
|
7
10
|
from pathlib import Path
|
|
8
11
|
|
|
12
|
+
import pytest
|
|
13
|
+
|
|
9
14
|
|
|
10
15
|
SDK_ROOT = Path(__file__).resolve().parents[1]
|
|
11
16
|
GUIDE_ROOT = SDK_ROOT / "docs" / "frameworks"
|
|
@@ -72,6 +77,14 @@ GUIDES = {
|
|
|
72
77
|
}
|
|
73
78
|
|
|
74
79
|
|
|
80
|
+
def _production_python(guide: Path) -> str:
|
|
81
|
+
text = guide.read_text(encoding="utf-8")
|
|
82
|
+
section = text.split("## Attach in production", 1)[1].split("## Launch checks", 1)[0]
|
|
83
|
+
blocks = re.findall(r"```python\n(.*?)```", section, flags=re.DOTALL)
|
|
84
|
+
assert blocks, f"{guide.name}: missing production Python block"
|
|
85
|
+
return "\n\n".join(blocks)
|
|
86
|
+
|
|
87
|
+
|
|
75
88
|
def test_every_supported_non_mcp_integration_has_a_launch_guide() -> None:
|
|
76
89
|
index = (GUIDE_ROOT / "README.md").read_text(encoding="utf-8")
|
|
77
90
|
for filename in GUIDES:
|
|
@@ -95,6 +108,34 @@ def test_documented_attachment_methods_exist_on_public_adapter_classes() -> None
|
|
|
95
108
|
assert method in guide, f"{filename}: public method {method} is not documented"
|
|
96
109
|
|
|
97
110
|
|
|
111
|
+
@pytest.mark.parametrize("filename", sorted(GUIDES))
|
|
112
|
+
def test_production_snippets_compile_without_undefined_names_or_top_level_await(filename: str, tmp_path: Path) -> None:
|
|
113
|
+
source = _production_python(GUIDE_ROOT / filename)
|
|
114
|
+
tree = ast.parse(source, filename=filename)
|
|
115
|
+
compile(tree, filename, "exec")
|
|
116
|
+
assert not any(isinstance(node, (ast.Await, ast.AsyncFor)) for node in tree.body), (
|
|
117
|
+
f"{filename}: await/async-for must be inside an async integration function"
|
|
118
|
+
)
|
|
119
|
+
|
|
120
|
+
snippet = tmp_path / filename.replace(".md", ".py")
|
|
121
|
+
snippet.write_text(source, encoding="utf-8")
|
|
122
|
+
lint = subprocess.run(
|
|
123
|
+
[sys.executable, "-m", "ruff", "check", "--select", "F821", "--output-format", "concise", str(snippet)],
|
|
124
|
+
capture_output=True,
|
|
125
|
+
text=True,
|
|
126
|
+
check=False,
|
|
127
|
+
)
|
|
128
|
+
assert lint.returncode == 0, f"{filename}: production snippet has undefined names\n{lint.stdout}{lint.stderr}"
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
@pytest.mark.parametrize("filename", sorted(GUIDES))
|
|
132
|
+
def test_each_framework_guide_is_self_contained_about_live_runtime_configuration(filename: str) -> None:
|
|
133
|
+
text = (GUIDE_ROOT / filename).read_text(encoding="utf-8")
|
|
134
|
+
for variable in ("AGENTICDOME_API_BASE", "AGENTICDOME_API_KEY", "AGENTICDOME_TENANT_ID"):
|
|
135
|
+
assert variable in text, f"{filename}: missing {variable} production configuration"
|
|
136
|
+
assert "application-owned" in text.lower(), f"{filename}: application-owned inputs are not explained"
|
|
137
|
+
|
|
138
|
+
|
|
98
139
|
def test_local_markdown_links_in_launch_documentation_resolve() -> None:
|
|
99
140
|
documents = [
|
|
100
141
|
*GUIDE_ROOT.glob("*.md"),
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/aws_bedrock.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/google_adk.py
RENAMED
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/langgraph.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/llamaindex.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/openai_agents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/simulation.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/agenticdome_sdk/smolagents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/docs/performance-evidence.md
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/PRODUCTION_INTEGRATION.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/README.md
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/_shared.py
RENAMED
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/autogen.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/aws_bedrock.py
RENAMED
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/crewai.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/custom_python.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/google_adk.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/langgraph.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/llamaindex.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/openai_agents.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/pydanticai.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/frameworks/smolagents.py
RENAMED
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/examples/local_simulation_gallery.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_agno_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_autogen_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_claude_integration.py
RENAMED
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_crewai_integration.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_execution_broker.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_google_adk_integration.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_identity_context.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_langgraph_integration.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_llamaindex_integration.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_local_simulation.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_mcp_host_integration.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_mcp_launch_example.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_pydanticai_integration.py
RENAMED
|
File without changes
|
{agenticdome_python_sdk-1.2.13 → agenticdome_python_sdk-1.2.14}/tests/test_smolagents_integration.py
RENAMED
|
File without changes
|