whatisgithub

What is cayu?

cayu-dev/cayu — explained in plain English

Analysis updated 2026-05-18

5PythonAudience · developerComplexity · 4/5Setup · moderate

In one sentence

Cayu is a Python runtime that gives production AI agents durable sessions, controlled tools, budgets, and replayable event history so failures can be recovered from instead of causing data loss.

Mindmap

mindmap
  root((Cayu))
    What it does
      Durable agent sessions
      Controlled tool execution
      Human approval checkpoints
      Context and budget management
    Tech stack
      Python
      FastAPI
      SQLite
      Multiple model providers
    Use cases
      Production agents
      Crash recovery
      Cost tracking
      Behavior testing
    Audience
      Backend developers
      Agent builders

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Build a production AI agent whose work can survive a crash and resume from where it left off.

USE CASE 2

Add human-approval checkpoints before an agent takes a risky or irreversible action.

USE CASE 3

Track cost and token usage across long or branching agent runs.

USE CASE 4

Write automated tests and evaluations that check an agent's behavior, not only its final text output.

What is it built with?

PythonFastAPIOpenAI APIAnthropicSQLite

How does it compare?

cayu-dev/cayu1ncendium/aibusteraaronmayeux/ha-hurricane-tracker
Stars555
LanguagePythonPythonPython
Setup difficultymoderatemoderateeasy
Complexity4/53/52/5
Audiencedeveloperops devopsgeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires Python 3.11+ and an API key from a supported model provider such as OpenAI or Anthropic.

No license information is stated in the README.

So what is it?

Cayu is a Python runtime for building AI agents meant to run in production, not just as quick demos. The idea is that starting an agent prototype is easy, but the failures that matter show up later: a process crashes right after taking an action but before saving state, a model asks to use a tool it should not have access to, a run needs a person to approve something partway through, or the conversation grows too long for the model provider to accept another request. Cayu is built to handle those situations directly as part of the runtime, rather than leaving each application to solve them on its own. Instead of giving you a visual workflow builder or a simple chain-of-prompts helper, Cayu provides lower-level building blocks that your own application code combines: durable sessions that can survive a crash and be resumed, typed tools with clearly declared effects and policies around who can approve them, ways to manage a growing conversation so it does not overflow the model's limits, and structured events so a person can later reconstruct exactly what an agent run did. It also includes budget and cost tracking, support for multiple model providers such as OpenAI, Anthropic, Bedrock, and Vertex, and built-in ways to write tests and evaluations that check an agent's behavior, not just its final answer. To get started, you install Cayu with pip and use its command-line tool to scaffold a new project, which comes with one basic model-only agent, a test, and an evaluation already wired up. From there you build out your specific agent by adding tools and environment access as needed, following a documented loop of understanding the task, inspecting the project, planning a change, making it, then testing and evaluating the result. Cayu also ships an included FastAPI-based control plane and inspection dashboard for observing running agents. Cayu requires Python 3.11 or newer and separates concepts clearly: an agent describes who is acting, an environment describes what it can touch such as files or network access, and a session records one specific execution and its history. This separation is meant to keep production agent systems predictable even as they grow more complex.

Copy-paste prompts

Prompt 1
Run pip install cayu and create a code review agent using Cayu's project scaffold.
Prompt 2
Show me how to register an OpenAI provider and run a Cayu agent to completion with run_to_completion.
Prompt 3
How do I add an approval checkpoint in Cayu before a tool executes a risky action?
Prompt 4
Explain the difference between an AgentSpec, Environment, and Session in Cayu's mental model.
Prompt 5
Write a Cayu tool with an explicit ToolEffect and policy that requires human approval.

Frequently asked questions

What is cayu?

Cayu is a Python runtime that gives production AI agents durable sessions, controlled tools, budgets, and replayable event history so failures can be recovered from instead of causing data loss.

What language is cayu written in?

Mainly Python. The stack also includes Python, FastAPI, OpenAI API.

What license does cayu use?

No license information is stated in the README.

How hard is cayu to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is cayu for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.