AgentGuard
Real-time cost observability and guardrails for AI agents.
Track LLM spend, set budget thresholds, and auto-pause agents before they blow up your bill.
Install
pip install agentguard
Quick Start
from agentguard import AgentGuard, AgentEvent
guard = AgentGuard(
api_key="ag_...",
agent_id="my-sales-agent",
cost_threshold=10.0, # auto-pause at $10/day
slack_webhook="https://...", # optional alert
)
# Custom agent — wrap with decorator
@guard.track
def run_my_agent():
# your agent logic here
alive = guard.send_event(AgentEvent(
agent_id="my-sales-agent",
event_type="llm_call",
model="gpt-4o",
input_tokens=500,
output_tokens=300,
))
if not alive:
print("Agent paused — cost threshold reached")
return
LangChain / LangGraph
from agentguard import AgentGuard
guard = AgentGuard(api_key="ag_...", agent_id="my-agent", cost_threshold=5.0)
# Drop-in callback — tracks every LLM call automatically
chain = my_chain.with_config(callbacks=[guard.callback])
result = chain.invoke({"input": "do something"})
Supported Models
| Model | Input (per 1M) | Output (per 1M) |
|---|---|---|
| gpt-4o | $2.50 | $10.00 |
| gpt-4o-mini | $0.15 | $0.60 |
| claude-3-5-sonnet | $3.00 | $15.00 |
| claude-3-5-haiku | $0.80 | $4.00 |
| gemini-1.5-pro | $1.25 | $5.00 |
Dashboard
View live costs, event feed, and manage agents at agent-guard-nine.vercel.app.
Links
- Dashboard: https://agent-guard-nine.vercel.app
- Backend API: https://agent-guard-production-dcdd.up.railway.app/docs
Metadata
Release files for agentguard-ram 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentguard_ram-0.1.0.tar.gz | 56.5 kB | Without provenance | Details for agentguard_ram-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentguard_ram-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentguard_ram-0.1.0-py3-none-any.whl |
Total release size: 61.6 kB
Release files / agentguard_ram-0.1.0.tar.gz
| Download URL | agentguard_ram-0.1.0.tar.gz |
|---|---|
| Size | 56.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93e24cba98094355efd4f9bf192fb1a8049260f27f5dc357fe0f01ac35e24828
|
|
BLAKE2b-256 checksum How to use checksums |
fff81f74709cebe590fdfcad255733c48c23516c246ec7bc753192ab6b5259d2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / agentguard_ram-0.1.0-py3-none-any.whl
| Download URL | agentguard_ram-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
02b074a5da1011d08969eda49998e72e5d879067ba04bd55c64d3771a5b28f5e
|
|
BLAKE2b-256 checksum How to use checksums |
6e103e38257e00c844353b2a204d24f2ca5a153467205b0bda3a623584a2c37b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for agentguard-ram 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.