Choose an integration
Pick the guard, the gate, or the hook for your agent, and decide how independent the check needs to be.
Pick the guard, the gate, or the hook for your agent.
Coco checks tool calls wherever your agent runs. Find your agent below, then follow its guide.
| Your agent | Use | What you get | Guide |
|---|---|---|---|
| Python on coco-framework | CocoGuard | One middleware line. An ESCALATE pauses the graph until a person decides. | Python agents |
| Python on upstream LangChain or LangGraph | coco_sdk.langchain.CocoGuard | The same guard on upstream's middleware. | LangChain and LangGraph |
| TypeScript | CocoEnforcer | A check you call before your code runs the tool. | TypeScript |
| Any other runtime or language | POST /v1/check | The same check over HTTP. | HTTP API |
| Claude Code | The trustcoco installer | A PreToolUse hook, ahead of Claude Code's own permission prompt. | Claude Code |
Where the decision happens
| Path | Who decides | Where the receipt lives |
|---|---|---|
| In process | Engine, inside your application, against the contract files in the project. | A SQLite ledger in the project, .coco/ledger.db by default. |
| Hosted gate | The gate, over HTTP, against the contracts registered for your project. | The gate's ledger, shown in the dashboard's Audit Logs. |
| Claude Code hook | The engine, in the hook process, against the contracts in COCO_HOME. | COCO_HOME, or the gate once you connect it. |
The guard and the gate combine. A Python project decides in process until coco connect gives it a gate URL and a key. After that, load().engine() and load().guard() decide through the gate, and your agent code stays the same. The TypeScript client always calls the gate.
How independent the check needs to be
In process, the guard is part of your application, and whoever owns the code owns the guard. The gate is a separate service with its own keys, contracts, and record, so the agent's host can't change a rule or a receipt. Choose the gate when the record has to stand up outside the team running the agent.
Keep in mind: The gate's round trip hasn't been measured. An in-process rule decision takes 0.27 ms at the median.