Metadata-Version: 2.5
Name: e-track
Version: 0.6.0
Summary: Run tracking for agent systems: one event model on a structlog channel, parallel sinks (OpenTelemetry, Langfuse, Cloud Trace, Prometheus, HTTP) and a live graph viewer.
Project-URL: Homepage, https://github.com/edamlabs/e-track
Project-URL: Documentation, https://edamlabs.github.io/e-track/
Project-URL: Source, https://github.com/edamlabs/e-track
Project-URL: Issues, https://github.com/edamlabs/e-track/issues
Project-URL: Changelog, https://github.com/edamlabs/e-track/blob/main/CHANGELOG.md
Author: EDamLabs
License-Expression: MIT
License-File: LICENSE
Keywords: agents,asyncio,e-stack,langfuse,langgraph,llm,observability,opentelemetry,prometheus,structlog,tracing
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: AsyncIO
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: System :: Logging
Classifier: Topic :: System :: Monitoring
Classifier: Typing :: Typed
Requires-Python: >=3.14
Requires-Dist: anyio>=4.6
Requires-Dist: msgspec>=0.21
Requires-Dist: pydantic-settings>=2.6
Requires-Dist: structlog>=26.1
Provides-Extra: all
Requires-Dist: e-serde>=0.6.2; extra == 'all'
Requires-Dist: e-serde>=0.6.4; extra == 'all'
Requires-Dist: google-auth>=2.40; extra == 'all'
Requires-Dist: granian>=2.8.5; extra == 'all'
Requires-Dist: httpx>=0.28; extra == 'all'
Requires-Dist: langchain-core>=1.5.2; extra == 'all'
Requires-Dist: langgraph>=1.2.7; extra == 'all'
Requires-Dist: litestar>=2.25; extra == 'all'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.44; extra == 'all'
Requires-Dist: opentelemetry-sdk>=1.44; extra == 'all'
Requires-Dist: prometheus-client>=0.21; extra == 'all'
Requires-Dist: requests>=2.32; extra == 'all'
Requires-Dist: rustworkx>=0.17; extra == 'all'
Provides-Extra: auth
Requires-Dist: google-auth>=2.40; extra == 'auth'
Requires-Dist: requests>=2.32; extra == 'auth'
Provides-Extra: http
Requires-Dist: google-auth>=2.40; extra == 'http'
Requires-Dist: httpx>=0.28; extra == 'http'
Requires-Dist: requests>=2.32; extra == 'http'
Provides-Extra: langgraph
Requires-Dist: langchain-core>=1.5.2; extra == 'langgraph'
Requires-Dist: langgraph>=1.2.7; extra == 'langgraph'
Provides-Extra: otel
Requires-Dist: e-serde>=0.6.2; extra == 'otel'
Requires-Dist: google-auth>=2.40; extra == 'otel'
Requires-Dist: opentelemetry-exporter-otlp-proto-http>=1.44; extra == 'otel'
Requires-Dist: opentelemetry-sdk>=1.44; extra == 'otel'
Requires-Dist: requests>=2.32; extra == 'otel'
Provides-Extra: prometheus
Requires-Dist: prometheus-client>=0.21; extra == 'prometheus'
Provides-Extra: topology
Requires-Dist: rustworkx>=0.17; extra == 'topology'
Provides-Extra: viewer
Requires-Dist: e-serde>=0.6.4; extra == 'viewer'
Requires-Dist: granian>=2.8.5; extra == 'viewer'
Requires-Dist: litestar>=2.25; extra == 'viewer'
Requires-Dist: rustworkx>=0.17; extra == 'viewer'
Description-Content-Type: text/markdown

<p align="center">
  <a href="https://github.com/edamlabs/e-track/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/edamlabs/e-track/ci.yml?label=test" alt="CI"></a>
  <a href="https://pypi.org/project/e-track/"><img src="https://img.shields.io/pypi/v/e-track?color=166b7e" alt="PyPI"></a>
  <a href="https://pypi.org/project/e-track/"><img src="https://img.shields.io/pypi/pyversions/e-track" alt="Python"></a>
  <a href="LICENSE"><img src="https://img.shields.io/github/license/edamlabs/e-track?color=166b7e" alt="License"></a>
</p>

<p align="center">
  <img src="assets/logo.svg" alt="e-track" height="110" />
</p>

**See what your agents are doing.** e-track turns every run of a LangGraph agent — its nodes, model calls, tools, MCP
calls and subagents — into one stream of events, and sends it wherever you look: Langfuse, Phoenix, LangSmith, any
OpenTelemetry backend, your own code, or a live canvas of the graph. Adding a backend never touches the agent, and a
slow backend never slows it.

Part of the **EDamLabs eager series**: EDamLabs' own e- products ([EDamLabs families](https://github.com/edamlabs/e-workbench#identity)).

<p align="center">
  <img src="assets/viewer.png" alt="The live viewer: the agent's graph lit by its run, the calls of each node counted inside it, the span tree with every span's input and output" width="900" />
</p>

## Install

```bash
uv add "e-track[langgraph,otel]"    # or: pip install "e-track[langgraph,otel]"
```

| Extra | For |
|---|---|
| `langgraph` | tracking LangGraph agents (deepagents included) |
| `otel` | Langfuse, LangSmith, Phoenix, Tempo, Cloud Trace, any OpenTelemetry collector |
| `http` | any HTTP endpoint — the base of a custom driver (a memory service, a webhook) |
| `prometheus` | run metrics for Prometheus and Grafana |
| `viewer` | the live canvas (Litestar on granian, React Flow) |
| `all` | everything |

Python 3.14+, typed (`py.typed`).

## Usage

```python
from etrack.logic.api import Tracker
from etrack.logic.channel import EventChannel
from etrack.providers.adapters.bus.anyio import AnyioAdapter
from etrack.providers.adapters.source.langgraph import LanggraphSourceAdapter
from etrack.providers.drivers.sink.otlp import OtlpDriver

async with OtlpDriver() as otlp:                     # targets from ETRACK_OTLP_TARGETS
    bus = AnyioAdapter()
    bus.subscribe(otlp)                              # and the live buffer, and your own sinks
    async with bus:
        tracker = Tracker(EventChannel(bus), LanggraphSourceAdapter())
        with tracker.track(thread="t1", config={}) as run:
            await agent.ainvoke(inputs, run.config)  # your graph, untouched: the config carries the hook
```

```bash
ETRACK_OTLP_TARGETS='{"phoenix": {"endpoint": "http://localhost:6006"}}'
```

And the live canvas, one line more:

```python
viewer = Viewer(watch=live, topology=LanggraphTopologyAdapter().read(agent))
async with GranianAdapter(viewer.app) as server:     # http://127.0.0.1:28130 — or mount viewer.app in your app
    ...
```

| Read | For |
|---|---|
| [Quickstart](https://edamlabs.github.io/e-track/start/quickstart/) | three steps on a small graph, every output shown |
| [The record](https://edamlabs.github.io/e-track/advanced/record/) | what an event holds: kinds, phases, the fields |
| [Backends](https://edamlabs.github.io/e-track/integrations/opentelemetry/) | Langfuse, Phoenix, LangSmith, Tempo — settings and what is verified |
| [Viewer](https://edamlabs.github.io/e-track/basics/viewer/) | serve or mount the canvas, its API |

The full guide lives at [edamlabs.github.io/e-track](https://edamlabs.github.io/e-track/).

## Development

```bash
make install        # sync deps + prek hooks
make check          # lint + type + arch + validate + test
make cov            # coverage gate: 100 % lines and branches, every outbound service faked in process
make integration    # real services: the session fixtures bring tests/sandbox/compose.yml up and down (collector + Phoenix)
make ci             # every gate CI runs, in one command
```

Stack: uv · ruff · ty · tach · pytest (xdist, randomly, pytest-docker) · prek · zizmor · Zensical · Renovate.
Released from a `v*` tag through PyPI trusted publishing; maintained by the [EDamLabs fleet](https://github.com/edamlabs/e-workbench).
