Agent Control - Python SDK
Python SDK for adding safety controls and guardrails to AI agents. Protect tools and LLM calls with server-side or local policy enforcement.
Installation
pip install agent-control-sdk
Quick Start
import agent_control
from agent_control import control
# Initialize
agent_control.init(agent_name="my-agent")
# Protect a tool with decorator
@control()
async def search_database(query: str) -> str:
return db.execute(query)
Controls are defined centrally and enforced automatically at runtime. See Python SDK Documentation for complete reference.
Sharing an OpenTelemetry provider with Google ADK
When Google ADK and Agent Control should export through the same OpenTelemetry
pipeline, configure one SDK TracerProvider and pass it to both components:
import agent_control
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from openinference.instrumentation.google_adk import GoogleADKInstrumentor
from opentelemetry.sdk.resources import Resource
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
resource = Resource.create({"service.name": "my-google-adk-agent"})
provider = TracerProvider(resource=resource)
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
trace.set_tracer_provider(provider)
GoogleADKInstrumentor().instrument(tracer_provider=provider)
agent_control.init(
agent_name="my-google-adk-agent",
observability_enabled=True,
observability_sink_name="otel",
observability_sink_config={"enabled": True},
otel_tracer_provider=provider,
)
Agent Control reuses this provider without adding an exporter or span processor. It force-flushes the provider during shutdown but leaves provider shutdown to the application. If no provider is passed, the OTEL sink first checks for a globally registered SDK provider, then falls back to its existing Agent Control-owned OTLP pipeline.
Release files for agent-control-sdk 8.8.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 | |
|---|---|---|---|
| agent_control_sdk-8.8.0.tar.gz | 210.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| agent_control_sdk-8.8.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 347.4 kB
Release files / agent_control_sdk-8.8.0.tar.gz
| Download URL | agent_control_sdk-8.8.0.tar.gz |
|---|---|
| Size | 210.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b82d91bf6f34bff77a2b6b06a5be69766cae5e9e1804c6766b0d690eb28b3fd8
|
|
BLAKE2b-256 checksum How to use checksums |
35c97e731d0b5e7614dcb4eb37a4a97a2b612034dc4e42ecc4abe9a878c7ef80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / agent_control_sdk-8.8.0-py3-none-any.whl
| Download URL | agent_control_sdk-8.8.0-py3-none-any.whl |
|---|---|
| Size | 137.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a9978cb6d2f0d01263e085f36db92afc357d8eb6d85cd05fbab0dc22edf6af0
|
|
BLAKE2b-256 checksum How to use checksums |
c926634f1278af4aa8fdcd38f82767b3ae81c2e34a90c6f061b4f48e6f58c3af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|