Keep work moving.
Maintain state across long sessions. Coordinate workers, pause for input, and recover from recorded evidence.
Sessions & recoveryOpen source · Python · Apache 2.0
Cayu is an open-source Python framework for building and running domain-specific long-horizon agents. Compose a harness around your tools, knowledge, and business rules—with a durable runtime built in.
pip install cayuHow Cayu works
Cayu brings the building blocks, harness components, and runtime together in one Python framework. You supply the domain knowledge and define how the agent does its job.
| Concept | Its role in Cayu |
|---|---|
| Framework | The Python structure, APIs, defaults, and components you build with. |
| Harness | The system you assemble with Cayu: context, tools, memory, policies, domain logic, and verification. |
| Runtime | The integrated execution machinery: sessions, state, workers, recovery, approvals, and budgets. |
| Agent | The resulting product that performs work in your domain. |
Cayu frameworkPython APIs, defaults, and components to build with
Propose the next step
Your choice of providerCheck permission, then act
Your systems and functionsCollect and verify evidence
Context for what comes nextContinue toward the goal Wait for input Finish
Long-horizon work
“Process these 5,000 documents” has a finish line. Getting there may involve thousands of calls, new evidence, a human decision, and a restart.
Hour 3
Review 5,000 documents, extract the required fields, and flag exceptions. Your harness defines the checks. Cayu records the execution.
The goal stays bounded as the execution grows.
Results and session progress recorded
Continue reviewing the remaining documents.
Hour 17
Sixteen documents need a reviewer’s decision. The session waits with its evidence and progress intact, ready for the next input.
Waiting for a person is part of the workflow.
16 exceptions attached to the session
Waiting for the reviewer to confirm classifications.
Hour 20
After the reviewer responds, processing continues. Then the worker exits. Durable records preserve what is known; uncertain actions remain explicit.
A stopped process should not erase the history.
Last confirmed batch preserved in durable storage
Inspect the recorded state before continuing.
Hour 20 · resumed
A replacement worker loads the session. In this example, the completed batches are confirmed and the remaining documents can be processed.
Ambiguous external effects require reconciliation before retrying.
Confirmed results restored · 1,080 documents remaining
Resume from the last confirmed batch.
Hour 26
All documents are accounted for, the reviewer’s decisions are applied, and your harness’s completion checks pass. The result is ready with its supporting evidence.
Completion is checked against criteria you define.
5,000 documents accounted for · 16 exceptions resolved
Results, decisions, and execution history are available.
This example shows the lifecycle you can build with Cayu. Your harness defines the business rules and completion checks.
Start building
Start with a project that has a place for your prompts, tools, policies, memory, and evals. Bring the libraries and domain code your team already uses.
Read the quickstartPython 3.11+ · Run locally or on your infrastructure
pip install cayu
cayu new support-agent
cd support-agentcayu check --fail-on warning --json
pytest
cayu eval runConfigure your model provider in configuration/settings.py or CAYU_PROVIDER first.
python run.py --message "Review this change."Open the generated project in your development tool, or start with this prompt and build and refine your agent together.
Install cayu and create a document review agent. Use cayu new to scaffold the project. Define the required fields, flag exceptions for human review, and add completion checks and evals. Ask me about the document format and model provider before configuring them.
What Cayu handles
Maintain state across long sessions. Coordinate workers, pause for input, and recover from recorded evidence.
Sessions & recoveryDefine which tools an agent may use, when approval is required, and how much a run may spend.
Permissions & budgetsInspect the work, trace model costs, and evaluate behavior using the path the agent took and the result it produced.
Observability & evalsBuild, then operate
Build your agent and its domain-specific harness with Cayu. Run it on your own infrastructure, or use Cloud as your team’s shared workspace.
Why we built it
We kept rebuilding the same infrastructure around agents for finance, accounting, and enterprise operations. The complexity grew when the work had to continue across days, decisions, and failures.
We brought those building blocks and the runtime together in Cayu. Our background in ML and industrial systems shapes the approach: domain knowledge, verification, and the system around the model matter.
Meet CayuA few useful answers
Cayu is an open-source Python framework for building and running domain-specific long-horizon agents. It provides components and defaults to assemble your agent’s harness, with an integrated runtime for durable, controlled execution.
A harness is the system around the model: context, tools, policies, domain logic, memory, and verification. You assemble and customize it with Cayu to define how your agent does its job.
When work spans many decisions, interacts with real systems, waits for people, needs to survive interruptions, or operates under cost and permission constraints. The goal can be bounded even when execution takes hours or days.
Yes. Cayu provides defaults and replaceable Python contracts for models, context, tools, execution, and storage. Supported provider integrations include OpenAI, Anthropic, Amazon Bedrock, Google Vertex AI, and OpenAI-compatible APIs. You can implement your own provider contract.
No. Agents built with Cayu run on infrastructure you choose, with a packaged operator dashboard included. Cayu Cloud is an optional shared workspace for building, deploying, operating, and improving your agents.
Yes. Cayu is licensed under Apache 2.0. You can inspect, modify, and self-host it. We use Cayu in enterprise deployments; the open-source project is early, and we welcome feedback from teams building domain-specific long-horizon agents.
Build for the long run
What does your agent need to do?
Join the conversation ↗