Skip to main content

Devtool to document and inspect LLM agent systems.

Project description

AgentLantern

Python TypeScript HTML CSS VitePress License: MIT Version

GitHub: https://github.com/brellsanwouo/agentlantern

AgentLantern is a CLI devtool that automatically documents multi-agent LLM systems and lets you watch them run live.

Point it at an agent project — it detects the framework, parses the architecture, and generates a browsable documentation site. For supported frameworks it also opens a live animated playground while the crew executes.

AgentLantern Play UI showing five AI agents, thought bubbles, and a central Tool Hub

Install

With pip:

pip install "agentlantern @ git+https://github.com/brellsanwouo/agentlantern.git"

With uv (recommended — installs the lantern command globally):

uv tool install git+https://github.com/brellsanwouo/agentlantern.git

From source:

git clone https://github.com/brellsanwouo/agentlantern
cd agentlantern
uv tool install -e .
# or: pip install -e .

Requires Python 3.11+.

Quick Start

# Generate and browse documentation for your agent project
lantern web path/to/your-project

# Watch a CrewAI run live in the animated playground
lantern play path/to/your-project

# Generate docs only (written to <project>/docs/)
lantern docs path/to/your-project

# Lint the agent project for design issues
lantern lint path/to/your-project

Commands

Command Description
lantern docs [project] [-o DIR] Generate Markdown documentation
lantern web [project] [--port PORT] Generate and serve project docs over local HTTP on 0.0.0.0:9000 by default
lantern lint [project] [--strict] [--json] Static analysis — no LLM, no network
lantern inspect [project] Output project model as JSON
lantern play [project] [--name NAME] Live animated playground; if --name is omitted, the UI asks for a run name
lantern replay NAME [--speed N] Replay a saved run; use last for the newest saved replay

Supported Frameworks

Framework Status
CrewAI Full analysis and live playground
LangGraph Detected — analysis coming soon
AutoGen Detected — analysis coming soon
Smolagents Detected — analysis coming soon
Google ADK Detected — analysis coming soon

Detection is automatic — no configuration needed.

What Gets Generated

lantern docs writes these files into <project>/docs/:

File Content
overview.md Project snapshot, entrypoints, high-level flow
architecture.md System map, key files, dependencies, env vars
agents.md Agent roles, goals, tools, backstories
tasks.md Task descriptions, agents, expected outputs
diagrams.md Mermaid diagrams: agent-task graph, execution flow, sequence
runbook.md Install, configure, run, static checks, troubleshooting
contact.md Project contacts from pyproject.toml
index.html Docsify site (publishable to GitHub Pages)
agentlantern-docs.html Self-contained shareable HTML bundle

Play UI

lantern play opens a pixel-art playground that visualizes a supported agent run:

  • START / STOP / RESTART controls
  • Run name field in the UI when --name is not provided
  • Up to 10 agents, each in their own named zone on the map
  • A central Tool Hub agents visually consult when tools are used
  • Timeline, Thoughts, Tools, Comms, and Log panels
  • Clickable agents with full per-agent history
  • Final report display on completion
  • Replay — save a run with --name my-run, replay it with lantern replay my-run, or open the newest saved run with lantern replay last

Linter

lantern lint analyzes your project statically:

AgentLantern Lint — my-crew (CrewAI)

  ✗  [E002]  crew.py:18   Task `analyze` references agent `researcher` which is not declared in agents.yaml.
  △  [W006]  agents.yaml:4   Agent `writer` is missing required field `backstory`.
  ·  [I001]  No tool detected — may be intentional for a pure LLM workflow.

  Summary: 1 error, 1 warning, 1 info

Rules: E001–E002 (errors), W001–W008 (warnings), I001–I004 (info).

Contributing

src/agentlantern/
├── core/            # BaseProject, BaseAnalyzer, BaseRenderer
├── frameworks/
│   ├── registry.py  # auto-detection
│   ├── crewai/      # full analyzer + renderer
│   ├── langgraph/   # stub
│   ├── autogen/     # stub
│   ├── smolagents/  # stub
│   └── google_adk/  # stub
├── docs.py          # doc orchestrator
├── play.py          # live playground server
└── cli.py

To add a new framework: create src/agentlantern/frameworks/<name>/analyzer.py implementing detect, analyze, get_renderer, then register it in registry.py.

License

MIT — see LICENSE

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

agentlantern-0.1.21.tar.gz (108.5 kB view details)

Uploaded Source

Built Distribution

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

agentlantern-0.1.21-py3-none-any.whl (115.9 kB view details)

Uploaded Python 3

File details

Details for the file agentlantern-0.1.21.tar.gz.

File metadata

  • Download URL: agentlantern-0.1.21.tar.gz
  • Upload date:
  • Size: 108.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for agentlantern-0.1.21.tar.gz
Algorithm Hash digest
SHA256 796bbc0b0d732ce4baed612db5c22a6c3a351bf793b07408daf73234bbf3b68b
MD5 8a8db9f4039e30733da2682e218e178f
BLAKE2b-256 d45e26ad8feddbb2f5edff8df1b4436b49c0e78335b1dc24b5b862f7080ae511

See more details on using hashes here.

File details

Details for the file agentlantern-0.1.21-py3-none-any.whl.

File metadata

  • Download URL: agentlantern-0.1.21-py3-none-any.whl
  • Upload date:
  • Size: 115.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.5

File hashes

Hashes for agentlantern-0.1.21-py3-none-any.whl
Algorithm Hash digest
SHA256 5c5c75bfb22973d6e659e6b9f84a05279b08bd5ec721bc668b9a459730403c2c
MD5 78b30fa161b1b83cffda356322453be9
BLAKE2b-256 e205968ec003d247cfcc18daceb68e4b2ada13e08f2845e39c5c73197f05d28d

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