CtrlB / Self-improving agents

Build agents that learn from their mistakes.

CtrlB finds what went wrong in production, proposes a prompt fix, and tests it against the runs that failed. Your team decides what ships.

Works with your OpenTelemetry traces. Data stays in your bucket.

refund-agentIllustrative workflow
01 / Find the failure

Requested $420 back on a $180 order.

The prompt never capped the refund amount.
02 / Propose a change
Old prompt: Refund the amount requested by the customer.
Proposed prompt: Look up the order first. Never refund more than the order total.
03 / Test against the same runs
Old prompt1 / 3 passed
New prompt3 / 3 passed
All live
  • Self-improving agents
  • Traces & costs
  • Evals
  • Guard
From production runs to tested improvements

Traces in. Findings and tested fixes back to your team.

The agent improvement loopYour agents send OpenTelemetry spans to CtrlB. Model calls, tool calls, costs and eval scores stay in your bucket. Evaluate runs, investigate failures, compare prompt changes and check tool calls with Guard. Your team reviews prompt changes before shipping them.Your agentsOpenTelemetry spans from your codeCtrlBYour traces, in your bucketmodel callstool callstokens and costeval scoresTest the change. Review the evidence. Then ship.
  1. EvaluateScore production runs
  2. InvestigateFind the cause
  3. Compare promptsTest fixes on saved runs
  4. GuardCheck tool calls

Prompt changes are reviewed by your team before deployment.

Self-improving agentsLive

A failed run is a test case for the next prompt.

A refund agent tries to pay out more than an order is worth. The trace shows the error. CtrlB investigates why it happened, suggests the missing instruction, and gives you the evidence to test the fix.

  • Scheduled investigations group failures by cause, with a suggested prompt change and links to the runs.
  • Save those runs as a test set, then compare the old and new prompts against the same cases.
  • Review the results before you ship the change.
  1. InvestigateRead failed runs
  2. FindName the cause
  3. FreezeKeep the traces
  4. CompareOld prompt vs new
HighRefund attempts above the order totalExample finding
What happened
issue_refund was called with an amount above the order total and failed with ValidationError.
Why
The prompt asks for the customer's requested amount and never says to cap it at the order total.
Suggested fix
Add to the system prompt: call lookup_order first and never refund more than its total.
Trace set memberOld promptNew prompt
7f3a91c2 refund $420 on a $180 orderfailpass
e44d0b17 refund without lookupfailpass
2c19aa50 full refund, valid orderpasspass
EvalsLive

Define what a good run looks like.

Write what a good answer looks like. A judge model scores new traces as they arrive, on your own provider key. Each score is stored next to its trace.

  • Filter, chart and alert on scores like any other column.
  • Every eval run shows what the judge cost.
Refund policy followedExample eval
Pass rate by day
Judge: your keyAlert below 80%
Latest verdicts
0.0Refunded more than the order total7f3a
1.0Checked the order, refunded in full2c19
1.0Declined, outside the 30 day windowb801
0.0Skipped lookup_order before refundinge44d
GuardLive

Put a check between intent and action.

Check tool calls before they execute and redact sensitive data from their results. Guard runs in your framework's tool hook, so policies can act on the call itself.

  • A policy answers allow, deny, ask a human, or rewrite.
  • Rules cover tool allow lists, PII in arguments, runaway loops, and calls that match an open finding.
  • Works with Claude Code hooks, OpenAI Agents SDK, LangChain, Google ADK and FastMCP. Every check is recorded alongside the trace.
Model calls, tool calls, costLive

Follow the run. Find the expensive mistake.

Open a run to see the prompt, model responses and tool calls in order. Tokens, latency and cost sit alongside each call. A prompt hash ties the result back to the version that produced it.

  • Sort runs by cost and open the one that spent the budget.
  • Find the slowest tool and the errors it returns.
refund-agent trace 7f3a91c2Example trace
SpanTimelineTokensCost
agentrefund-agent
4,890$0.0214
chatclaude-sonnet
1,840 / 212$0.0087
toollookup_order
  
chatclaude-sonnet
2,410 / 96$0.0087
toolissue_refund
  
chatclaude-sonnet
288 / 44$0.0040
issue_refund: ValidationError, refund amount exceeds order total
Agent tracesLive

Keep the instrumentation you already have.

Point your OTLP exporter at CtrlB. Spans that follow the OpenTelemetry GenAI conventions show up as agents, model calls and tool calls, with no mapping step. Langfuse and other OTel-based SDKs export the same spans.

  • Keep complete runs, including the calls that led to a failure.
  • Your coding agent reads the same traces through the CtrlB MCP server: search_traces, fetch_trace and run_sql.
Where spans goDirect, no gateway
OpenTelemetry SDK
Langfuse SDK
OTel Collector
Any OTLP exporter
CtrlB
Parquet in your bucket
AI Traces view
Evals and findings
MCP server
SQL
Your data

The evidence stays in your bucket.

Traces, scores and findings live as open Parquet in your S3, GCS or Azure Blob bucket. Query them with SQL or give your coding agent access through the CtrlB MCP server. The files stay readable without CtrlB.

Start with your existing OTLP exporter. Bring your own model key for evals and investigations, with the model cost visible on each run.

AI observability pricing

Give your agents a way to get better.

One plan for tracing, evaluations, prompt investigations and Guard. Start with the agents you run today, then expand as your workload grows.

  • Production traces and model cost tracking
  • Scheduled investigations and prompt comparisons
  • Tool policies with Guard
  • OpenTelemetry, your own bucket and your own model key

AI Observability

From $499 / month

Platform fee. Usage is quoted separately for your workload.

Discuss your workload

We agree trace volume, evaluation usage and Guard checks with you before you start. Model and bucket costs are billed directly by your providers.