Build for your domain. Keep the work moving.
Cayu is an open-source Python framework for building and running domain-specific long-horizon agents, with a durable runtime built in. Choose and configure the components your agent needs.
One framework. The pieces of your agent.
You build with Cayu’s Python APIs and components. The harness you assemble defines how the agent works; the integrated runtime supports its execution. Together, they power your domain-specific product.
| 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. |
The harness is specific to your domain. The runtime provides reusable execution capabilities that you configure for the job.
Choose the capabilities your agent needs.
Build the whole agent with Cayu’s Python APIs, components, and defaults. Compose models, tools, context, memory, collaborators, and evaluations into a harness for your domain.
Connect a provider and configure reasoning, tool calls, structured output, validation, and repair through Python contracts.
- OpenAI, Anthropic, Bedrock, Vertex, and compatible or custom providers.
- Provider-neutral model requests and reasoning controls.
- Tool-based and native structured output.
- Validation with bounded repair.
Compose application services, calculations, workflows, and external capabilities as tools with explicit inputs and results.
- Typed Python tools and structured results.
- MCP toolsets and capability discovery.
- Application-owned service tools and reusable workflows.
- Explicit effects, policies, and approval requirements.
Choose what the model sees, what the agent retains, and how prior evidence is retrieved and reviewed.
- Token counting, projection, compaction, and context-overflow recovery.
- Prompt-cache-aware context management.
- Reviewed knowledge stores behind replaceable contracts.
- Bounded recall over knowledge and transcripts, with retained provenance.
Add search, fetch, and stateful browser tools to the agent, using the adapters and execution boundaries appropriate to the job.
- Search and fetch provider adapters.
- Stateful browser interactions and grounded targets.
- Application-selected browser execution backends.
- Policies, approval, and credential boundaries around web actions.
Coordinate agents, tasks, files, and artifacts through the framework while defining the domain-specific responsibilities in your application.
- Subagents, delegation, session forks, and participant coordination.
- Durable peer requests and child-session lineage.
- Workspaces, files, artifacts, and replaceable execution runners.
- Work contracts, acceptance checks, and repair decisions.
- Git and GitHub delivery with retained receipts.
Make execution visible alongside the final result. Track model usage and cost, and evaluate the work against criteria your team owns. The runtime enforces budgets.
- Causal cost attribution across retries, branches, and subagents.
- Structured events, OpenTelemetry, and the packaged operator dashboard.
- Trajectory evals, run comparisons, and offline replay.
Put your expertise into how the agent works.
Start with Cayu’s defaults, then compose the context, tools, rules, and checks the job needs. Your team controls the behavior through editable Python.
Context & knowledge
Choose the documents, records, instructions, and evidence the model sees at each step.
For document review: required fields and source records.
Tools & integrations
Connect Python functions, business systems, and external capabilities to the work.
Read documents, look up records, and prepare a review report.
Domain logic
Express the rules, calculations, and workflows specific to the job in ordinary Python.
Validate fields and route exceptions using your business rules.
Memory
Define what the agent retains, how it retrieves prior work, and which knowledge needs review.
Recall reviewed exceptions and relevant earlier decisions.
Policies & approvals
Set the permitted actions, spending limits, and points where a person must decide.
Require review before writing back to a business system.
Verification & evals
Define completion checks and evaluation cases for the result and the path taken.
Check coverage, source evidence, and handling of exceptions.
Illustrative job: review 5,000 documents, flag exceptions, and produce a report with evidence.
From a defined job to a working application.
Define the job and its finish line.
Specify the inputs, expected outputs, success criteria, and decisions that need human review.Start a Python project.
cayu new myagentcreates a project with places for prompts, tools, policies, memory, domain code, tests, and evals.Compose and configure.
Add your domain behavior, choose a model provider, connect the tools, and configure storage, approvals, and budgets.Evaluate, then put it to work.
Check representative cases, inspect a run, and refine the harness before deploying it for the people using the agent.
Build directly in Python, or use Codex, Claude Code, or Cursor to help develop your Cayu project.
Let the work continue across hours and days.
A long-horizon agent accumulates state, makes many decisions, and may wait for people or external systems. Cayu includes the execution machinery to keep that work recorded and controlled.
Long executions need a history that survives the worker. Cayu records sessions, events, and checkpoints in your configured durable stores.
- Resume or fork a session from recorded state.
- Persist approvals and interruptions across restarts.
- Fence stale workers through leases and ownership checks.
- Reconcile uncertain external effects before deciding whether to continue.
- SQLite or PostgreSQL persistence with migrations.
Declare tool capabilities, enforce policies and spending limits, and ask for approval at the actions that matter. Keep credential handling inside the boundaries you configure.
- Typed tools and explicit effect declarations.
- Policies and approvals scoped to the requested action.
- Budget reservations and settlement using your price book.
- Virtual credentials with destination-bound, revocable egress.
- Configured redaction before results are persisted.
- Taint-aware tool policy and fail-closed checks for changed MCP manifests.
Compose the task lifecycle in Python, with durable records for how work starts, runs, waits, delegates, and continues.
- Journaled workflows with resumable steps and replay.
- Task dispatch, worker leases, and heartbeats.
- Subagent lineage and recovery-aware reattachment.
- Session workspaces and durable artifacts.
- Replaceable runners and environment factories.
Define what good work looks like in your domain.
Build evaluations around your business rules, expected outputs, and permission boundaries. Inspect the recorded session as well as the final answer.
- Turn representative jobs and reviewed failures into evaluation cases.
- Check outputs, tool use, approvals, and the evidence supporting completion.
- Compare changes to prompts, models, tools, or policies before adopting them.
- Use session forks, replay, and comparison results in your own improvement process.
Your evaluations cover the criteria you define. Your application decides how candidate changes are generated, reviewed, and released.
Explore evaluationsYour agent. Your operating environment.
Run the Cayu application where your models, data, and business systems live. Choose your providers, storage, and execution environment. Cayu Cloud is optional.
Compound focuses on evaluations and reviewed improvement. Its planned Self Improvement — Genetic Algorithm experience is Coming.
Python components you can inspect and extend.
Start with the defaults. Configure or replace the components your harness and application need.
Identity and model behavior remain visible as explicit runtime configuration.
AgentSpecModelProviderThinkingConfigModelRequest
Your configured context policy controls what enters context, what stays, and what gets summarized.
ContextPolicyContextCompactorKnowledgeStoreAutomaticRecallContextPolicy
Capabilities are typed and registered. A tool’s effect is distinct from permission to use it.
ToolToolSpecWorkflowMcpToolset
Authority can depend on arguments, provenance, external state, or a human decision.
ToolPolicyCommandPolicyToolApprovalRequestTaintAwareToolPolicy
The same agent can move between local, isolated, remote, or application-owned execution.
EnvironmentEnvironmentFactoryRunnerWorkspaceBindingArtifactStore
The agent can use an authorized capability without receiving the underlying secret.
VaultCredentialProxyVirtualCredentialSpecHttpEgressPolicy
Long-running work can resume across process boundaries with its causal history intact.
SessionEventSessionStoreRunRequest
The runtime checks durable state and external evidence before recovery continues.
ToolEffectToolRoundRecoveryRequestToolApprovalRecoveryRequestIncompleteSessionRecoveryResult
Cost belongs to the operation, including retries, branches, subagents, caching, and compaction.
UsageMetricsPriceBookBudgetPolicyBudgetLedgerBudgetReservation
Durable runtime primitives let work react, delegate, branch, and continue.
TaskStoreDispatcherEventWatcherSubagentSpecSubagentTool
The full path through the runtime becomes evidence alongside the final answer.
TrajectoryEvalSuiteEvalCaseEvalAssertionLLMJudge
Comparisons, policies, and hooks let you select verified changes and update behavior.
ForkSessionRequestEvalRunComparisonLoopPolicyBeforeStopDecisionRuntimeHook
Inspect the cost of the choices you make.
Context, caching, and tool-exposure choices change what long-horizon execution costs. Cayu ships paired comparisons you can run on your own workload, with every attempt attributed and priced from a source you supply.
Savings depend on the model, prompt, cache state, prices, and quality gate. Deterministic runs use labeled fixture prices; live runs report provider usage and dollar evidence only from a model catalog you supply. These are measurement tools, not universal savings claims.