agenticdome-python-sdk 1.1.0__tar.gz → 1.1.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.
Files changed (52) hide show
  1. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/MANIFEST.in +0 -1
  2. {agenticdome_python_sdk-1.1.0/agenticdome_python_sdk.egg-info → agenticdome_python_sdk-1.1.2}/PKG-INFO +107 -13
  3. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/README.md +105 -8
  4. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2/agenticdome_python_sdk.egg-info}/PKG-INFO +107 -13
  5. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_python_sdk.egg-info/SOURCES.txt +2 -0
  6. agenticdome_python_sdk-1.1.2/agenticdome_sdk/__init__.py +10 -0
  7. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/client.py +42 -8
  8. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/crewai.py +13 -0
  9. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/pyproject.toml +2 -2
  10. agenticdome_python_sdk-1.1.2/setup.py +7 -0
  11. agenticdome_python_sdk-1.1.2/tests/test_live_tenant.py +67 -0
  12. agenticdome_python_sdk-1.1.2/tests/test_packaging_contract.py +128 -0
  13. agenticdome_python_sdk-1.1.0/agenticdome_sdk/__init__.py +0 -26
  14. agenticdome_python_sdk-1.1.0/setup.py +0 -128
  15. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/LICENSE +0 -0
  16. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_python_sdk.egg-info/dependency_links.txt +0 -0
  17. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_python_sdk.egg-info/requires.txt +0 -0
  18. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_python_sdk.egg-info/top_level.txt +0 -0
  19. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/agno.py +0 -0
  20. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/aws_bedrock.py +0 -0
  21. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/google_adk.py +0 -0
  22. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/langgraph.py +0 -0
  23. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/llamaindex.py +0 -0
  24. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/mcp_host.py +0 -0
  25. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/microsoft_agent_framework.py +0 -0
  26. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/microsoft_ai_foundry.py +0 -0
  27. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/openai_agents.py +0 -0
  28. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/pydantic.py +0 -0
  29. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/agenticdome_sdk/scenarios.py +0 -0
  30. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/agno_lateral_refund.py +0 -0
  31. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/ai_foundry_callback_export.py +0 -0
  32. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/attack_demo.py +0 -0
  33. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/crewai_agenticdome_firewall.py +0 -0
  34. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/crewai_lateral_refund.py +0 -0
  35. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/mcp_remote_patch.py +0 -0
  36. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/mesh_output_redaction.py +0 -0
  37. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/microsoft_metadata_exfil.py +0 -0
  38. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/salesforce_hidden_bcc.py +0 -0
  39. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/examples/servicenow_delete_logs.py +0 -0
  40. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/setup.cfg +0 -0
  41. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_agno_integration.py +0 -0
  42. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_aws_bedrock_integration.py +0 -0
  43. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_client.py +0 -0
  44. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_crewai_integration.py +0 -0
  45. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_google_adk_integration.py +0 -0
  46. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_langgraph_integration.py +0 -0
  47. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_llamaindex_integration.py +0 -0
  48. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_mcp_host_integration.py +0 -0
  49. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_microsoft_agent_framework_integration.py +0 -0
  50. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_microsoft_ai_foundry_integration.py +0 -0
  51. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_openai_agents_integration.py +0 -0
  52. {agenticdome_python_sdk-1.1.0 → agenticdome_python_sdk-1.1.2}/tests/test_pydanticai_integration.py +0 -0
@@ -5,7 +5,6 @@ include setup.py
5
5
 
6
6
  recursive-include examples *.py
7
7
  recursive-include tests *.py
8
-
9
8
  global-exclude __pycache__
10
9
  global-exclude *.py[cod]
11
10
  global-exclude .DS_Store
@@ -1,8 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agenticdome-python-sdk
3
- Version: 1.1.0
4
- Summary: Official Python SDK for AgentGuard Intelligence Engine and Action Firewall.
5
- Home-page: https://github.com/agenticdome/agenticdome-python-sdk-python
3
+ Version: 1.1.2
4
+ Summary: Official Python SDK for AgenticDome security guardrails, DLP, tool authorization, and multi-agent delegation enforcement.
6
5
  Author: AgenticDome
7
6
  License: Proprietary
8
7
  Project-URL: Homepage, https://au.agenticdome.io
@@ -84,9 +83,9 @@ Requires-Dist: ruff>=0.5.0; extra == "dev"
84
83
  Requires-Dist: mypy>=1.8.0; extra == "dev"
85
84
  Requires-Dist: build>=1.0.0; extra == "dev"
86
85
  Requires-Dist: twine>=5.0.0; extra == "dev"
87
- Dynamic: home-page
88
86
  Dynamic: license-file
89
- Dynamic: requires-python
87
+
88
+
90
89
 
91
90
  # AgenticDome Python SDK
92
91
 
@@ -276,7 +275,6 @@ If you are an Enterprise Administrator securing your OpenClaw stack or another P
276
275
  1. Create an account in the AgenticDome Management Console for the AU region.
277
276
  2. Log in and copy your unique workspace or organization tenant identifier from organization settings.
278
277
  3. Navigate to the access-control or API-key section and generate a production API key.
279
- 4. Configure your local OpenClaw runtime, server, worker, or hosting container with the required environment variables before attaching any SDK framework integration.
280
278
 
281
279
  ---
282
280
 
@@ -3008,8 +3006,6 @@ client.report_incident(
3008
3006
  )
3009
3007
  ```
3010
3008
 
3011
- ---
3012
-
3013
3009
  ## Prompt Guardrail Example
3014
3010
 
3015
3011
  ```python
@@ -3307,25 +3303,123 @@ from agenticdome_sdk.llamaindex import AgenticDomeLlamaIndexFirewall, FirewallCo
3307
3303
 
3308
3304
  ---
3309
3305
 
3310
- ## Package Build
3306
+ ## Package Build and Verification
3311
3307
 
3312
- For maintainers:
3308
+ For maintainers, run the Python SDK release gate from the SDK root:
3313
3309
 
3314
3310
  ```bash
3315
3311
  python3 -m venv .venv
3316
3312
  source .venv/bin/activate
3317
3313
 
3318
- python -m pip install --upgrade pip setuptools wheel build twine pytest
3314
+ python -m pip install --upgrade pip setuptools wheel
3319
3315
  python -m pip install -e ".[dev]"
3320
3316
  python -m pip install -e ".[crewai,pydanticai,langgraph,microsoft,foundry,agno,openai-agents,mcp,bedrock,google-adk,llamaindex,redis]"
3321
3317
 
3322
- pytest -q
3318
+ python -m pytest -q
3319
+ rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3320
+ python -m build
3321
+ python -m twine check dist/*
3322
+ ```
3323
+
3324
+ `python -m pytest -q` runs the core SDK tests, package metadata contract tests, and every dependency-light framework adapter test in one go. This is the normal offline full-suite command for all supported Python integrations.
3325
+
3326
+ The adapter tests use fake framework/client boundaries where possible so normal CI can verify authorization, delegation-token handling, sanitized tool arguments, output DLP, streaming sanitization, rate limits, and fail-open/fail-closed behavior without requiring live third-party services.
3327
+
3328
+ To run one framework at a time, execute the matching test file from the matrix below. For example, `python -m pytest -q tests/test_langgraph_integration.py` runs only the LangGraph/LangChain adapter tests.
3329
+
3330
+ ### Verification Command Details
3331
+
3332
+ Use this focused verification command when you only want release/package checks plus the optional live tenant smoke tests:
3333
+
3334
+ ```bash
3335
+ python -m pytest -q tests/test_packaging_contract.py tests/test_live_tenant.py
3336
+ ```
3337
+
3338
+ What each part does:
3339
+
3340
+ | Part | Meaning |
3341
+ | :--- | :--- |
3342
+ | `python -m pytest` | Runs `pytest` using the current Python environment. |
3343
+ | `-q` | Quiet mode. It prints compact test results instead of verbose test names. |
3344
+ | `tests/test_packaging_contract.py` | Runs packaging and release-quality checks: `pyproject.toml` metadata, the minimal `setup.py` shim, public imports, `.gitignore`, `MANIFEST.in`, and README verification coverage. |
3345
+ | `tests/test_live_tenant.py` | Runs live AgenticDome tenant smoke tests only when explicitly enabled. By default these tests are skipped. |
3346
+
3347
+ By default, `tests/test_live_tenant.py` is skipped unless you set:
3348
+
3349
+ ```bash
3350
+ export AGENTICDOME_LIVE_TENANT_TEST=1
3351
+ ```
3352
+
3353
+ For strict live policy validation, also set:
3354
+
3355
+ ```bash
3356
+ export AGENTICDOME_LIVE_EXPECT_STRICT=1
3357
+ ```
3358
+
3359
+ ### Framework Test Matrix
3360
+
3361
+ | Runtime / integration | Test command | Coverage focus |
3362
+ | :--- | :--- | :--- |
3363
+ | Core SDK client | `python -m pytest -q tests/test_client.py` | Request validation, headers, guardrail calls, A2A/MCP JSON-RPC calls, Mesh DLP, HTTP errors, and JSON handling. |
3364
+ | Package contract | `python -m pytest -q tests/test_packaging_contract.py` | `pyproject.toml` metadata, legacy `setup.py` shim, public exports, manifest hygiene, ignored build artifacts, and documented extras. |
3365
+ | CrewAI | `python -m pytest -q tests/test_crewai_integration.py` | Prompt/tool hooks, manager handoff token injection, specialist verification, output redaction, schema checks, rate limits, retries, and streaming DLP. |
3366
+ | PydanticAI | `python -m pytest -q tests/test_pydanticai_integration.py` | Agent hooks, secure tools, sanitized arguments, token-store fallback, production session enforcement, rate limits, retries, and streaming output. |
3367
+ | LangGraph / LangChain | `python -m pytest -q tests/test_langgraph_integration.py` | Graph input, transition, tool, retrieval, middleware, security routing, token consumption, output DLP, and streaming events. |
3368
+ | 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, and streaming output. |
3369
+ | 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, and stream DLP. |
3370
+ | 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, and streaming output. |
3371
+ | 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, and stream DLP. |
3372
+ | 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, and forwarder DLP. |
3373
+ | 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, and retries. |
3374
+ | Google ADK | `python -m pytest -q tests/test_google_adk_integration.py` | Model/tool callbacks, plugin helpers, secure tools, delegated execution, sanitized args, production sessions, rate limits, retries, and stream DLP. |
3375
+ | LlamaIndex | `python -m pytest -q tests/test_llamaindex_integration.py` | FunctionTool/query/retrieval wrappers, callback handlers, secure tools, delegated execution, fail-open behavior, and output DLP. |
3376
+
3377
+ For a single-framework development loop, install only the extra and run the matching test file, for example:
3378
+
3379
+ ```bash
3380
+ python -m pip install -e ".[langgraph]"
3381
+ python -m pytest -q tests/test_langgraph_integration.py
3382
+ ```
3383
+
3384
+ ### Release Gates
3385
+
3386
+ For metadata and artifact validation only:
3387
+
3388
+ ```bash
3389
+ python -m pytest -q tests/test_packaging_contract.py
3390
+ rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3391
+ python -m build
3392
+ python -m twine check dist/*
3393
+ ```
3394
+
3395
+ For a full offline release gate across all supported Python integrations:
3323
3396
 
3397
+ ```bash
3398
+ python -m pip install -e ".[dev,crewai,pydanticai,langgraph,microsoft,foundry,agno,openai-agents,mcp,bedrock,google-adk,llamaindex,redis]"
3399
+ python -m pytest -q
3324
3400
  rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3325
3401
  python -m build
3326
3402
  python -m twine check dist/*
3327
3403
  ```
3328
3404
 
3405
+ For a release gate against a real AgenticDome tenant:
3406
+
3407
+ ```bash
3408
+ export AGENTICDOME_API_BASE="https://www.agenticdome.io"
3409
+ export AGENTICDOME_TENANT_ID="<tenant_id>"
3410
+ export AGENTICDOME_API_KEY="<tenant_api_key>"
3411
+ export AGENTICDOME_LIVE_TENANT_TEST=1
3412
+ python -m pytest -q tests/test_live_tenant.py
3413
+ ```
3414
+
3415
+ For strict security-policy validation, add:
3416
+
3417
+ ```bash
3418
+ export AGENTICDOME_LIVE_EXPECT_STRICT=1
3419
+ ```
3420
+
3421
+ The live tenant test performs real `guardrail_validate()` and `mesh_validate()` calls through the core client. Framework-specific behavior remains covered by the offline adapter test matrix above, because those tests assert where each framework boundary calls the shared AgenticDome client and how it handles policy decisions.
3422
+
3329
3423
  ---
3330
3424
 
3331
3425
  ## License
@@ -3339,5 +3433,5 @@ or terms published by AgenticDome for this package.
3339
3433
  For enterprise deployments, advanced governance workflows, dedicated regional control planes, or priority integration support, visit:
3340
3434
 
3341
3435
  ```text
3342
- https://au.agenticdome.io
3436
+ https://agenticdome.io
3343
3437
  ```
@@ -1,3 +1,5 @@
1
+
2
+
1
3
  # AgenticDome Python SDK
2
4
 
3
5
  [![PyPI version](https://img.shields.io/pypi/v/agenticdome-python-sdk.svg)](https://pypi.org/project/agenticdome-python-sdk/)
@@ -186,7 +188,6 @@ If you are an Enterprise Administrator securing your OpenClaw stack or another P
186
188
  1. Create an account in the AgenticDome Management Console for the AU region.
187
189
  2. Log in and copy your unique workspace or organization tenant identifier from organization settings.
188
190
  3. Navigate to the access-control or API-key section and generate a production API key.
189
- 4. Configure your local OpenClaw runtime, server, worker, or hosting container with the required environment variables before attaching any SDK framework integration.
190
191
 
191
192
  ---
192
193
 
@@ -2918,8 +2919,6 @@ client.report_incident(
2918
2919
  )
2919
2920
  ```
2920
2921
 
2921
- ---
2922
-
2923
2922
  ## Prompt Guardrail Example
2924
2923
 
2925
2924
  ```python
@@ -3217,25 +3216,123 @@ from agenticdome_sdk.llamaindex import AgenticDomeLlamaIndexFirewall, FirewallCo
3217
3216
 
3218
3217
  ---
3219
3218
 
3220
- ## Package Build
3219
+ ## Package Build and Verification
3221
3220
 
3222
- For maintainers:
3221
+ For maintainers, run the Python SDK release gate from the SDK root:
3223
3222
 
3224
3223
  ```bash
3225
3224
  python3 -m venv .venv
3226
3225
  source .venv/bin/activate
3227
3226
 
3228
- python -m pip install --upgrade pip setuptools wheel build twine pytest
3227
+ python -m pip install --upgrade pip setuptools wheel
3229
3228
  python -m pip install -e ".[dev]"
3230
3229
  python -m pip install -e ".[crewai,pydanticai,langgraph,microsoft,foundry,agno,openai-agents,mcp,bedrock,google-adk,llamaindex,redis]"
3231
3230
 
3232
- pytest -q
3231
+ python -m pytest -q
3232
+ rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3233
+ python -m build
3234
+ python -m twine check dist/*
3235
+ ```
3236
+
3237
+ `python -m pytest -q` runs the core SDK tests, package metadata contract tests, and every dependency-light framework adapter test in one go. This is the normal offline full-suite command for all supported Python integrations.
3238
+
3239
+ The adapter tests use fake framework/client boundaries where possible so normal CI can verify authorization, delegation-token handling, sanitized tool arguments, output DLP, streaming sanitization, rate limits, and fail-open/fail-closed behavior without requiring live third-party services.
3240
+
3241
+ To run one framework at a time, execute the matching test file from the matrix below. For example, `python -m pytest -q tests/test_langgraph_integration.py` runs only the LangGraph/LangChain adapter tests.
3242
+
3243
+ ### Verification Command Details
3244
+
3245
+ Use this focused verification command when you only want release/package checks plus the optional live tenant smoke tests:
3246
+
3247
+ ```bash
3248
+ python -m pytest -q tests/test_packaging_contract.py tests/test_live_tenant.py
3249
+ ```
3250
+
3251
+ What each part does:
3252
+
3253
+ | Part | Meaning |
3254
+ | :--- | :--- |
3255
+ | `python -m pytest` | Runs `pytest` using the current Python environment. |
3256
+ | `-q` | Quiet mode. It prints compact test results instead of verbose test names. |
3257
+ | `tests/test_packaging_contract.py` | Runs packaging and release-quality checks: `pyproject.toml` metadata, the minimal `setup.py` shim, public imports, `.gitignore`, `MANIFEST.in`, and README verification coverage. |
3258
+ | `tests/test_live_tenant.py` | Runs live AgenticDome tenant smoke tests only when explicitly enabled. By default these tests are skipped. |
3259
+
3260
+ By default, `tests/test_live_tenant.py` is skipped unless you set:
3261
+
3262
+ ```bash
3263
+ export AGENTICDOME_LIVE_TENANT_TEST=1
3264
+ ```
3265
+
3266
+ For strict live policy validation, also set:
3267
+
3268
+ ```bash
3269
+ export AGENTICDOME_LIVE_EXPECT_STRICT=1
3270
+ ```
3271
+
3272
+ ### Framework Test Matrix
3273
+
3274
+ | Runtime / integration | Test command | Coverage focus |
3275
+ | :--- | :--- | :--- |
3276
+ | Core SDK client | `python -m pytest -q tests/test_client.py` | Request validation, headers, guardrail calls, A2A/MCP JSON-RPC calls, Mesh DLP, HTTP errors, and JSON handling. |
3277
+ | Package contract | `python -m pytest -q tests/test_packaging_contract.py` | `pyproject.toml` metadata, legacy `setup.py` shim, public exports, manifest hygiene, ignored build artifacts, and documented extras. |
3278
+ | CrewAI | `python -m pytest -q tests/test_crewai_integration.py` | Prompt/tool hooks, manager handoff token injection, specialist verification, output redaction, schema checks, rate limits, retries, and streaming DLP. |
3279
+ | PydanticAI | `python -m pytest -q tests/test_pydanticai_integration.py` | Agent hooks, secure tools, sanitized arguments, token-store fallback, production session enforcement, rate limits, retries, and streaming output. |
3280
+ | LangGraph / LangChain | `python -m pytest -q tests/test_langgraph_integration.py` | Graph input, transition, tool, retrieval, middleware, security routing, token consumption, output DLP, and streaming events. |
3281
+ | 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, and streaming output. |
3282
+ | 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, and stream DLP. |
3283
+ | 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, and streaming output. |
3284
+ | 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, and stream DLP. |
3285
+ | 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, and forwarder DLP. |
3286
+ | 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, and retries. |
3287
+ | Google ADK | `python -m pytest -q tests/test_google_adk_integration.py` | Model/tool callbacks, plugin helpers, secure tools, delegated execution, sanitized args, production sessions, rate limits, retries, and stream DLP. |
3288
+ | LlamaIndex | `python -m pytest -q tests/test_llamaindex_integration.py` | FunctionTool/query/retrieval wrappers, callback handlers, secure tools, delegated execution, fail-open behavior, and output DLP. |
3289
+
3290
+ For a single-framework development loop, install only the extra and run the matching test file, for example:
3291
+
3292
+ ```bash
3293
+ python -m pip install -e ".[langgraph]"
3294
+ python -m pytest -q tests/test_langgraph_integration.py
3295
+ ```
3296
+
3297
+ ### Release Gates
3298
+
3299
+ For metadata and artifact validation only:
3300
+
3301
+ ```bash
3302
+ python -m pytest -q tests/test_packaging_contract.py
3303
+ rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3304
+ python -m build
3305
+ python -m twine check dist/*
3306
+ ```
3307
+
3308
+ For a full offline release gate across all supported Python integrations:
3233
3309
 
3310
+ ```bash
3311
+ python -m pip install -e ".[dev,crewai,pydanticai,langgraph,microsoft,foundry,agno,openai-agents,mcp,bedrock,google-adk,llamaindex,redis]"
3312
+ python -m pytest -q
3234
3313
  rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3235
3314
  python -m build
3236
3315
  python -m twine check dist/*
3237
3316
  ```
3238
3317
 
3318
+ For a release gate against a real AgenticDome tenant:
3319
+
3320
+ ```bash
3321
+ export AGENTICDOME_API_BASE="https://www.agenticdome.io"
3322
+ export AGENTICDOME_TENANT_ID="<tenant_id>"
3323
+ export AGENTICDOME_API_KEY="<tenant_api_key>"
3324
+ export AGENTICDOME_LIVE_TENANT_TEST=1
3325
+ python -m pytest -q tests/test_live_tenant.py
3326
+ ```
3327
+
3328
+ For strict security-policy validation, add:
3329
+
3330
+ ```bash
3331
+ export AGENTICDOME_LIVE_EXPECT_STRICT=1
3332
+ ```
3333
+
3334
+ The live tenant test performs real `guardrail_validate()` and `mesh_validate()` calls through the core client. Framework-specific behavior remains covered by the offline adapter test matrix above, because those tests assert where each framework boundary calls the shared AgenticDome client and how it handles policy decisions.
3335
+
3239
3336
  ---
3240
3337
 
3241
3338
  ## License
@@ -3249,5 +3346,5 @@ or terms published by AgenticDome for this package.
3249
3346
  For enterprise deployments, advanced governance workflows, dedicated regional control planes, or priority integration support, visit:
3250
3347
 
3251
3348
  ```text
3252
- https://au.agenticdome.io
3349
+ https://agenticdome.io
3253
3350
  ```
@@ -1,8 +1,7 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agenticdome-python-sdk
3
- Version: 1.1.0
4
- Summary: Official Python SDK for AgentGuard Intelligence Engine and Action Firewall.
5
- Home-page: https://github.com/agenticdome/agenticdome-python-sdk-python
3
+ Version: 1.1.2
4
+ Summary: Official Python SDK for AgenticDome security guardrails, DLP, tool authorization, and multi-agent delegation enforcement.
6
5
  Author: AgenticDome
7
6
  License: Proprietary
8
7
  Project-URL: Homepage, https://au.agenticdome.io
@@ -84,9 +83,9 @@ Requires-Dist: ruff>=0.5.0; extra == "dev"
84
83
  Requires-Dist: mypy>=1.8.0; extra == "dev"
85
84
  Requires-Dist: build>=1.0.0; extra == "dev"
86
85
  Requires-Dist: twine>=5.0.0; extra == "dev"
87
- Dynamic: home-page
88
86
  Dynamic: license-file
89
- Dynamic: requires-python
87
+
88
+
90
89
 
91
90
  # AgenticDome Python SDK
92
91
 
@@ -276,7 +275,6 @@ If you are an Enterprise Administrator securing your OpenClaw stack or another P
276
275
  1. Create an account in the AgenticDome Management Console for the AU region.
277
276
  2. Log in and copy your unique workspace or organization tenant identifier from organization settings.
278
277
  3. Navigate to the access-control or API-key section and generate a production API key.
279
- 4. Configure your local OpenClaw runtime, server, worker, or hosting container with the required environment variables before attaching any SDK framework integration.
280
278
 
281
279
  ---
282
280
 
@@ -3008,8 +3006,6 @@ client.report_incident(
3008
3006
  )
3009
3007
  ```
3010
3008
 
3011
- ---
3012
-
3013
3009
  ## Prompt Guardrail Example
3014
3010
 
3015
3011
  ```python
@@ -3307,25 +3303,123 @@ from agenticdome_sdk.llamaindex import AgenticDomeLlamaIndexFirewall, FirewallCo
3307
3303
 
3308
3304
  ---
3309
3305
 
3310
- ## Package Build
3306
+ ## Package Build and Verification
3311
3307
 
3312
- For maintainers:
3308
+ For maintainers, run the Python SDK release gate from the SDK root:
3313
3309
 
3314
3310
  ```bash
3315
3311
  python3 -m venv .venv
3316
3312
  source .venv/bin/activate
3317
3313
 
3318
- python -m pip install --upgrade pip setuptools wheel build twine pytest
3314
+ python -m pip install --upgrade pip setuptools wheel
3319
3315
  python -m pip install -e ".[dev]"
3320
3316
  python -m pip install -e ".[crewai,pydanticai,langgraph,microsoft,foundry,agno,openai-agents,mcp,bedrock,google-adk,llamaindex,redis]"
3321
3317
 
3322
- pytest -q
3318
+ python -m pytest -q
3319
+ rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3320
+ python -m build
3321
+ python -m twine check dist/*
3322
+ ```
3323
+
3324
+ `python -m pytest -q` runs the core SDK tests, package metadata contract tests, and every dependency-light framework adapter test in one go. This is the normal offline full-suite command for all supported Python integrations.
3325
+
3326
+ The adapter tests use fake framework/client boundaries where possible so normal CI can verify authorization, delegation-token handling, sanitized tool arguments, output DLP, streaming sanitization, rate limits, and fail-open/fail-closed behavior without requiring live third-party services.
3327
+
3328
+ To run one framework at a time, execute the matching test file from the matrix below. For example, `python -m pytest -q tests/test_langgraph_integration.py` runs only the LangGraph/LangChain adapter tests.
3329
+
3330
+ ### Verification Command Details
3331
+
3332
+ Use this focused verification command when you only want release/package checks plus the optional live tenant smoke tests:
3333
+
3334
+ ```bash
3335
+ python -m pytest -q tests/test_packaging_contract.py tests/test_live_tenant.py
3336
+ ```
3337
+
3338
+ What each part does:
3339
+
3340
+ | Part | Meaning |
3341
+ | :--- | :--- |
3342
+ | `python -m pytest` | Runs `pytest` using the current Python environment. |
3343
+ | `-q` | Quiet mode. It prints compact test results instead of verbose test names. |
3344
+ | `tests/test_packaging_contract.py` | Runs packaging and release-quality checks: `pyproject.toml` metadata, the minimal `setup.py` shim, public imports, `.gitignore`, `MANIFEST.in`, and README verification coverage. |
3345
+ | `tests/test_live_tenant.py` | Runs live AgenticDome tenant smoke tests only when explicitly enabled. By default these tests are skipped. |
3346
+
3347
+ By default, `tests/test_live_tenant.py` is skipped unless you set:
3348
+
3349
+ ```bash
3350
+ export AGENTICDOME_LIVE_TENANT_TEST=1
3351
+ ```
3352
+
3353
+ For strict live policy validation, also set:
3354
+
3355
+ ```bash
3356
+ export AGENTICDOME_LIVE_EXPECT_STRICT=1
3357
+ ```
3358
+
3359
+ ### Framework Test Matrix
3360
+
3361
+ | Runtime / integration | Test command | Coverage focus |
3362
+ | :--- | :--- | :--- |
3363
+ | Core SDK client | `python -m pytest -q tests/test_client.py` | Request validation, headers, guardrail calls, A2A/MCP JSON-RPC calls, Mesh DLP, HTTP errors, and JSON handling. |
3364
+ | Package contract | `python -m pytest -q tests/test_packaging_contract.py` | `pyproject.toml` metadata, legacy `setup.py` shim, public exports, manifest hygiene, ignored build artifacts, and documented extras. |
3365
+ | CrewAI | `python -m pytest -q tests/test_crewai_integration.py` | Prompt/tool hooks, manager handoff token injection, specialist verification, output redaction, schema checks, rate limits, retries, and streaming DLP. |
3366
+ | PydanticAI | `python -m pytest -q tests/test_pydanticai_integration.py` | Agent hooks, secure tools, sanitized arguments, token-store fallback, production session enforcement, rate limits, retries, and streaming output. |
3367
+ | LangGraph / LangChain | `python -m pytest -q tests/test_langgraph_integration.py` | Graph input, transition, tool, retrieval, middleware, security routing, token consumption, output DLP, and streaming events. |
3368
+ | 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, and streaming output. |
3369
+ | 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, and stream DLP. |
3370
+ | 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, and streaming output. |
3371
+ | 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, and stream DLP. |
3372
+ | 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, and forwarder DLP. |
3373
+ | 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, and retries. |
3374
+ | Google ADK | `python -m pytest -q tests/test_google_adk_integration.py` | Model/tool callbacks, plugin helpers, secure tools, delegated execution, sanitized args, production sessions, rate limits, retries, and stream DLP. |
3375
+ | LlamaIndex | `python -m pytest -q tests/test_llamaindex_integration.py` | FunctionTool/query/retrieval wrappers, callback handlers, secure tools, delegated execution, fail-open behavior, and output DLP. |
3376
+
3377
+ For a single-framework development loop, install only the extra and run the matching test file, for example:
3378
+
3379
+ ```bash
3380
+ python -m pip install -e ".[langgraph]"
3381
+ python -m pytest -q tests/test_langgraph_integration.py
3382
+ ```
3383
+
3384
+ ### Release Gates
3385
+
3386
+ For metadata and artifact validation only:
3387
+
3388
+ ```bash
3389
+ python -m pytest -q tests/test_packaging_contract.py
3390
+ rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3391
+ python -m build
3392
+ python -m twine check dist/*
3393
+ ```
3394
+
3395
+ For a full offline release gate across all supported Python integrations:
3323
3396
 
3397
+ ```bash
3398
+ python -m pip install -e ".[dev,crewai,pydanticai,langgraph,microsoft,foundry,agno,openai-agents,mcp,bedrock,google-adk,llamaindex,redis]"
3399
+ python -m pytest -q
3324
3400
  rm -rf build dist *.egg-info agenticdome_sdk.egg-info agenticdome_python_sdk.egg-info
3325
3401
  python -m build
3326
3402
  python -m twine check dist/*
3327
3403
  ```
3328
3404
 
3405
+ For a release gate against a real AgenticDome tenant:
3406
+
3407
+ ```bash
3408
+ export AGENTICDOME_API_BASE="https://www.agenticdome.io"
3409
+ export AGENTICDOME_TENANT_ID="<tenant_id>"
3410
+ export AGENTICDOME_API_KEY="<tenant_api_key>"
3411
+ export AGENTICDOME_LIVE_TENANT_TEST=1
3412
+ python -m pytest -q tests/test_live_tenant.py
3413
+ ```
3414
+
3415
+ For strict security-policy validation, add:
3416
+
3417
+ ```bash
3418
+ export AGENTICDOME_LIVE_EXPECT_STRICT=1
3419
+ ```
3420
+
3421
+ The live tenant test performs real `guardrail_validate()` and `mesh_validate()` calls through the core client. Framework-specific behavior remains covered by the offline adapter test matrix above, because those tests assert where each framework boundary calls the shared AgenticDome client and how it handles policy decisions.
3422
+
3329
3423
  ---
3330
3424
 
3331
3425
  ## License
@@ -3339,5 +3433,5 @@ or terms published by AgenticDome for this package.
3339
3433
  For enterprise deployments, advanced governance workflows, dedicated regional control planes, or priority integration support, visit:
3340
3434
 
3341
3435
  ```text
3342
- https://au.agenticdome.io
3436
+ https://agenticdome.io
3343
3437
  ```
@@ -38,9 +38,11 @@ tests/test_client.py
38
38
  tests/test_crewai_integration.py
39
39
  tests/test_google_adk_integration.py
40
40
  tests/test_langgraph_integration.py
41
+ tests/test_live_tenant.py
41
42
  tests/test_llamaindex_integration.py
42
43
  tests/test_mcp_host_integration.py
43
44
  tests/test_microsoft_agent_framework_integration.py
44
45
  tests/test_microsoft_ai_foundry_integration.py
45
46
  tests/test_openai_agents_integration.py
47
+ tests/test_packaging_contract.py
46
48
  tests/test_pydanticai_integration.py
@@ -0,0 +1,10 @@
1
+ from .client import AgentGuardClient, AgentGuardError, AgentGuardHTTPError
2
+
3
+ GuardrailClient = AgentGuardClient
4
+
5
+ __all__ = [
6
+ "AgentGuardClient",
7
+ "GuardrailClient",
8
+ "AgentGuardError",
9
+ "AgentGuardHTTPError",
10
+ ]
@@ -1,6 +1,6 @@
1
1
  import base64
2
2
  import os
3
- from typing import Optional, Dict, List, Any, Union
3
+ from typing import Optional, Dict, List, Any, Tuple, Union
4
4
 
5
5
  import requests
6
6
  from requests.adapters import HTTPAdapter
@@ -51,6 +51,10 @@ class AgentGuardClient:
51
51
  timeout: int = 20,
52
52
  user_agent: str = "agenticdome-python-sdk/0.4.0",
53
53
  max_retries: int = 3,
54
+ connect_timeout: Optional[float] = None,
55
+ pool_connections: int = 20,
56
+ pool_maxsize: int = 100,
57
+ pool_block: bool = False,
54
58
  ):
55
59
  self.api_base = self._require_nonempty("api_base", api_base).rstrip("/")
56
60
  self.api_key = self._require_nonempty(
@@ -66,6 +70,11 @@ class AgentGuardClient:
66
70
  or os.getenv("AGENTICDOME_BEARER_TOKEN")
67
71
  )
68
72
  self.timeout = timeout
73
+ self.connect_timeout = self._positive_float(
74
+ "connect_timeout",
75
+ connect_timeout if connect_timeout is not None else os.getenv("AGENTICDOME_CONNECT_TIMEOUT_S", "5"),
76
+ default=5.0,
77
+ )
69
78
  self.user_agent = user_agent
70
79
 
71
80
  self.session = requests.Session()
@@ -77,7 +86,12 @@ class AgentGuardClient:
77
86
  status_forcelist=(429, 500, 502, 503, 504),
78
87
  allowed_methods=frozenset(["GET", "POST", "PUT", "PATCH", "DELETE"]),
79
88
  )
80
- adapter = HTTPAdapter(max_retries=retry)
89
+ adapter = HTTPAdapter(
90
+ max_retries=retry,
91
+ pool_connections=max(1, int(pool_connections)),
92
+ pool_maxsize=max(1, int(pool_maxsize)),
93
+ pool_block=bool(pool_block),
94
+ )
81
95
  self.session.mount("http://", adapter)
82
96
  self.session.mount("https://", adapter)
83
97
 
@@ -136,6 +150,22 @@ class AgentGuardClient:
136
150
  s = str(value).strip()
137
151
  return s or None
138
152
 
153
+ def _positive_float(self, name: str, value: Any, *, default: float) -> float:
154
+ try:
155
+ parsed = float(value)
156
+ except Exception:
157
+ parsed = default
158
+ if parsed <= 0:
159
+ parsed = default
160
+ return parsed
161
+
162
+ def _timeout_tuple(self, timeout: Optional[Union[int, float, Tuple[float, float]]]) -> Union[float, Tuple[float, float]]:
163
+ if isinstance(timeout, tuple):
164
+ return timeout
165
+ read_timeout = self._positive_float("timeout", timeout if timeout is not None else self.timeout, default=float(self.timeout or 20))
166
+ connect_timeout = min(self.connect_timeout, read_timeout)
167
+ return (connect_timeout, read_timeout)
168
+
139
169
  def _normalize_direction(self, direction: Optional[str]) -> str:
140
170
  """
141
171
  Normalize common direction synonyms to the canonical values expected by the API.
@@ -239,7 +269,7 @@ class AgentGuardClient:
239
269
  tenant_id: Optional[Union[str, int]] = None,
240
270
  use_bearer: bool = False,
241
271
  extra_headers: Optional[Dict[str, str]] = None,
242
- timeout: Optional[int] = None,
272
+ timeout: Optional[Union[int, float, Tuple[float, float]]] = None,
243
273
  ) -> Dict[str, Any]:
244
274
  url = f"{self.api_base}{path}"
245
275
  headers = self._headers(
@@ -253,7 +283,7 @@ class AgentGuardClient:
253
283
  url=url,
254
284
  headers=headers,
255
285
  json=json_body,
256
- timeout=timeout or self.timeout,
286
+ timeout=self._timeout_tuple(timeout),
257
287
  )
258
288
 
259
289
  if not response.ok:
@@ -647,16 +677,20 @@ class AgentGuardClient:
647
677
  def reset_trust_score(
648
678
  self,
649
679
  agent_id: str,
650
- admin_secret: str,
680
+ admin_secret: Optional[str] = None,
651
681
  tenant_id: Optional[Union[str, int]] = None,
652
682
  is_agent: bool = True,
683
+ service_token: Optional[str] = None,
653
684
  ) -> Dict[str, Any]:
685
+ token = service_token or admin_secret or os.getenv("AGENTICDOME_SERVICE_TOKEN") or os.getenv("SERVICE_SECRET")
686
+ if not token:
687
+ raise ValueError("reset_trust_score requires service_token or AGENTICDOME_SERVICE_TOKEN")
654
688
  path = f"/trust/reset/{agent_id}?is_agent={'true' if is_agent else 'false'}"
655
689
  return self._request(
656
690
  "POST",
657
691
  path,
658
692
  tenant_id=tenant_id,
659
- extra_headers={"X-Admin-Secret": admin_secret},
693
+ extra_headers={"X-Service-Token": token},
660
694
  )
661
695
 
662
696
  # ------------------------------------------------------------------
@@ -1060,7 +1094,7 @@ class AgentGuardClient:
1060
1094
  payload: Dict[str, Any],
1061
1095
  *,
1062
1096
  api_version: str = "2025-09-01",
1063
- timeout: Optional[int] = None,
1097
+ timeout: Optional[Union[int, float, Tuple[float, float]]] = None,
1064
1098
  ) -> Dict[str, Any]:
1065
1099
  return self._request(
1066
1100
  "POST",
@@ -1075,7 +1109,7 @@ class AgentGuardClient:
1075
1109
  payload: Dict[str, Any],
1076
1110
  *,
1077
1111
  api_version: str = "2025-09-01",
1078
- timeout: Optional[int] = None,
1112
+ timeout: Optional[Union[int, float, Tuple[float, float]]] = None,
1079
1113
  ) -> Dict[str, Any]:
1080
1114
  return self._request(
1081
1115
  "POST",
@@ -25,6 +25,19 @@ except Exception as exc: # pragma: no cover
25
25
  "Install with: pip install 'agenticdome-python-sdk[crewai]'"
26
26
  ) from exc
27
27
 
28
+
29
+
30
+ def _preserve_hook_function(register: Callable[[Callable[..., Any]], Any]) -> Callable[[Callable[..., Any]], Callable[..., Any]]:
31
+ def decorator(fn: Callable[..., Any]) -> Callable[..., Any]:
32
+ registered = register(fn)
33
+ return fn if registered is None else registered
34
+ return decorator
35
+
36
+
37
+ register_after_tool_call_hook = _preserve_hook_function(register_after_tool_call_hook)
38
+ register_before_llm_call_hook = _preserve_hook_function(register_before_llm_call_hook)
39
+ register_before_tool_call_hook = _preserve_hook_function(register_before_tool_call_hook)
40
+
28
41
  from agenticdome_sdk.client import AgentGuardClient
29
42
 
30
43
  try:
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "agenticdome-python-sdk"
7
- version = "1.1.0"
8
- description = "Official Python SDK for AgentGuard Intelligence Engine and Action Firewall."
7
+ version = "1.1.2"
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"
11
11
  license = { text = "Proprietary" }
@@ -0,0 +1,7 @@
1
+ from setuptools import setup
2
+
3
+
4
+ # Packaging metadata lives in pyproject.toml. Keep this shim for legacy
5
+ # tooling that still invokes setup.py directly without duplicating release
6
+ # metadata, dependency declarations, classifiers, or repository URLs.
7
+ setup()
@@ -0,0 +1,67 @@
1
+ import os
2
+
3
+ import pytest
4
+
5
+ from agenticdome_sdk.client import AgentGuardClient
6
+
7
+
8
+ pytestmark = pytest.mark.skipif(
9
+ os.getenv("AGENTICDOME_LIVE_TENANT_TEST") != "1",
10
+ reason="Set AGENTICDOME_LIVE_TENANT_TEST=1 with real tenant credentials to run live checks.",
11
+ )
12
+
13
+
14
+ def live_client():
15
+ return AgentGuardClient(
16
+ api_base=os.getenv("AGENTICDOME_API_BASE", "").rstrip("/"),
17
+ api_key=os.getenv("AGENTICDOME_API_KEY", ""),
18
+ tenant_id=os.getenv("AGENTICDOME_TENANT_ID", ""),
19
+ timeout=20,
20
+ max_retries=1,
21
+ )
22
+
23
+
24
+ def verdict_from(response):
25
+ if "verdict" in response:
26
+ return str(response.get("verdict") or "").upper()
27
+ result = response.get("result") if isinstance(response, dict) else None
28
+ if isinstance(result, dict):
29
+ return str(result.get("verdict") or "").upper()
30
+ return ""
31
+
32
+
33
+ def test_live_guardrail_allows_benign_prompt():
34
+ client = live_client()
35
+
36
+ response = client.guardrail_validate(
37
+ text="Summarize the public product documentation for a customer support agent.",
38
+ agent_id="python-sdk-live-smoke",
39
+ direction="inbound",
40
+ platform="python",
41
+ session_id="python-sdk-live-smoke-session",
42
+ policy_context={"test_case": "benign_prompt"},
43
+ )
44
+
45
+ verdict = verdict_from(response)
46
+ assert verdict not in {"BLOCKED", "DENIED"}, response
47
+
48
+
49
+ def test_live_mesh_sanitizes_or_allows_output():
50
+ client = live_client()
51
+
52
+ response = client.mesh_validate(
53
+ text="Support response for alice@example.com with token=sk_live_example1234567890",
54
+ agent_id="python-sdk-live-smoke",
55
+ direction="output",
56
+ platform="python",
57
+ session_id="python-sdk-live-smoke-session",
58
+ redact_pii=True,
59
+ redact_secrets=True,
60
+ policy_context={"test_case": "mesh_output"},
61
+ )
62
+
63
+ verdict = verdict_from(response)
64
+ assert verdict in {"", "ALLOWED", "REDACTED", "BLOCKED", "DENIED"}, response
65
+
66
+ if os.getenv("AGENTICDOME_LIVE_EXPECT_STRICT") == "1":
67
+ assert verdict in {"REDACTED", "BLOCKED", "DENIED"}, response
@@ -0,0 +1,128 @@
1
+ import ast
2
+ import importlib.metadata
3
+ import pathlib
4
+ import pytest
5
+
6
+ try:
7
+ import tomllib
8
+ except ModuleNotFoundError: # pragma: no cover - Python < 3.11 fallback for local dev only
9
+ tomllib = None
10
+
11
+
12
+ ROOT = pathlib.Path(__file__).resolve().parents[1]
13
+
14
+
15
+ def load_pyproject():
16
+ if tomllib is None:
17
+ pytest.skip("tomllib is unavailable on this Python runtime")
18
+ return tomllib.loads((ROOT / "pyproject.toml").read_text(encoding="utf-8"))
19
+
20
+
21
+ def test_pyproject_is_the_single_packaging_metadata_source():
22
+ project = load_pyproject()["project"]
23
+ setup_py = (ROOT / "setup.py").read_text(encoding="utf-8")
24
+
25
+ assert project["name"] == "agenticdome-python-sdk"
26
+ assert project["version"] == "1.1.1"
27
+ assert "AgenticDome" in project["description"]
28
+ assert "AgentGuard Intelligence Engine" not in project["description"]
29
+
30
+ tree = ast.parse(setup_py)
31
+ setup_calls = [
32
+ node
33
+ for node in ast.walk(tree)
34
+ if isinstance(node, ast.Call) and getattr(node.func, "id", "") == "setup"
35
+ ]
36
+ assert len(setup_calls) == 1
37
+ assert setup_calls[0].keywords == []
38
+ assert "version=" not in setup_py
39
+ assert "install_requires" not in setup_py
40
+
41
+
42
+ def test_distribution_metadata_matches_pyproject_when_installed():
43
+ project = load_pyproject()["project"]
44
+
45
+ try:
46
+ installed = importlib.metadata.metadata(project["name"])
47
+ except importlib.metadata.PackageNotFoundError:
48
+ pytest.skip("agenticdome-python-sdk is not installed in this environment")
49
+
50
+ assert installed["Name"] == project["name"]
51
+ assert installed["Version"] == project["version"]
52
+
53
+
54
+ def test_public_package_exports_are_importable():
55
+ from agenticdome_sdk import (
56
+ AgentGuardClient,
57
+ AgentGuardError,
58
+ AgentGuardHTTPError,
59
+ GuardrailClient,
60
+ )
61
+
62
+ assert GuardrailClient is AgentGuardClient
63
+ assert issubclass(AgentGuardHTTPError, AgentGuardError)
64
+
65
+
66
+ def test_manifest_and_ignore_files_keep_release_artifacts_out_of_source_contract():
67
+ manifest = (ROOT / "MANIFEST.in").read_text(encoding="utf-8")
68
+ gitignore = (ROOT / ".gitignore").read_text(encoding="utf-8")
69
+
70
+ for required in ["include README.md", "include LICENSE", "include pyproject.toml", "include setup.py"]:
71
+ assert required in manifest
72
+
73
+ for ignored in ["build/", "dist/", "*.egg-info/", "__pycache__/", ".pytest_cache/"]:
74
+ assert ignored in gitignore
75
+
76
+ forbidden_manifest_entries = ["recursive-include build", "recursive-include dist", "recursive-include *.egg-info"]
77
+ for forbidden in forbidden_manifest_entries:
78
+ assert forbidden not in manifest
79
+
80
+
81
+ def test_project_extras_cover_documented_frameworks():
82
+ project = load_pyproject()["project"]
83
+ extras = project["optional-dependencies"]
84
+
85
+ expected = {
86
+ "crewai",
87
+ "redis",
88
+ "pydanticai",
89
+ "langgraph",
90
+ "microsoft",
91
+ "foundry",
92
+ "agno",
93
+ "openai-agents",
94
+ "mcp",
95
+ "bedrock",
96
+ "llamaindex",
97
+ "google-adk",
98
+ "all",
99
+ "dev",
100
+ }
101
+ assert expected.issubset(extras)
102
+ assert "pytest>=8.0.0" in extras["dev"]
103
+ assert "build>=1.0.0" in extras["dev"]
104
+
105
+ def test_readme_documents_framework_verification_matrix():
106
+ readme = (ROOT / "README.md").read_text(encoding="utf-8")
107
+
108
+ assert "## Package Build and Verification" in readme
109
+ assert "### Framework Test Matrix" in readme
110
+ assert "tests/test_live_tenant.py" in readme
111
+
112
+ for test_file in [
113
+ "tests/test_client.py",
114
+ "tests/test_packaging_contract.py",
115
+ "tests/test_crewai_integration.py",
116
+ "tests/test_pydanticai_integration.py",
117
+ "tests/test_langgraph_integration.py",
118
+ "tests/test_microsoft_agent_framework_integration.py",
119
+ "tests/test_microsoft_ai_foundry_integration.py",
120
+ "tests/test_openai_agents_integration.py",
121
+ "tests/test_agno_integration.py",
122
+ "tests/test_mcp_host_integration.py",
123
+ "tests/test_aws_bedrock_integration.py",
124
+ "tests/test_google_adk_integration.py",
125
+ "tests/test_llamaindex_integration.py",
126
+ ]:
127
+ assert test_file in readme
128
+
@@ -1,26 +0,0 @@
1
- from .client import AgentGuardClient
2
-
3
- try:
4
- from .client import GuardrailClient
5
- except Exception:
6
- GuardrailClient = AgentGuardClient
7
-
8
- try:
9
- from .exceptions import AgentGuardError, AgentGuardHTTPError
10
- except Exception:
11
- try:
12
- from .client import AgentGuardError, AgentGuardHTTPError
13
- except Exception:
14
- class AgentGuardError(Exception):
15
- pass
16
-
17
- class AgentGuardHTTPError(AgentGuardError):
18
- pass
19
-
20
-
21
- __all__ = [
22
- "AgentGuardClient",
23
- "GuardrailClient",
24
- "AgentGuardError",
25
- "AgentGuardHTTPError",
26
- ]
@@ -1,128 +0,0 @@
1
- from pathlib import Path
2
-
3
- from setuptools import find_packages, setup
4
-
5
-
6
- ROOT = Path(__file__).parent
7
- README = ROOT / "README.md"
8
-
9
- setup(
10
- name="agenticdome-python-sdk",
11
- version="1.1.0",
12
- description="Python SDK for AgenticDome AI security, guardrails, A2A, MCP, CrewAI, and enterprise agent governance APIs.",
13
- long_description=README.read_text(encoding="utf-8") if README.exists() else "",
14
- long_description_content_type="text/markdown",
15
- author="AgenticDome",
16
- license="Proprietary",
17
- url="https://github.com/agenticdome/agenticdome-python-sdk-python",
18
- project_urls={
19
- "Homepage": "https://github.com/agenticdome/agenticdome-python-sdk-python",
20
- "Source": "https://github.com/agenticdome/agenticdome-python-sdk-python",
21
- "Issues": "https://github.com/agenticdome/agenticdome-python-sdk-python/issues",
22
- "Console": "https://au.agenticdome.io",
23
- },
24
- packages=find_packages(include=["agenticdome_sdk", "agenticdome_sdk.*"]),
25
- python_requires=">=3.9",
26
- install_requires=[
27
- "requests>=2.28.0",
28
- ],
29
- extras_require={
30
- "crewai": [
31
- "crewai",
32
- ],
33
- "redis": [
34
- "redis>=4.5.0",
35
- ],
36
- "pydanticai": [
37
- "pydantic-ai",
38
- "anyio>=4.0.0",
39
- ],
40
- "pydantic": [
41
- "pydantic-ai",
42
- "anyio>=4.0.0",
43
- ],
44
- "langgraph": [
45
- "langgraph",
46
- "langchain-core",
47
- "anyio>=4.0.0",
48
- ],
49
- "microsoft": [],
50
- "foundry": [
51
- "azure-ai-projects",
52
- "azure-identity",
53
- ],
54
- "agno": [
55
- "agno",
56
- ],
57
- "openai-agents": [
58
- "openai-agents",
59
- ],
60
- "mcp": [
61
- "mcp",
62
- ],
63
- "bedrock": [
64
- "boto3",
65
- ],
66
- "aws-bedrock": [
67
- "boto3",
68
- ],
69
- "llamaindex": [
70
- "llama-index",
71
- ],
72
- "llama-index": [
73
- "llama-index",
74
- ],
75
- "google-adk": [
76
- "google-adk",
77
- ],
78
- "adk": [
79
- "google-adk",
80
- ],
81
- "all": [
82
- "crewai",
83
- "redis>=4.5.0",
84
- "pydantic-ai",
85
- "anyio>=4.0.0",
86
- "langgraph",
87
- "langchain-core",
88
- "agno",
89
- "azure-ai-projects",
90
- "azure-identity",
91
- "openai-agents",
92
- "mcp",
93
- "boto3",
94
- "llama-index",
95
- "google-adk",
96
- ],
97
- "dev": [
98
- "build",
99
- "twine",
100
- "pytest",
101
- "ruff",
102
- ],
103
- },
104
- classifiers=[
105
- "Development Status :: 4 - Beta",
106
- "Intended Audience :: Developers",
107
- "Intended Audience :: Information Technology",
108
- "Topic :: Security",
109
- "Topic :: Software Development :: Libraries :: Python Modules",
110
- "Topic :: Scientific/Engineering :: Artificial Intelligence",
111
- "License :: Other/Proprietary License",
112
- "Programming Language :: Python :: 3",
113
- "Programming Language :: Python :: 3.9",
114
- "Programming Language :: Python :: 3.10",
115
- "Programming Language :: Python :: 3.11",
116
- "Programming Language :: Python :: 3.12",
117
- ],
118
- keywords=[
119
- "agenticdome",
120
- "agentguard",
121
- "ai-security",
122
- "guardrails",
123
- "crewai",
124
- "mcp",
125
- "a2a",
126
- "llm-security",
127
- ],
128
- )