Agentomy Python SDK
Python client for the Agentomy AI Governance Platform -- wraps the Claw Bridge API for authorization, audit logging, emergency halt, status, and health checks.
Install
pip install agentomy-sdk
The platform itself is a hosted service and its repository is not public, so there is no source install for the SDK outside the platform checkout.
Quick Start
from agentomy import AgentomyClient
# An API key is required -- an Agentomy instance answers 401 without one. The client reads
# AGENTOMY_API_KEY from the environment, so keys stay out of your source:
# export AGENTOMY_API_KEY=<key from your workspace dashboard>
client = AgentomyClient("http://localhost:3000")
# Or pass it explicitly, if you are loading it from a secret manager:
# client = AgentomyClient("http://localhost:3000", api_key=my_secret_manager.get(...))
# Check if action is permitted
result = client.authorize("my-agent", "read", scope="customer-data")
print(result.tier) # Analyst
print(result.audit_id) # claw_1712345678_abc123
# Log an action
log = client.log("my-agent", "read", input_data="query", output_data="result")
print(log.chain_position)
# Emergency halt
halt = client.halt("my-agent", reason="Security incident")
print(halt.agents_affected)
# Fleet-wide halt (no agent_id)
client.halt(reason="Full fleet lockdown")
# Check status
status = client.status("my-agent")
print(status.quarantined) # True after halt
# Bridge health
health = client.health()
print(health.bridge) # "active"
Authentication
In production (when ENABLE_AUTH is set on the bridge), pass your API key:
# The client reads AGENTOMY_API_KEY from the environment when no api_key is passed.
client = AgentomyClient("https://your-instance.agentomy.com")
# Passing api_key="" asks for an explicitly UNAUTHENTICATED client, which ignores the
# environment. Only the public health surface answers without a key.
Quarantine and Release
A halted agent is quarantined and refused until an operator releases it. quarantined()
answers which agents are in that state -- health() only reports a count, and release()
needs an id.
listing = client.quarantined()
print(listing["count"], listing["quarantinedAgents"])
client.release("my-agent", operator_id="operator-alice", reason="investigated")
release() clears one agent's quarantine. It does NOT lift a fleet halt: the authorize gate
checks the fleet halt first, so under an active halt a released agent stays refused. Call
resume() first, then release().
A quarantined agent raises AgentQuarantined, which subclasses AuthorizationDenied -- so
existing except AuthorizationDenied handlers keep working, and code that needs to tell a
quarantine from a tier denial can now catch the specific one.
Error Handling
from agentomy import AuthorizationDenied, AgentQuarantined, ConnectionError, AgentomyError
try:
client.authorize("my-agent", "delete")
except AuthorizationDenied as e:
print(f"Denied: {e}")
except ConnectionError:
print("Bridge unreachable")
except AgentomyError as e:
print(f"API error: {e}")
Tier Permissions
| Tier | Allowed Actions |
|---|---|
| Analyst | read, query, list, search, status |
| Builder | Analyst + write, create, update, execute |
| Operator | Builder + delete, deploy, configure |
| Strategist | Operator + halt, override, admin |
Governed Execution
The SDK provides two helpers that combine authorize + execute + log into a single call:
# governed() -- pass a callable
result = client.governed(
"my-agent",
fn=lambda: my_agent.run_task(),
action="read",
scope="documents"
)
print(result["authorized"]) # True
print(result["result"]) # whatever my_agent.run_task() returned
# governance() -- context manager (Pythonic style)
with client.governance("my-agent", action="write", scope="reports") as auth:
if auth.authorized:
report = generate_report()
# log is called automatically on context exit
Both helpers: authorize before execution, log the result after, and raise AuthorizationDenied if the agent is not permitted.
Running Tests
The SDK's tests run against a live Agentomy instance at localhost:3000 and live in the
platform repository alongside the source, so they are not part of this distribution.
Metadata
Release files for agentomy-sdk 0.4.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 | |
|---|---|---|---|---|
| agentomy_sdk-0.4.0.tar.gz | 21.7 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agentomy_sdk-0.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.7 kB
Release files / agentomy_sdk-0.4.0.tar.gz
| Download URL | agentomy_sdk-0.4.0.tar.gz |
|---|---|
| Size | 21.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8de2caa299b03f7a960eb318585e0dd1c037dbfbb5ddc555c4ae8853d8c01676
|
|
BLAKE2b-256 checksum How to use checksums |
06b3e0f64f8db3fc55a86c0cbf286009e19c3bf8ec24c28e29988f953e527d61
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Release files / agentomy_sdk-0.4.0-py3-none-any.whl
| Download URL | agentomy_sdk-0.4.0-py3-none-any.whl |
|---|---|
| Size | 15.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0fe0d1696ce237fa3a58b526d6910c08800d285c515c1f4ef189a48d12571cf9
|
|
BLAKE2b-256 checksum How to use checksums |
00955ed98e3cb2dc43f1db1ced6b5cc9769d1d79d803541210be41bab8b2a0cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.15
|
Security for agentomy-sdk 0.4.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.