Cayu: An Open-Source Python Framework for Building Long-Horizon Domain-Specific Agents

Cayu is an open-source Python framework arguing that AI Agent differentiation comes from the harness and runtime around the model, not the model itself.
Cayu is an open-source Python framework for domain-specific, long-horizon agents. Its central thesis is that as large models converge in capability, true agent differentiation comes from the system built around the model — a harness of context, tools, policies, and verification — plus a durable runtime handling sessions, state, recovery, approvals, and budgets. Using a month-end close agent as its example, the framework cleanly separates harness (domain logic) from runtime (execution infrastructure). The team's experience in finance and accounting revealed that the hardest part of long-horizon tasks isn't the agent loop, but managing failure recovery, human feedback, and cost constraints across hours or days of execution. The project is in early open-source stages and plans to publish τ-bench scores to quantitatively validate its architecture.
As large model capabilities continue converging toward parity, where does AI Agent differentiation actually come from? The open-source Python framework Cayu offers a clear answer: not the model itself, but the entire system built around it — what it calls a "harness."

What Is Cayu
Cayu is an open-source Python framework designed for domain-specific, long-horizon agents. Its core idea is to let developers "assemble" a harness around their own tools, knowledge, and business rules, while the framework provides the building blocks, sensible defaults, and an integrated durable runtime.
This runtime handles sessions, state, workers, recovery, approvals, budgets, replay, and observability — essentially all execution-layer concerns. The project is open-sourced on GitHub (cayu-dev/cayu) and includes an online walkthrough (cayu.dev/walkthrough).
The Core Argument: Differentiation Lives in the System Around the Model
The Cayu team puts forward a pointed thesis: as model capabilities improve, agent differentiation will increasingly come from "the system built around the model" rather than the model itself. Specifically, this differentiation shows up across four dimensions:
- What context the agent can see
- What tools it has access to
- What actions it's permitted to take
- How its work is verified
The team uses "harness" as an umbrella term for this entire system — encompassing context, tools, memory, policies, domain logic, verification, and evals. Developers use Cayu to assemble and customize this harness, while the integrated runtime handles execution underneath.
This framing will feel familiar to anyone with a traditional ML engineering background. Cayu's co-founders bring experience spanning data science and statistics (an MS in statistics and a PhD in chemical engineering, with ML work in pharma and semiconductor manufacturing), while its CTO is an International Mathematical Olympiad medalist and second-time founder. They're candid about it: in data science practice, "the model is only part of the product — domain knowledge, data pipelines, validation, and surrounding software determine whether it's actually useful." They see the same pattern emerging now in the Agent space.
A Concrete Example: The Month-End Close Agent
To illustrate the division of labor between harness and runtime, Cayu uses a financial scenario — a month-end close agent.
Such an agent needs: access to financial records, knowledge of reconciliation rules, the means to investigate anomalies, and the ability to satisfy approval requirements before posting adjustments. These choices belong to the harness — they define what the agent knows and can do within a specific domain.
On the other side, this agent also needs to save progress while waiting for documents or reviewers, recover from interruptions, track what has happened, and monitor cost consumption. These belong to the runtime. Cayu's value lies in bringing both types of concerns into a single Python framework, sparing developers from repeatedly rebuilding the same components and execution infrastructure.
Why Long-Horizon Tasks Are the Real Hard Part
Cayu's architecture grew out of the team's hands-on experience building enterprise-grade agents for operational domains like finance and accounting. They arrived at a counterintuitive conclusion: the agent loop itself is rarely the hardest part.
The real complexity emerges when execution spans hours or even days — involving massive numbers of model and tool calls, continuously arriving evidence, human feedback, various failures, integration with real systems, and spending constraints. What's even trickier is having enough state and evidence to determine "whether the work is actually done."
The team is careful to note that these tasks can still be bounded. Something like "process these 5,000 documents" has a clear finish line, even if reaching it requires thousands of decisions, multiple review pauses, and failure recoveries. It was precisely the experience of repeatedly rebuilding these components and execution infrastructure that led the team to consolidate them into Cayu.
"Long-horizon" tasks are fundamentally different from simple one-shot Q&A or short automation flows. Short-horizon tasks typically complete in seconds to minutes, have simple state, and can be retried directly on failure. Long-horizon tasks may span hours or days, involve hundreds or thousands of tool calls, require continuous context maintenance, must respond to external events (such as human approvals or new data arriving), and need to recover precisely from any point of failure. This places distributed-transaction-like demands on the underlying runtime: idempotency (repeated execution of the same operation produces no side effects), checkpoint persistence, and replayable execution logs. Traditional stateless LLM call chains can't natively support these properties — which is exactly why a framework like Cayu is needed to handle them at the execution layer.
Current State and What's Next
Cayu has already been deployed in enterprise settings, though the open-source project is still in early stages. The team is particularly eager for feedback from developers building domain-specific agents.
The immediate roadmap includes publishing benchmark scores on τ-bench (tau-bench), similar to what Sierra has released — reportedly coming within the next few weeks. This move is especially critical for validating Cayu's "systems over models" argument: only with comparable evaluation data can it be demonstrated that the harness + runtime combination delivers measurable differences in real-world workflows.
For developers focused on shipping AI Agents in production, Cayu offers an architectural paradigm worth watching: rather than chasing a stronger model, invest the energy in context management, tool orchestration, policy constraints, and outcome verification — the "surrounding engineering." This echoes a growing consensus in the industry: agent reliability is often determined by its engineering shell, not the underlying model.
τ-bench (tau-bench) is a benchmark suite released by Sierra AI specifically designed to evaluate the reliability of conversational AI agents in real-world business scenarios. Unlike benchmarks such as MMLU or HumanEval that focus on knowledge or coding ability, τ-bench simulates customer service tasks in industries like retail and aviation, requiring agents to accurately execute database queries, follow business rules, and correctly handle edge cases across multi-turn conversations — with task completion rate (pass rate) as the core metric. Because the benchmark directly measures execution accuracy in structured workflows rather than language quality alone, τ-bench scores carry strong persuasive weight for a framework like Cayu that emphasizes "systems engineering determines reliability" — a high score signals that the harness + runtime combination genuinely translates model capability into stable, business-ready execution.
Related articles

LynnReal-Omni: 32B Unified Video Diffusion Model Goes Open Source with Multi-Task Coverage in Four Steps
LynnReal-Omni is a 32B unified video diffusion model on MiniMax H3, covering text-to-video, pose guidance, style transfer, restoration in 4 steps. Flash version generates 540p video in 377ms on one H100.

Anthropic Co-Founder: AI 'Kill Switch' May Need to Be Mandatory by Law
Anthropic's co-founder tells the BBC that AI 'kill switches' may need to be legally mandated. We analyze the industry logic, technical challenges, and the tension between regulation and innovation.

The AI Data Center Boom Is Colliding With Cities Scarred by Heavy Industry
The AI data center boom is clashing with post-industrial communities. Philadelphia's case reveals structural conflicts between AI growth, energy use, water, and environmental justice.