apps/opik-documentation/documentation/fern/docs-v2/observability/debug_agents.mdx
Your agent returned the wrong answer, ignored context it was given, or took twice as long as it should. The trace is right there in Opik — but tracing alone doesn't tell you why it happened or how to fix it. That's where Ollie comes in.
Ollie is more than a chatbot — it has tools that let it act on your workspace and your code.
opik connect, Ollie gains secure, read-only access to your source files. It can propose edits that you review and approve before anything changes on disk.opik connect active, Ollie can rerun your agent using inputs from a failing trace to verify a fix in real time. New traces stream back into Opik automatically.The fastest way to improve agent quality is a tight loop: find a bad trace, understand it, fix it, and make sure it stays fixed. Ollie handles this end-to-end.
<Steps> <Step title="Find a failing trace"> Start in the Opik dashboard. Filter traces by error status, low feedback score, or latency spike to find a run that didn't behave as expected. </Step> <Step title="Ask Ollie what went wrong"> Open Ollie from the trace view and describe what looks off. Ollie reads the full span tree — every LLM call, tool invocation, and retrieval step — and identifies the root cause.<Frame>
</Frame>
<Frame>
</Frame>
<Frame>
</Frame>
Each cycle makes your agent more robust. Over time, your test suite becomes a comprehensive regression guard built directly from real failures.
Ollie works best when you describe the problem in plain language. Here are prompts for common debugging scenarios:
opik connect discovers and runs your agent