Coco
Look something up

Troubleshooting

Fix common coco-framework errors, from async-only middleware and SQLite under ainvoke to PostgreSQL setup and package clashes.

Find an error you're seeing and its fix.


NotImplementedError: Synchronous implementation of wrap_tool_call is not available

A middleware implements only awrap_tool_call, and the agent ran with the synchronous agent.invoke() or agent.stream(). Call await agent.ainvoke() or agent.astream(), or implement wrap_tool_call on the middleware too.

SqliteSaver does not support async methods

The agent ran with agent.ainvoke() on a graph compiled with SqliteSaver. Use AsyncSqliteSaver from coco_graph.checkpoint.sqlite.aio.

PostgreSQL checkpoint tables are missing

Call setup() on PostgresSaver, or await setup() on AsyncPostgresSaver, once before any graph runs. See In PostgreSQL.

import psycopg fails

psycopg can't find the libpq client library. Install psycopg[binary], which bundles it.

A gpt-6 model fails against an OpenAI-compatible endpoint

For models whose names start with gpt-6, a call with tools goes to /v1/responses. Point it at an endpoint that serves the Responses API. See Configure OpenAI.

Modules change after installing the SDK

coco-framework and the trustcoco-* distributions hold the same coco* modules. Install one or the other. With coco-framework, install the SDK as trustcoco-sdk, without the [framework] extra. See Add Coco's check.

On this page