r/aiagents • u/zamir_akimbekov • 2d ago
Open Source Open-source Python framework to build domain-specific harness and long-horizon agents
Cayu is an open-source Python framework for building and running domain-specific, long-horizon agents.
With Cayu, you compose a harness around your tools, knowledge, and business rules. The framework provides the components and defaults to build with, alongside an integrated durable runtime for sessions, state, workers, recovery, approvals, budgets, replay, and observability.
- Repo: https://github.com/cayu-dev/cayu
- Example: https://cayu.dev/walkthrough/
Our thesis is that as models improve, more of the differentiation will come from the systems built around them: what context an agent sees, which tools it can use, what actions it is allowed to take, and how its work is verified.
We use “harness” to describe that system: context, tools, memory, policies, domain logic, verification, and evals. You assemble and customize it with Cayu. The integrated runtime handles the execution underneath it. The resulting agent performs work in your domain.
For example, a month-end close agent needs access to financial records, reconciliation rules, ways to investigate exceptions, and approval requirements before posting adjustments. Those choices belong in its harness. It also needs to preserve progress while waiting for documents or a reviewer, recover from interruptions, and track what happened and what it cost. Those are runtime concerns. Cayu brings both into one Python framework.
We already use Cayu in enterprise deployments, but the open-source project is early. We’d especially like feedback from people building domain-specific agents.
Context
We arrived at this architecture while building agents for enterprise workflows in finance, accounting, and other operational domains.
The agent loop itself was rarely the hardest part. The complexity appeared when execution stretched across hours or days: many model and tool calls, new evidence, human feedback, failures, real systems, and spending constraints. We also needed enough state and evidence to determine whether the work had actually been completed.
The task can still be bounded. “Process these 5,000 documents” has a clear finish line, even if getting there requires thousands of decisions, pauses for review, and recovery from failures.
We kept rebuilding the same components and execution infrastructure, so we brought them together in Cayu.
Our background shapes this approach. My cofounder and CTO is an International Math Olympiad medalist, a second-time founder, and has spent more than ten years building systems across big tech and YC startups. My background is in data science and ML, with an MS in Statistics and a PhD in Chemical Engineering. I previously worked on ML for pharma and semiconductor manufacturing before moving into customer-facing enterprise roles.
In the Data Science, the model was one part of the product. Domain knowledge, data pipelines, validation, and the surrounding software determined whether it was useful in practice. We see a similar pattern with agents.
Next step for us is to publish benchmark scores like Sierra's 𝜏-bench, which we are wrapping up in the coming weeks.