The reliability layer for AI agents in production
Project description
AgentGuard Python SDK
The reliability layer for AI agents in production. Trace executions, enforce guardrails, and monitor agent behavior — with zero changes to your agent's core logic.
Installation
pip install agentx-sdk
Quick Start
from agentguard import AgentGuard, GuardConfig
guard = AgentGuard(
api_key="your-api-key",
config=GuardConfig(api_url="https://api.agentguard.dev"),
)
# 1. Decorator — auto-capture input/output/latency
@guard.watch(agent_id="my-agent")
def run_agent(prompt: str) -> str:
return call_llm(prompt)
# 2. Context manager — fine-grained step tracing
with guard.trace(agent_id="my-agent", task="summarize") as ctx:
result = call_llm(prompt)
ctx.step("llm", "summarize", input=prompt, output=result)
ctx.record(result)
# 3. Session — group related executions
session = guard.session(agent_id="chat-bot")
with session.trace(task="turn 1", input_data=user_msg) as ctx:
response = call_llm(user_msg)
ctx.record(response)
Configuration
GuardConfig(
mode="async", # "async" (fire-and-forget) or "sync" (inline verification)
api_url="https://api.agentguard.dev",
flush_interval_s=1.0, # Batch flush interval (async mode)
flush_batch_size=50, # Max events per flush batch
timeout_s=2.0, # HTTP timeout for API calls
)
Requirements
- Python 3.9+
- Dependencies:
httpx,pydantic(v2)
Documentation
Full documentation: docs.oppla.ai/agentguard
License
Apache 2.0 — see LICENSE for details.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentx_sdk-0.1.0.tar.gz.
File metadata
- Download URL: agentx_sdk-0.1.0.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4a42357618c79f2527fe0020be98639593c4e726c93e6ae186518dc997b0c3d
|
|
| MD5 |
29a8c0501c8253b8102bd7cb40132209
|
|
| BLAKE2b-256 |
ea2ec3f3f501dfe92988347ec8b0833d0c4e49e994158f3a90a8814f2ea9e3b5
|
File details
Details for the file agentx_sdk-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agentx_sdk-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1153090fa537ed952e8e3f46b4acc101fff066daf50ae098636f0c4d9dd59040
|
|
| MD5 |
eb7c4143beee95f992dbd3a0875ce902
|
|
| BLAKE2b-256 |
7c407dea25523bf29aea81166d297071ba9117436036658c8faeb19a5453db45
|