About this project

The Agent DevTools library is a local-first, causal debugger for AI agents. Its core purpose is to answer the question "why did my agent behave this way?" by providing deep visibility into the entire execution trace. The tool captures the complete causal path: which memory entries influenced the final answer, which retrieval candidates were selected and why, and what context was injected into the prompt. It then diffs a good run against a bad run to highlight the likely cause in plain language, such as a stale memory value or an incorrectly selected retrieval candidate. Key features include a Replay tab for step-by-step execution review, a Graph view showing the flow from input through retrieval, memory, prompt construction, LLM inference, and tool calls, and a dedicated Diff tab that surfaces the exact differences between runs. The local SQLite store ensures all data remains private and persistent across sessions. Integration with LangChain is seamless—developers can instrument their agent code with minimal effort using the trace.run() context manager, enabling automatic logging of every input, retrieval step, memory operation, prompt assembly, and tool invocation. The dashboard serves as a comprehensive UI where users can drill down into any aspect of the trace, from memory mutations to tool call outcomes, making it easier to diagnose issues quickly without manual log parsing.