Kitaru
Getting Started

Examples

Runnable Kitaru examples and what each one demonstrates

The Kitaru repo includes runnable examples that demonstrate each primitive. Each example is a standalone project — clone the repo, cd into the example you want, and run it directly.

Get the examples

git clone https://github.com/zenml-io/kitaru.git
cd kitaru/examples/basic_flow
kitaru init
python first_working_flow.py

Run kitaru init once before your first example to set up the local execution environment.

Every example uses imports relative to its own directory, so always cd into the example folder before running.

Connection context

Examples use whatever Kitaru connection context is already active.

  • If you are just trying Kitaru locally, run them as-is.
  • If you already have a deployed Kitaru server and want the examples to use it, connect first and verify the active context before running the example.
kitaru login https://my-server.example.com
kitaru status

Browse by goal

I want to...ExampleRun
Start with the smallest runnable flowbasic_flow/python first_working_flow.py
See structured metadata loggingbasic_flow/python flow_with_logging.py
Persist and reload data across executionsbasic_flow/python flow_with_artifacts.py
Set runtime configuration defaultsbasic_flow/python flow_with_configuration.py
Inspect and manage past executionsexecution_management/python client_execution_management.py
Pause for human input and resume laterexecution_management/python wait_and_resume.py
Replay from a checkpoint with overridesreplay/python replay_with_overrides.py
Track a model call inside a flowllm/python flow_with_llm.py
Wrap a PydanticAI agentpydantic_ai_agent/python pydantic_ai_adapter.py
Query executions from an MCP clientmcp/python mcp_query_tools.py

For example:

cd examples/basic_flow
python first_working_flow.py

Core workflow basics

ExampleDemonstratesRelated docs
basic_flow/first_working_flow.pySmallest @flow + @checkpoint exampleQuickstart
basic_flow/flow_with_logging.pykitaru.log() metadata at flow and checkpoint scopeLogging
basic_flow/flow_with_artifacts.pykitaru.save() and kitaru.load() across executionsArtifacts
basic_flow/flow_with_configuration.pykitaru.configure() defaults, overrides, and frozen specsConfiguration

Execution lifecycle and recovery

ExampleDemonstratesRelated docs
execution_management/client_execution_management.pyKitaruClient for listing runs, reading details, and loading dataExecution Management
execution_management/wait_and_resume.pykitaru.wait() with inline prompt or CLI input/resumeWait, Input, and Resume
replay/replay_with_overrides.pyReplay from a checkpoint with overridden inputsReplay and Overrides

LLMs and agent integrations

ExampleDemonstratesRelated docs
llm/flow_with_llm.pykitaru.llm() prompt-response tracking with usage metadataTracked LLM Calls
pydantic_ai_agent/pydantic_ai_adapter.pyWrap a PydanticAI agent with Kitaru replay boundariesPydanticAI Adapter
mcp/mcp_query_tools.pyQuery executions and data through the Kitaru MCP serverMCP Server

The LLM and PydanticAI examples require additional dependencies — check each example's README for setup instructions.

If you are learning Kitaru from scratch:

  1. basic_flow/first_working_flow.pyQuickstart
  2. basic_flow/flow_with_logging.pyLogging
  3. basic_flow/flow_with_artifacts.pyArtifacts
  4. execution_management/client_execution_management.pyExecution Management
  5. execution_management/wait_and_resume.pyWait, Input, and Resume
  6. replay/replay_with_overrides.pyReplay and Overrides
  7. llm/flow_with_llm.pyTracked LLM Calls
  8. pydantic_ai_agent/pydantic_ai_adapter.pyPydanticAI Adapter
  9. mcp/mcp_query_tools.pyMCP Server

On this page