Zing Forum

Reading

Agent Observatory: A Real-Time Observability Tool for Claude Code Multi-Agent Workflows

Agent Observatory is a real-time observability tool designed for Claude Code multi-agent workflows, offering features like call tree visualization, timeline tracking, and cost estimation. This article delves into its architectural design, five core view functions, and non-intrusive integration solution, exploring how to achieve transparent monitoring of AI workflows.

Claude Code多智能体可观测性实时监控D3.jsFastAPIAI工作流成本估算智能体协作
Published 2026-04-23 17:14Recent activity 2026-04-23 17:23Estimated read 7 min
Agent Observatory: A Real-Time Observability Tool for Claude Code Multi-Agent Workflows
1

Section 01

Agent Observatory: Introduction to the Real-Time Observability Tool for Claude Code Multi-Agent Workflows

Agent Observatory is a real-time observability tool specifically designed for Claude Code multi-agent workflows, aiming to address challenges like call tracing, execution time analysis, and cost accounting in complex multi-agent systems. Its core value lies in providing features such as call tree visualization, timeline tracking, and cost estimation through a non-intrusive integration solution, helping developers achieve transparent monitoring and optimization of AI workflows.

2

Section 02

Background: Observability Challenges in Multi-Agent Systems

As Claude Code's Agent tool capabilities grow, multi-agent workflows built by developers (where a main agent coordinates multiple sub-agents to execute tasks in parallel/series) face three major challenges: difficulty in tracing inter-agent call relationships, hard execution time analysis, and lack of effective cost accounting methods. Agent Observatory was created to address these issues.

3

Section 03

System Architecture: Non-Intrusive Integration Solution

Agent Observatory adopts a lightweight architecture with zero code changes:

  1. Hook Script: hook.py.py receives events via Claude Code's PreToolUse and PostToolUse hooks, and POSTs JSON events events to the server using Python's standard library
  2. Server: Built on FastAPI+SQLite, responsible for event persistence and SSE stream push
  3. Frontend: Uses D3.js for data visualization Advantages include zero dependency intrusion, real-time performance (SSE second-level updates), data persistence (SQLite storage), and team sharing support.
4

Section 04

Analysis of Five Core View Functions

Agent Observatory provides five complementary visualization views:

  • Call Tree: D3.js hierarchical graph showing agent derivation relationships; nodes are colored by status (running/completed/interrupted), and hovering reveals prompt previews
  • Timeline: Gantt chart displaying execution time and nesting levels, with a real-time NOW marker line to identify performance bottlenecks
  • Flowchart: Shows agent wave connection relationships (solid lines for derivation/dashed lines for context flow) to understand data dependencies
  • Logs: CLI-style terminal view that records events and supports expanding full prompts and responses
  • Chat Board: Decentralized collaboration mechanism where agents can read the shared message board and reply autonomously.
5

Section 05

Practical Features: Cost Estimation, Identity System, and Team Sharing

Cost Estimation

Based on prompt/response text length (approximately 4 characters = 1 token), it uses the Claude Sonnet 4.6 pricing model (input: $3 per 1M tokens, output: $15 per 1M tokens) and supports modifying constants to adjust the model.

Agent Identity System

Named agents are assigned unique Unicode symbols (e.g., ⬡ for architecture-reviewer), while unnamed agents get fun names (like Jazzy Blobfish) and species emojis.

Team Sharing Modes

  • Personal Local Mode: Run a local server to monitor personal sessions
  • Team Sharing Mode: Deploy a shared server; members point to the server via the environment variable AGENT_OBSERVER_URL.
6

Section 06

Deep Integration with Claude Code and Current Limitations

Deep Integration

Click a call tree node, and the details panel provides a "Continue in Claude Code" button, which copies a structured follow-up prompt (including original prompt, response content, and parent/child agent information) to the clipboard, enabling seamless connection between monitoring and development.

Limitations

  • Cost estimation is based on character count approximation, which deviates from actual token counts
  • The autonomy of agents in the chat board function depends on prompt design.
7

Section 07

Future Directions and Summary

Future Directions

  • Expand to more AI assistant platforms
  • Develop more precise cost estimation models
  • Add historical trend analysis and performance benchmarks
  • Provide automatic optimization suggestions for agent collaboration modes

Summary

Agent Observatory fills the observability gap for Claude Code multi-agent workflows. With its non-intrusive architecture, rich visual views, and practical features, it provides developers with a powerful tool to understand and optimize complex AI systems. It is an open-source project worth trying for multi-agent application teams.