Agent Reliability Lab · for development
Stop editing code to debug your agent.
A few lines that only run in development record every run of your agent: the prompt it sent, the tools it called, what each step cost. Then change the prompt, model, tools or input in the lab, send the run again and compare. Your code changes once, when you know what works.
$ docker compose up -d · open source · no-op outside STAGE=dev
- events
- 0
- model calls
- 0
- tool calls
- 0
- known cost
- $0.00000
Why a lab
The agent lives in your code. Debugging it does not have to.
Debugging inside the code
variants tried 0- 1Change the prompt string in the codeeditor
- 2Restart the serviceterminal
- 3Recreate the input by handcurl · UI
- 4Find the tool calls in the logslogs
- 5Compare with what you remember of the last runmemory
- 6Write the case again as a test, elsewheretest harness
Five places, and the test lives apart from the experiment that found the bug.
With the lab beside it
variants tried 0- 1Open the run the agent already recordedlab
- 2Change the prompt, model, tools, state or inputlab
- 3Send it, then read the diff, tool calls, latency and costlab
One place. Keep the variant that wins as a scenario; the same scenario runs in CI.
Both loops advance one step every 1.1 s. Your code changes once, when you already know what works.
What you see
Tools, prompts and timing, without a print statement
Tool behaviour
Which tools ran, with what, in what order?
- orders.lookuperror · 2.1 s{"id": "4471"} → timeout
- agent.retry · attempt 2
- orders.lookupok · 180 ms{"id": 4471} → {"status": "delivered"}
The first call sent the ID as a string. You see it in the arguments, not in a stack trace.
Prompts
What did the model actually receive?
The rendered messages and parameters as sent, with the prompt version that produced them.
Performance
Where did the time and the money go?
- total
- 1.55 s
- tokens
- 1 632 → 214
- cost
- $0.00099
How it works
A few lines in development. Nothing in production.
docker compose and wrap what your agent already does. Events stream over one WebSocket while you work. Outside STAGE=dev the SDKs return immediately, so the instrumentation can stay in your code.# your agent's service in docker compose environment: STAGE: dev LAB_WS_URL: ws://arl:8000/api/agent-lab/ws
Every run streams to the lab, and the lab can send edited runs back.
# STAGE unset, or anything but dev
with lab.run("Support question") as run:
run.input(question) # returns at onceNo connection, no data sent, nothing to remove before you ship.
Already on OpenTelemetry? Point your exporter at the lab. OpenAI Agents SDK, LangGraph, LlamaIndex, Vercel AI SDK, Pydantic AI and ADK spans become lab traces.
Any language. SDKs for Python, TypeScript and Go; anything else speaks JSON over the WebSocket, or gRPC on the same port.
Private by default. The compose file binds to 127.0.0.1. Set ARL_AUTH_TOKEN before you expose it; secrets are redacted from every trace.
Anatomy of a trace
The whole journey, phase by phase
The four default phases run in this order. Your handshake can declare up to 32 phases of your own.
graph.node · graph.edgeThe search space: candidates you looked at, not only the ones you kept.graph.visitEach step of the walk, with depth, score, attempt and whether it was selected as context.retrieval.retryWhy the retriever tried again. Counted against the run's retry budget.retrieval.resultThe context that reached the model, also for vector or full-text search without a graph.
Workbench
Customise the run until it is right
arl-workbench/1 JSON to share or commit.