Skip to main content

glowtrace

PyPI Python License: MIT

See your multi-agent app as a live graph: which agent is running, who it handed work to, and the exact prompt behind every step.

glowtrace demo

Try the demo in your browser: it plays a built-in sample run, no install needed.

When three or four agents start passing work to each other, logs stop being enough. You can't tell which agent is stuck, which tool call failed, or what prompt actually went to the model. glowtrace shows you that while the run is happening.

  • Two commands, no code changes for apps that already export OpenTelemetry traces
  • Live graph: agents, LLM calls and tool calls appear as they run; failures turn red
  • Click any node for the system prompt, messages, response, tool args and results, tokens and timing
  • Readable by default: framework internals like RunnableSequence and prompt templates are folded away
  • Works with MCP clients you didn't write: put glowtrace mcp-proxy in front of an MCP server to see the tool calls Copilot, Claude Desktop or Cursor make
  • Works across frameworks that use OpenInference, OpenTelemetry GenAI or OpenLLMetry spans (tested end to end with LangGraph so far)

It's a debugging view for runs in progress. For stored history, evals and cost tracking, use it next to Phoenix or Langfuse rather than instead of them.

Install and run

pip install glowtrace
glowtrace serve

The UI is at http://localhost:4318. Port 4318 is the default OTLP/HTTP port, so an app that already exports traces with default settings needs no changes. Otherwise:

export OTEL_EXPORTER_OTLP_ENDPOINT=http://localhost:4318
export OTEL_BSP_SCHEDULE_DELAY=200   # optional, the default batch delay is 5 s

OTLP exporters only send a span when it ends, so by default a node appears once its step has finished. To see steps while they are still running, add this to your app (needs pip install "glowtrace[live]"):

import glowtrace
glowtrace.instrument()

Watch an MCP client's tool calls

Copilot, Claude Desktop and Cursor don't export traces, but they all start MCP servers from a config file. glowtrace mcp-proxy goes in front of the server command there: it starts the real server, passes every message through unchanged, and sends one span per tool call to glowtrace serve.

Before:

"files": {
  "command": "npx",
  "args": ["-y", "@modelcontextprotocol/server-filesystem", "/path/to/demo"]
}

After:

"files": {
  "command": "glowtrace",
  "args": ["mcp-proxy", "--name", "files", "--",
           "npx", "-y", "@modelcontextprotocol/server-filesystem", "/path/to/demo"]
}

Run glowtrace serve and use the client as usual. Each tool call shows up with its arguments, result and duration; tool errors turn red. If glowtrace isn't running, the proxy still forwards everything and only drops the spans.

Tool arguments and results can contain your data. --no-args and --no-results leave them out, and --max-chars (default 4000) cuts long values. --endpoint sends the spans to any other OTLP/HTTP backend instead.

I have tested this with the official MCP Python SDK client and server over stdio. MCP servers that use HTTP transports aren't supported yet.

What it reads

glowtrace maps spans that follow any of these conventions:

So far I have tested it end to end with LangGraph and with the unmodified langgraph-supervisor quickstart. The other conventions are covered by unit tests, not by real runs. If a framework shows up wrong, an issue with the trace attached helps most.

Spans that carry no agent, LLM or tool meaning (HTTP calls, prompt templates, RunnableSequence and similar) are folded into their parent so the graph stays readable. glowtrace serve --all-spans turns this off.

LangGraph setup

from openinference.instrumentation.langchain import LangChainInstrumentor
from opentelemetry import trace
from opentelemetry.exporter.otlp.proto.http.trace_exporter import OTLPSpanExporter
from opentelemetry.sdk.trace import TracerProvider
from opentelemetry.sdk.trace.export import BatchSpanProcessor
import glowtrace

provider = TracerProvider()
provider.add_span_processor(BatchSpanProcessor(OTLPSpanExporter()))
trace.set_tracer_provider(provider)
glowtrace.instrument()   # optional
LangChainInstrumentor().instrument(tracer_provider=provider)

Without OpenTelemetry

There is a small tracer for plain Python code:

from glowtrace import Tracer

tr = Tracer()
tr.session("orch", "Orchestrator", input=question)
with tr.agent("a1", "researcher", parent="orch", system=SYSTEM, input=task) as a:
    with tr.tool("t1", "sql_query", parent="a1", args=sql) as t:
        t.result = run(sql)
    a.output, a.tokens = answer, usage

It sends JSON events over the /ws WebSocket, so any language can do the same:

event fields
node id, kind (session/step/agent/llm/tool), parent, title, status, model, system, input, args
update id, status (waiting/running/done/error), note, output, result, tokens
message from, to, content, label, tokens
remove id (its children move up to its parent)

Examples

The examples in examples/ work with any OpenAI-compatible endpoint, including a local model through Ollama. Set LLM_BASE_URL, LLM_API_KEY and LLM_MODEL to point them somewhere else.

pip install "glowtrace[live]" openai langgraph langchain-openai langgraph-supervisor \
    openinference-instrumentation-langchain opentelemetry-exporter-otlp-proto-http
python examples/test_supervisor.py   # langgraph-supervisor quickstart
python examples/langgraph_team.py    # small LangGraph team
python examples/real_agents.py       # plain Python agents with the native tracer
python examples/fake_run.py          # scripted events, no LLM

Limitations

  • History is kept in memory only (the last 20,000 events) and is gone when the server stops. glowtrace is not a replacement for Phoenix or Langfuse if you need stored traces, evals or cost tracking.
  • One process, no auth beyond an optional write token (--token). Without the token anyone who can reach the port can send data.
  • Large runs with hundreds of nodes get crowded on screen.
  • mcp-proxy handles stdio MCP servers only, and records tools/call requests (not resources or prompts).

How it works

your app --OTLP/HTTP--> glowtrace serve --WebSocket--> browser

The server accepts protobuf or JSON OTLP, turns spans into graph events, and keeps a history so a tab opened mid-run can catch up. Exporters often send child spans before their parents, so an unknown parent gets a placeholder node that is filled in when its span arrives.

The UI is TypeScript without a framework. It builds into one HTML file that ships inside the Python package, so pip install does not need Node.

Development

pip install -e ".[live]" pytest && pytest
cd web && npm install && npm test && npm run build

glowtrace/ holds the server, the span mapper and the tracer. web/src/ holds the UI. The built glowtrace/static/index.html is committed and CI checks that it matches the source.

Contributing

Traces from frameworks that render oddly, bug reports and PRs are welcome. See CONTRIBUTING.md and the good first issues.

MIT License

Metadata

Release files for glowtrace 0.4.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for glowtrace 0.4.1
File Size Uploaded Provenance Actions
glowtrace-0.4.1.tar.gz 48.5 kB With provenance Details for glowtrace-0.4.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for glowtrace 0.4.1
File Interpreter ABI Platform Actions
glowtrace-0.4.1-py3-none-any.whl Python 3 none any Details for glowtrace-0.4.1-py3-none-any.whl

Total release size: 91.9 kB

Release files / glowtrace-0.4.1.tar.gz

Download URL glowtrace-0.4.1.tar.gz
Size 48.5 kB
Tags Source
SHA-256 checksum
How to use checksums
82efe1b7c5219d923806c5dd1ac807f8251d591985758bcaf379821c04029d7f
BLAKE2b-256 checksum
How to use checksums
30fe0fd27d2f713f2d83f71851f835a6a3f50f4a576e14e9c0bfd5ae555d726a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Release files / glowtrace-0.4.1-py3-none-any.whl

Download URL glowtrace-0.4.1-py3-none-any.whl
Size 43.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
19bc368a69cb33594037230c0ba08191161096d1995e3c6ab2d6782db6b56786
BLAKE2b-256 checksum
How to use checksums
5c615f79182ca2bc41d1baeb44fdb0d29f8aab1bc510173456e9f5834d984b4d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

Security for glowtrace 0.4.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for glowtrace-0.4.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page