SDKs
Contro1 Python SDK
Install and use the official Contro1 Python SDK to create approval requests, verify signed webhooks, log autonomous actions, and fetch audit evidence.
Use the centcom Python package when your agent runtime, backend service, or workflow worker runs in Python.
Use the integration skill
Copy this skill link into your code agent to add Python SDK and Contro1 to your system.
Key takeaways
- Install the SDK with pip install centcom.
- Use create_protocol_request when an action must pause for human approval.
- Use log_action for allowed autonomous actions that still need durable evidence.
- Verify signed webhooks before resuming any production action.
Install
Use the Python SDK when your agent, service, worker, or webhook bridge is written in Python. The same client handles approval requests, audit records, read APIs, and webhook verification helpers.
Initialize the client
Create an approval request
Call create_protocol_request at the point where a risky action is ready but has not executed yet. Use external_request_id for idempotency and correlation_id to group the full business case.
Verify the webhook
Webhook-first is the production path. Verify the signature and timestamp before trusting status, reviewer comments, or structured response data.
Log autonomous actions
Approval requests already store the human decision. Use log_action for actions that were allowed to run automatically but still need searchable evidence.
Fetch evidence
Send full agent traceability
Beyond the approval call, attach identity, a run trace, the tools you invoked, and the context you retrieved. Each field is optional — add what you have. The verified identity always comes from your API key; a caller-supplied actor.agent_id is recorded as a claimed sub-agent until an admin verifies it.
- trace_id / parent_trace_id — link one run (and sub-agent runs) into a single trace.
- tool_calls[] — what the agent tried to do, so reviewers see the actions.
- retrieved_context[] — the data the decision was based on (RAG provenance).
- Then export a signed evidence packet from GET /requests/:id/evidence.
Frequently asked questions
When should I use the Python SDK instead of a framework connector?
Use the Python SDK for custom Python services, workers, and agents. Use a framework connector when you are inside LangGraph, CrewAI, OpenAI Agents SDK, or another supported runtime with its own pause/resume pattern.
Do approval requests automatically create evidence?
Yes. The request stores context, routing, decision, reviewer, timestamps, callback state, and protocol response. Use audit records for additional autonomous or post-approval events.