Skip to main content

Agent Debugger for LangChain/LangGraph

Project description

adb: Agent Debugger for LangChain/LangGraph

A TUI debugger that combines application-level agent inspection (state, memory, tool calls, messages) with Python-level debugging (breakpoints, stepping, variable inspection).

Quick Start

# Install
uv pip install -e .

# Debug a LangGraph agent script
adb run my_agent.py

# Attach to a specific graph object
adb attach my_module:graph

# Attach with optional renderers/providers
adb attach my_module:graph \
  --memory-renderer my_mod:MemoryRenderer \
  --store-renderer my_mod:StoreRenderer \
  --state-renderer my_mod:StateRenderer \
  --output-renderer my_mod:ChatOutputRenderer \
  --tool-renderer my_mod:ToolRenderer \
  --state-mutator my_mod:StateMutator

Run from Source

# Create/update local env from this repo
uv sync --dev

# Run adb directly from source (project root)
uv run adb run examples/simple_agent.py

# Equivalent module invocation
uv run python -m agent_debugger.cli run examples/simple_agent.py

Simple Agent Demo

# Run simple_agent with all demo renderer/mutator extensions
uv run adb run examples/simple_agent.py \
  --memory-renderer examples.simple_extensions:SimpleMemoryRenderer \
  --output-renderer examples.simple_extensions:SimpleChatOutputRenderer \
  --tool-renderer examples.simple_extensions:SimpleToolRenderer \
  --state-mutator examples.simple_extensions:SimpleStateMutator

# Optional: enable LiteLLM tool-calling path in examples/simple_agent.py
# (example model uses Vertex + service account/ADC auth)
USE_LITELLM=1 LITELLM_MODEL=vertex_ai/gemini-2.0-flash uv run adb run examples/simple_agent.py \
  --memory-renderer examples.simple_extensions:SimpleMemoryRenderer \
  --output-renderer examples.simple_extensions:SimpleChatOutputRenderer \
  --tool-renderer examples.simple_extensions:SimpleToolRenderer \
  --state-mutator examples.simple_extensions:SimpleStateMutator

Features

  • Application-level debugging: See agent state, messages, tool calls, state diffs
  • Code-level debugging: Set breakpoints, step through code, inspect variables
  • Agent-level breakpoints: Break on node start, tool call, or state change
  • Optional renderers/providers: Custom state, store, memory, chat output, and state mutation hooks
  • Persistent tool history: Tool calls are kept across turns in the Tools pane and grouped by turn
  • import agent_debugger as adb; adb.set_trace(): Drop into the debugger from anywhere in your agent code

Usage

# Set a breakpoint on a node
/break node agent

# Set a breakpoint on a tool
/break tool search_listings

# Break when a state key changes
/break state messages

# Standard Python breakpoint
/break line my_agent.py:42

# Clear local UI context
/clear

# Local clear + optional mutator mutation
/clear memory

See /help in the TUI for all commands.

Debug Keys

When at a breakpoint, use pudb-style keys:

Key Action
c Continue execution
n Step over (next line)
s Step into
r Step out (return / finish)

Implementation note: When a breakpoint hits, the Input widget is disabled (inp.disabled = True). This prevents it from consuming keystrokes, so c/n/s/r go to the App's BINDINGS instead. When the user presses c (continue), the Input is re-enabled and re-focused.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

agent_debugger-0.1.0.tar.gz (258.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_debugger-0.1.0-py3-none-any.whl (43.8 kB view details)

Uploaded Python 3

File details

Details for the file agent_debugger-0.1.0.tar.gz.

File metadata

  • Download URL: agent_debugger-0.1.0.tar.gz
  • Upload date:
  • Size: 258.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_debugger-0.1.0.tar.gz
Algorithm Hash digest
SHA256 38ceb59aacdef63bc248d5c8c0d3ac6e086de4847acee225b8043bee1590e2a8
MD5 db69b6ba2923b68617a45b5ea12ddbf5
BLAKE2b-256 fca03a229de87706eb5995c8336284a7f5acc3b00356b562cc0283940b4bf94e

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_debugger-0.1.0.tar.gz:

Publisher: release.yml on dkondo/agent-tackle-box

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agent_debugger-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: agent_debugger-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 43.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for agent_debugger-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc21cc3dfb35706e766b534f2a8a0f928aa84abaac011200227f47e8d5df8c72
MD5 c8129691cff169e5c53fa9aed0076dbc
BLAKE2b-256 4ff0855020bd6f460d61fbb9a3f04398dcfd135af879303fca2cf88a21f7cae7

See more details on using hashes here.

Provenance

The following attestation bundles were made for agent_debugger-0.1.0-py3-none-any.whl:

Publisher: release.yml on dkondo/agent-tackle-box

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page