Coco

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.


Which one you need

You want toStart with
Check an agent you already haveSDK Quickstart. The SDK works with coco-framework, LangChain, TypeScript, Claude Code and HTTP.
Build a new Python agentFramework 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.

DistributionWhere fromImportPartHolds
trustcoco-sdkCoco's package indexcoco_sdkSDKThe engine, CocoGuard, RemoteEngine, the Claude Code hook, and the coco command.
coco-frameworkPyPIcoco, coco_core, coco_graph, coco_openai, coco_anthropicFrameworkcreate_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.

On this page