Coco documentation
Build tool-calling agents with coco-framework, and check every tool call they make with the Coco SDK.
Build agents with the framework, and govern them with the SDK.
Coco has two parts. coco-framework is the Python library your agent runs on. The Coco SDK checks each tool call against your own policy before the call runs. Most teams use both, and the SDK also works with LangChain, TypeScript, Claude Code and plain HTTP.
SDK
Check every tool call your agent makes against your policy, keep a receipt of each decision, and pause for a person.
Framework
Build tool-calling agents in Python, with every tool call passing through the middleware where Coco's check attaches.
Which one you need
| You want to | Start with |
|---|---|
| Check an agent you already have | SDK Quickstart. The SDK works with coco-framework, LangChain, TypeScript, Claude Code and HTTP. |
| Build a new Python agent | Framework Quickstart, then add the check with Python agents. |
Packages and imports
The two parts install separately and import under different names. Use this table to tell them apart.
| Distribution | Where from | Import | Part | Holds |
|---|---|---|---|---|
trustcoco-sdk | Coco's package index | coco_sdk | SDK | The engine, CocoGuard, RemoteEngine, the Claude Code hook, and the coco command. |
coco-framework | PyPI | coco, coco_core, coco_graph, coco_openai, coco_anthropic | Framework | create_agent and the middleware, the graph engine and checkpointers, messages and tools, and the chat models. |
Keep in mind: import coco is the framework, and import coco_sdk is the SDK. The coco command comes from the SDK. To use both, install coco-framework, then trustcoco-sdk without the [framework] extra, as the Framework Quickstart does. The framework's separate packages are listed in Install.