Traces you can run, not just read
Score what happened. Replay what could have.
Your agent’s real traces become frozen, replayable worlds for your real code — the test suite production already wrote.
Lightweight, wraps your existing agent
uv add kitaru
One recorded execution.
A different question each time.
Replay the execution. Change one thing. Read the answer off a diff. Nothing reruns in production.
Why did it do that?
Reproduce the failure on your desk — same code, same world, every time.
Is the fix safe to merge?
Replay it against every recorded run that failed the same way.
Can we ship the cheaper model?
Same conversations, cheaper model — read the answer off a diff.
Did the new prompt regress?
Replay last week's traffic against the branch before it merges.
Keep your agent SDK. Make its runs replayable.
Wrap the calls and steps your SDK exposes, and Kitaru stores them as replayable checkpoints. That recording is what replay reads back, so a what-if is faithful, not a guess.
from agents import Runner
from agents.sandbox import SandboxAgent, Manifest
agent = SandboxAgent(
name="Compliance Reviewer",
model="gpt-5-mini",
default_manifest=manifest,
)
result = await Runner.run(agent, task) from kitaru.adapters.openai_agents import KitaruRunner, OpenAIRunRequest
from agents.sandbox import SandboxAgent, Manifest
agent = SandboxAgent(
name="Compliance Reviewer",
model="gpt-5-mini",
default_manifest=manifest,
)
runner = KitaruRunner(agent, checkpoint_strategy="calls")
result = await runner.run(OpenAIRunRequest.start(task)) from claude_agent_sdk import query, ClaudeAgentOptions
options = ClaudeAgentOptions(
system_prompt="You are a compliance reviewer.",
allowed_tools=[],
)
async for msg in query(prompt=task, options=options):
process(msg) from kitaru import flow
from claude_agent_sdk import ClaudeAgentOptions
from kitaru.adapters.claude_agent_sdk import ClaudeRunRequest, ClaudeRunResult, KitaruClaudeRunner
runner = KitaruClaudeRunner(
name="compliance_review",
options_factory=lambda request: ClaudeAgentOptions(
system_prompt="You are a compliance reviewer.",
allowed_tools=[],
max_turns=request.max_turns,
),
)
@flow
def review(task: str) -> ClaudeRunResult:
return runner.run_sync(ClaudeRunRequest.start(task, max_turns=3)) from pydantic_ai import Agent
agent = Agent(
"openai:gpt-5-mini",
system_prompt="You are a compliance reviewer.",
tools=[search_docs, fetch_policy],
)
result = await agent.run(task) from kitaru.adapters.pydantic_ai import KitaruAgent
from pydantic_ai import Agent
agent = KitaruAgent(Agent(
"openai:gpt-5-mini",
system_prompt="You are a compliance reviewer.",
tools=[search_docs, fetch_policy],
))
result = await agent.run(task) from google import genai
client = genai.Client()
interaction = client.interactions.create(
model="gemini-3.5-flash",
input=task,
)
print(interaction.output_text) from kitaru import flow
from kitaru.adapters.gemini import (
GeminiInteractionRequest, KitaruGeminiInteractionsRunner,
)
runner = KitaruGeminiInteractionsRunner(name="review")
@flow
def review(task: str):
request = GeminiInteractionRequest.start(
task, model="gemini-3.5-flash",
)
return runner.run_sync(request) from google.adk.runners import Runner
runner = Runner(
agent=agent,
app_name="support",
session_service=sessions,
)
result = await runner.run_async(
user_id="user-123",
session_id="s-456",
new_message=msg,
) from kitaru.adapters.google_adk import ADKRunRequest, KitaruADKRunner
kitaru_runner = KitaruADKRunner(
adk_runner,
name="support_agent",
checkpoint_strategy="runner_call",
)
result = await kitaru_runner.run(ADKRunRequest(
user_id="user-123",
session_id="s-456",
message=msg,
)) from anthropic import Anthropic
client = Anthropic()
def my_agent(task: str) -> str:
plan = analyze(client, task)
# nothing recorded — nothing to replay or test against.
result = execute(client, plan)
return result from kitaru import flow, checkpoint
from anthropic import Anthropic
client = Anthropic()
@flow
def my_agent(task: str) -> str:
plan = checkpoint(analyze)(client, task)
result = checkpoint(execute)(client, plan)
return result Ask anything of the runs you already have.
Cheaper model? Flaky tool result? New prompt? Replay real executions with one thing changed, read the diff — and never touch production.
Wrap your agent so model/tool calls and steps exposed through Kitaru primitives or adapters become replayable checkpoints.
Start from execution IDs
200 real executions whose Kitaru-visible steps and model/tool calls are already checkpointed. Production stays untouched.
exec_ids = cohort.exec_ids Cheaper model, flaky tool
Replay from the decision point with a cheaper model, or replace a recorded lookup result. Production stays exactly as it was.
replay(id, from_="decide", model="fast") See what would have happened
Compare each candidate to its source execution: cost, changed outputs, first divergence. The decision now has evidence.
cheap.llm_usage_summary Same 200 executions. Cheap model. Order lookup result replaced.
Illustrative numbers. Tool-level detail depends on the primitives or adapter boundaries your agent exposes to Kitaru.
Every counterfactual is one replay call.
Swap a model, replace a checkpoint result, fail a call — each a simulation against the recorded world, one change at a time. Hover any line to see what it does.
import kitaru
client = kitaru.KitaruClient()
# your agent exposes replayable checkpoints through Kitaru
source = support_agent.run(ticket)
result = source.wait()
# reproduce faithfully, then change ONE thing
baseline = client.executions.replay(
source.exec_id, from_="decide",
)
cheaper = client.executions.replay(
source.exec_id, from_="decide", model="glm-5.4",
)
faked = client.executions.replay(
source.exec_id, from_="lookup_order",
overrides={"checkpoint.lookup_order": stale_order},
)
timeout = client.executions.replay(
source.exec_id, from_="lookup_order", lookup_mode="timeout",
)
usage = cheaper.llm_usage_summary support_agent.run() Run in production. Keep the returned handle: it carries the execution ID that replay needs.
replay(from_="decide") Reproduce from a checkpoint with no change. Earlier checkpoints reuse recorded outputs. The faithful baseline.
model="glm-5.4" Pass a different flow input for this replay. Same execution history, cheaper model choice.
overrides=checkpoint... Replace one recorded checkpoint result. Kitaru replays the consumers of that changed value.
lookup_mode="timeout" Use a flow input your agent already understands to run the replay against a timeout path.
llm_usage_summary Inspect shipped execution metadata, checkpoints, and artifacts to compare the source execution and replay.
Don’t run the experiments. Let your agent hill-climb.
Kitaru exposes replay and diff over an MCP server and a CLI. Point your coding agent at it: it replays a run, changes one thing, reads the diff, and tries the next idea, climbing toward a cheaper, safer version while you watch.
A few replays, no human in the loop. The diff is the agent’s reward signal.
What arrives as a complaint
leaves as a regression test.
uv add kitaru Open source (Apache 2.0). Replay real runs against your real code. Nothing reruns in production.