Kitaru

Core Concepts

The mental model behind Kitaru's durable execution primitives

Kitaru gives you durable execution for AI agent workflows using a small set of Python primitives. You write normal Python — Kitaru handles persistence, observability, and recovery underneath.

This section explains the ideas you need to understand before using Kitaru effectively.

Core ideas

ConceptWhat it is
FlowThe outer durable boundary around your workflow
CheckpointA unit of work inside a flow whose output is persisted
ExecutionA single run of a flow, identified by a unique ID
Structured metadataKey-value data you attach to executions and checkpoints with kitaru.log()
Runtime log storageWhere runtime logs are sent (configured separately from structured metadata)
Active stackThe default execution target used when no per-run stack=... override is passed

What you can use today

Kitaru's current release includes:

  • @flow — mark a function as a durable workflow
  • @checkpoint — mark a function as a persisted work unit
  • kitaru.log() — attach structured metadata to the current scope
  • kitaru.wait() — pause a flow until external input is supplied
  • kitaru.llm() — make tracked model calls with prompt/response capture
  • kitaru.connect() — connect to a Kitaru server
  • kitaru.configure() — set process-local runtime defaults
  • kitaru.save() / kitaru.load() — persist and load named artifacts in checkpoints
  • kitaru.list_stacks() / kitaru.current_stack() / kitaru.use_stack() — manage the default stack
  • KitaruClient — inspect executions, fetch logs, resolve waits, retry, replay, and browse artifacts
  • FlowHandle — interact with a running or finished execution

All of the primitives listed here ship today. Some capabilities are backend-dependent — for example, runtime log retrieval requires a server-backed connection — but they are part of the supported Kitaru surface.

Explore the concepts

On this page