Skip to main content

Real-time message bus and inspector for multi-agent LLM systems

Project description

๐Ÿ”Œ AgentWire

Real-time message bus and inspector for multi-agent LLM systems

Python 3.10+ License: MIT Tests Code style: black

Features โ€ข Quick Start โ€ข Examples โ€ข Documentation โ€ข Integrations

AgentWire Dashboard

Make the invisible visible. See every message, every agent, every decision.


๐ŸŽฏ The Problem

Multi-agent systems are opaque black boxes. When your 5-agent pipeline produces a bad result, you have no way to see:

  • Which agent said what to whom
  • Why things went wrong
  • Where the breakdown happened
  • How much it cost

Debugging is impossible. Optimization is guesswork.

โœจ The Solution

pip install agentwire
agentwire start

# Wrap your agents (one line each)
researcher = aw.wrap(ResearchAgent(), name="researcher")
writer = aw.wrap(WriterAgent(), name="writer")

# Run your pipeline
with aw.session("blog-post-run"):
    facts = researcher.run("Find quantum computing breakthroughs")
    post = writer.run(facts)

Open http://localhost:7433 โ†’ See everything in real-time.


๐Ÿš€ Features

๐Ÿ“Š Real-Time Message Feed

See messages flowing between agents as they happen. Every TASK, RESULT, ERROR, and TOOL_CALL is captured and displayed with full context.

๐Ÿ•ธ๏ธ Interactive Graph View

Visualize agent topology with D3 force-directed graphs. Node size = message count, edge width = message frequency. Click to filter.

โฎ๏ธ Session Replay

Step through past runs message-by-message. Progressive graph rendering shows how your system evolved. Speed control: 0.5ร— to 10ร—.

๐Ÿ’ฐ Cost Tracking

Automatic token counting and USD cost calculation for Claude, GPT-4, Gemini, and more. See exactly what each agent costs.

๐Ÿ”Œ Framework-Agnostic

Works with LangChain, AutoGen, CrewAI, and raw API calls. One unified view across all frameworks in the same session.

๐Ÿš€ Zero Infrastructure

SQLite by default. No Docker, no Postgres, no signup required. pip install && agentwire start and you're done.


โšก Quick Start

Installation

pip install agentwire

Start the Server

agentwire start

This starts:

  • ๐ŸŒ REST API at http://localhost:7433/api
  • ๐Ÿ”Œ WebSocket at ws://localhost:7433/ws
  • ๐Ÿ“Š Dashboard at http://localhost:7433

Wrap Your Agents

import agentwire as aw

# Configure once
aw.configure(bus_url="http://localhost:7433")

# Wrap any agent (works with any class)
researcher = aw.wrap(ResearchAgent(), name="researcher")
writer = aw.wrap(WriterAgent(), name="writer")
reviewer = aw.wrap(ReviewerAgent(), name="reviewer")

# Run with session grouping
with aw.session("blog-post-run-42", name="Blog Post Generation"):
    facts = researcher.run("Find quantum computing breakthroughs")
    draft = writer.run(facts)
    final = reviewer.run(draft)

View in Dashboard

Open http://localhost:7433 to see:

  • ๐Ÿ“ Feed View - Real-time message stream with auto-scroll
  • ๐Ÿ•ธ๏ธ Graph View - Agent topology with interactive nodes
  • ๐Ÿ“Š Stats - Messages, tokens, cost tracking
  • โฎ๏ธ Replay - Step through session with timeline controls

๐ŸŽจ What Makes It Different

Feature AgentWire LangSmith Langfuse Phoenix
Traces inter-agent messages โœ… โŒ โŒ โŒ
Framework-agnostic โœ… โŒ Partial Partial
Session replay โœ… โŒ โŒ โŒ
Zero infrastructure โœ… โŒ โŒ โŒ
Open source โœ… โŒ โœ… โœ…
Real-time graph โœ… โŒ โŒ Partial

AgentWire focuses on the message bus abstraction - what agents say to each other - not just LLM calls.


๐Ÿ“š Examples

LangChain Research Pipeline

from agentwire.integrations.langchain import AgentWireCallback
import agentwire as aw

aw.configure(bus_url="http://localhost:7433")

with aw.session("research-run"):
    planner = aw.wrap(PlannerAgent(), name="planner")
    researcher = aw.wrap(ResearchAgent(), name="researcher")
    summarizer = aw.wrap(SummarizerAgent(), name="summarizer")
    
    plan = planner.run("Quantum computing breakthroughs 2024")
    findings = researcher.run(plan)
    summary = summarizer.run(findings)

โ†’ See full example

AutoGen Coding Team

from agentwire.integrations.autogen import wire_autogen_agent
import agentwire as aw

with aw.session("coding-session"):
    orchestrator = aw.wrap(OrchestratorAgent(), name="orchestrator")
    coder = aw.wrap(CoderAgent(), name="coder")
    reviewer = aw.wrap(ReviewerAgent(), name="reviewer")
    
    assignment = orchestrator.run("Write Fibonacci function")
    code = coder.run(assignment)
    review = reviewer.run(code)

โ†’ See full example

Raw API Pipeline

import agentwire as aw

with aw.session("data-pipeline"):
    fetcher = aw.wrap(DataFetcher(), name="fetcher")
    processor = aw.wrap(DataProcessor(), name="processor")
    analyzer = aw.wrap(DataAnalyzer(), name="analyzer")
    reporter = aw.wrap(Reporter(), name="reporter")
    
    data = fetcher.run("production-db")
    processed = processor.run(data)
    analysis = analyzer.run(processed)
    report = reporter.run(analysis)

โ†’ See full example


๐Ÿ”ง Integrations

LangChain

from agentwire.integrations.langchain import AgentWireCallback

agent = initialize_agent(
    tools=[...],
    llm=llm,
    callbacks=[AgentWireCallback(agent_name="researcher")]
)

AutoGen

from agentwire.integrations.autogen import wire_autogen_agent

wire_autogen_agent(my_agent, name="assistant", session_id="run-1")

CrewAI

from agentwire.integrations.crewai import wire_crew

my_crew = Crew(agents=[...], tasks=[...])
wire_crew(my_crew, session_id="crew-run")
result = my_crew.kickoff()

๐ŸŽฎ CLI Commands

# Start server
agentwire start                    # Default: port 7433
agentwire start --port 8000        # Custom port
agentwire start --no-dashboard     # API-only mode

# Check status
agentwire status                   # Show server status and stats

# Clear data
agentwire clear                    # Clear all (with confirmation)
agentwire clear --session abc123   # Clear specific session
agentwire clear --force            # Skip confirmation

# Stop server
agentwire stop

# Docker
agentwire docker up                # Start with Docker Compose
agentwire docker down              # Stop containers

๐Ÿ“– Documentation


๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Agent Code    โ”‚  Your Python code
โ”‚   (SDK)         โ”‚  aw.wrap(), aw.session()
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚ emit()
         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   REST API      โ”‚  FastAPI server
โ”‚   POST /api/    โ”‚  Store + broadcast
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚
    โ”Œโ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”
    โ†“         โ†“
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ SQLite โ”‚ โ”‚WebSocket โ”‚  Real-time
โ”‚  DB    โ”‚ โ”‚Broadcast โ”‚  to clients
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
                 โ†“
         โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
         โ”‚ React         โ”‚  Dashboard
         โ”‚ Dashboard     โ”‚  Feed + Graph
         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿงช Testing

# Run all tests (54 passing)
pytest tests/ -v

# Run specific test suite
pytest tests/test_bus.py -v
pytest tests/test_integrations.py -v

# Run with coverage
pytest tests/ --cov=agentwire --cov-report=html

๐Ÿ› ๏ธ Development

Setup

# Clone repository
git clone https://github.com/DanixMP/AgentWire.git
cd agentwire

# Install in development mode
pip install -e .
pip install -r requirements-dev.txt

# Run tests
pytest tests/

# Start dashboard dev server
cd dashboard
npm install
npm run dev

Project Structure

agentwire/
โ”œโ”€โ”€ agentwire/              # Python package
โ”‚   โ”œโ”€โ”€ models.py           # Data models
โ”‚   โ”œโ”€โ”€ store.py            # Database layer
โ”‚   โ”œโ”€โ”€ bus.py              # FastAPI server
โ”‚   โ”œโ”€โ”€ emitter.py          # Message emission
โ”‚   โ”œโ”€โ”€ wrapper.py          # Agent wrapping
โ”‚   โ”œโ”€โ”€ session.py          # Session management
โ”‚   โ”œโ”€โ”€ cli.py              # CLI tool
โ”‚   โ””โ”€โ”€ integrations/       # Framework integrations
โ”œโ”€โ”€ dashboard/              # React dashboard
โ”‚   โ””โ”€โ”€ src/
โ”‚       โ”œโ”€โ”€ components/     # React components
โ”‚       โ”œโ”€โ”€ hooks/          # Custom hooks
โ”‚       โ””โ”€โ”€ types.ts        # TypeScript types
โ”œโ”€โ”€ examples/               # Example scripts
โ”œโ”€โ”€ tests/                  # Test suite
โ””โ”€โ”€ docs/                   # Documentation

๐ŸŽฏ Roadmap

โœ… Completed

  • Core message bus and storage
  • Real-time WebSocket broadcasting
  • React dashboard with feed and graph
  • Session replay with timeline
  • CLI tool
  • Framework integrations (LangChain, AutoGen, CrewAI)
  • Examples and documentation

๐Ÿšง Planned

  • Postgres support for production
  • Multi-session comparison
  • Export sessions as JSON/CSV
  • Custom message types
  • Webhook notifications
  • Team collaboration features
  • Cloud deployment guides

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

MIT License - see LICENSE file for details.


๐Ÿ™ Acknowledgments

  • Built with FastAPI, React, and D3.js
  • Inspired by the need for better multi-agent observability
  • Thanks to the LangChain, AutoGen, and CrewAI communities

๐Ÿ“ž Support


Made with โค๏ธ for the multi-agent AI community

โญ Star us on GitHub โ€ข ๐Ÿฆ Follow on Twitter

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

agentwire_mcp-0.1.0.tar.gz (365.4 kB view details)

Uploaded Source

Built Distribution

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

agentwire_mcp-0.1.0-py3-none-any.whl (207.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agentwire_mcp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f2e0274cf9c2079ff158e8cca16319d3192026f80b0342bdc81f638f7aa4ea81
MD5 9bb348975bad214fc2e7ba2eda1ba813
BLAKE2b-256 589de502061b9ccbac5505343db684c5bad18fd916f4bb8d6dc6ed53c340564e

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for agentwire_mcp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6df910515e50eb87dcecc5f96b8e5ed953e30534f024df190c55adae5e6fa8c9
MD5 9fb53aedb1a1c7c1ad97ea100d48ed73
BLAKE2b-256 903dd7f9cb9ef9dbbcf20800ecb438afab1b122d6a825410bdf5fb031b390fed

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