Coco SDK documentation
Check every tool call your AI agent makes against your own policy, before the call runs.
New to Coco? Start with the Quickstart.
Get started
- Quickstart: Install the SDK, connect a project, and send a test transaction.
- Install: Choose packages and extras, and upgrade.
- Your first governed agent: Take a policy PDF to contracts, Monitor, Enforce, and a person's approval.
Understand Coco
- How Coco enforces: Follow one tool call from proposal to receipt.
- Architecture: See the parts, the data flows, and the decisions behind the design.
- Results: See what each layer stops, and what it costs.
Integrate and operate
- Choose an integration: Pick the guard, the gate, or the hook.
- Python agents: Attach
CocoGuard, supply facts, and pause for a person. - LangChain and LangGraph: Use the guard on upstream LangChain.
- TypeScript: Check calls from Node with
CocoEnforcer. - Claude Code: Put Coco in front of Claude Code's tools.
- Connect to the gate: Manage keys and projects, and see what changes once connected.
- Turn policies into contracts: Take documents to reviewed, live contracts.
- Write contracts: Write rules and judge checks by hand.
- Monitor to Enforce: Roll out safely and handle escalations.
- Evaluate: Replay labelled calls through your contracts and the benchmarks.
- Agentic workflows: Govern a multi-step workflow, with a worked example.
Look something up
- CLI: Every
cocoandtrustcococommand. - Configuration:
coco.yaml,.env, and environment variables. - Contracts and rules: The contract format and the rule language.
- Python API:
load,CocoGuard,Engine,RemoteEngine, andDecision. - HTTP API: The gate and the document service.
See it applied
- Use cases: How Coco governs payments, KYC, KYB, and drug discovery agents.