Skip to main content

A terminal-based tree visualizer for AI agent traces.

Project description

🌳 agent-tree

The missing visualizer for AI Agents. Turn messy terminal logs into beautiful, interactive trees.

agent-tree is a zero-config, terminal-first observability tool. It captures the complex "reasoning loop" of AI agents and renders them as clean, hierarchical trees in your console. No API keys, no web dashboards, no fluff.

Why agent-tree?

📸 Why use agent-tree?

Without agent-tree (Messy JSON) With agent-tree (Clean Visualization)

🚀 Quick Start

1. Automatic (LangChain/LangGraph)

Just pass the TraceCallback into your agent's config. It automatically catches the end of the run and draws the tree.

from agent_tree import TraceCallback

# Your agent logic...
agent.invoke(
    {"messages": [("user", "Is 50 shares of Apple under $15,000?")]},
    config={"callbacks": [TraceCallback(session_name="Budget Check")]}
)

2. Manual (Post-Execution)

If you already have a result object, you can visualize it instantly.

from agent_tree import AgentTrace

at = AgentTrace(result_object)
at.show()

✨ Key Features

  • Instant Visuals: Built on top of the Rich library for high-performance terminal UI.
  • Root-Only Tracing: Smart logic prevents "log spam" by only showing the final, complete execution tree.
  • Framework Agnostic: Works perfectly with LangChain but can be adapted for any JSON-like agent output.

🛠 Installation

pip install agent-tree

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_tree-0.1.0.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

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

agent_tree-0.1.0-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_tree-0.1.0.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for agent_tree-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e626d49ebdeb1fda58c9d05369ad2b9a4fa0dd17b87326369d0cf623fd5000c3
MD5 bbaf841104dd3edefe24e0a1e1641447
BLAKE2b-256 dfae651d735c5cc2325705c30c7f209ac488f7acbf61388b305ca59e5f1f153d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agent_tree-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for agent_tree-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcb7d612dc17c967ec6bab8ec4258abd1381e8c14a0a2b5bfc4f3a56af4bce7a
MD5 442e0720eb95a3b1e72542e9966dd62f
BLAKE2b-256 6373b25f2c05e9b17f027495d23d6d3ea6e8e1fe8e9b92ebf8ca6c1aafccd44f

See more details on using hashes here.

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