Skip to main content

#The Agent Stack

ELECTRIC OBSERVABILITY  ·  VOL. 01

TraceHarbor Poster

TRACE / 001   LOCAL-FIRST WORKBENCH   ALPHA · v0.3.0


TraceHarbor

OBSERVE. DEBUG. REPLAY. EVALUATE.

The local-first debugging and replay workbench for AI agents.

2024  ·  SEPTEMBER  ·  ALPHA


01 — Overview   /   02 — Install   /   03 — Instrument   /   04 — CLI   /   05 — Privacy   /   06 — Replay   /   07 — Architecture   /   08 — Development   /   09 — Roadmap


A flight recorder for AI agents.

TraceHarbor captures what happened inside an AI agent run — nested spans, inputs, outputs, tools, models, tokens, errors and stack traces — stores it on your machine (SQLite + local files) and presents it in a browser UI.

No cloud account. No API keys. No Docker. No Node.js needed to run it.


01 / WHAT WORKS TODAY

v0.3.0  ·  ALPHA  ·  ROADMAP PHASES 0–3

01.01   INSTALL & RUN

pip install + tracenest start → local server + bundled React UI.

Trace list · span tree · inspector · execution graph · timeline · tool inspector · analytics · SSE live updates

01.02   PYTHON SDK

  • Standard library only — no dependencies at import time
  • init · @observe · trace() · start_span()
  • Sync, async, generators, nested and concurrent spans

01.03   RELIABILITY

  • Bounded non-blocking queue · batching · retry with backoff
  • Offline buffering when the server is down
  • flush() / shutdown()

01.04   SAFETY RAILS

  • Exceptions and stack traces recorded and re-raised unchanged
  • Return values never altered

01.05   PRIVACY BY DESIGN

  • Head sampling · content-capture switches
  • Key- and pattern-based redaction on client and server

01.06   OPTIONAL ECONOMICS

  • Token usage when available
  • Cost estimated only for models you price yourself

01.07   REST API v1

Ingest · traces · spans · graph · timeline · projects · API keys · settings · export/import

OpenAPI at /docs

01.08   CORRECTNESS

  • Idempotent ingestion (stable event IDs) · out-of-order tolerant
  • Per-project isolation · API-key auth for exposed servers
  • Execution graph built only from observed parent/link relationships

02 / INSTALL & RUN

GET THE WORKBENCH RUNNING LOCALLY

pip install traceharbor
# From a wheel:
# pip install dist/traceharbor-0.3.0-py3-none-any.whl

tracenest start
# Opens http://127.0.0.1:7331
╭─────────────────────────────────────────────╮
│                                             │
│   TraceHarbor is running!                    │
│                                             │
│   Dashboard: http://127.0.0.1:7331          │
│   Project:   default                        │
│   Storage:   ~/.tracenest/                  │
│                                             │
│   Press CTRL+C to stop.                     │
│                                             │
╰─────────────────────────────────────────────╯
OPTIONS  ·  --host  ·  --port  ·  --data-dir  ·  --no-browser  ·  --detach  ·  tracenest stop

03 / INSTRUMENT AN AGENT

ADD OBSERVABILITY WITHOUT REWRITING YOUR AGENT

from tracenest import init, observe, trace, start_span

init(project="my-agent")  # endpoint defaults to http://127.0.0.1:7331

@observe(name="research_agent", span_type="agent")
def research_agent(query: str):
    return retrieve_documents(query)

with trace("research_workflow"):
    research_agent("AI observability")

with start_span("customer_lookup", span_type="tool") as span:
    span.set_attribute("tool.name", "customer_lookup")
    span.set_output(lookup_customer("C102"))
▶ Runnable, key-free example: examples/basic-python/main.py  ·  SDK guide: docs/sdk.md

If the server is unavailable, your agent is unaffected.

Events buffer under <data_dir>/sdk-buffer and are delivered later. Check tracenest.diagnostics() for dropped/buffered counts.


04 / CONTROL PANEL

THE COMMAND LINE IS THE CONTROL SURFACE

╔══════════════════════════════════════════════════════════════════════════╗
║                                                                          ║
║    ⬤           ◀◀◀           ▶▶           ▶▶▶           ⬛               ║
║   ███          ███          ███           ███          ███               ║
║                                                                          ║
║   START       DOCTOR       PROJECTS       TRACES        STOP             ║
║                                                                          ║
╚══════════════════════════════════════════════════════════════════════════╝
tracenest start
tracenest doctor
tracenest projects list
tracenest traces list
tracenest stop

tracenest import
tracenest keys
tracenest version
tracenest config

05 / PRIVACY

YOUR TRACES STAY YOURS

◉ LOCAL BY DEFAULT

Binds to 127.0.0.1.

Non-local binding requires --allow-remote and enables API-key auth.

◉ ON-DISK OWNERSHIP

Data lives in ~/.tracenest/:

tracenest.db
artifacts/
config.json

Payloads are stored as gzip artifacts with SHA-256 checksums.

◉ NO PHONING HOME

TraceHarbor sends no telemetry anywhere and needs no external service.

🔒 REDACTION IS ON BY DEFAULT

Masks sensitive keys (password, api_key, authorization, …) and secret-looking values (sk-…, AWS keys, JWTs, bearer tokens, private keys).

Redaction is best-effort. Review docs/security.md.


06 / TRACING × REPLAY

WHAT THE CURRENT BUILD DOES — AND DOES NOT — DO

⚠ COLLECTION & INSPECTION ONLY

TraceHarbor currently performs collection and inspection only.

Replay modes (playback, deterministic, branch) are designed in docs/adr/0006-replay-safety.md but are not implemented yet (Phase 5).

Nothing in the current UI or CLI re-executes your code or tools.

Mode Status What it does
Collect & Inspect ✅ Shipping Record, persist, visualize
Playback replay ⏳ Phase 5 Reconstruct from stored events
Deterministic replay ⏳ Phase 5 Re-run against recorded fixtures
Branch replay ⏳ Phase 5 Fork from a selected span

07 / ARCHITECTURE

A MODULAR MONOLITH · LOCAL DATA PATH

         ╭───────────╮
         │  AGENT    │
         ╰─────┬─────╯
               │  @observe
               ▼
         ╭───────────╮    bounded      ╭───────────╮    ╭───────────╮
         │    SDK    │═══ queue ═══▶   │    API    │═══▶│  STORAGE  │
         │  stdlib   │    HTTP batch   │  FastAPI  │    │  SQLite   │
         ╰───────────╯                 ╰─────┬─────╯    ╰───────────╯
               ▲                             │
               │                             │ SSE
        agent runs fine                     ▼
        if server is down           ╭───────────╮
                                     │   WEB UI  │
                                     │   React   │
                                     ╰───────────╯

sdk/ → api/ → core/ → storage/ + artifacts/

core/ is framework-free  ·  SQLAlchemy 2 + Alembic  ·  SQLite default

Architecture notes: docs/architecture.md


08 / DEVELOPMENT

BUILD · TEST · VERIFY

uv sync --group dev

# Or:
pip install -e . pytest pytest-asyncio httpx ruff mypy build

pytest
# unit · sdk · api · security · integration

ruff check src tests && mypy src

cd frontend && npm install && npm run build
# writes into src/tracenest/web/dist

python scripts/verify_wheel.py
# build + fresh-venv install + e2e
CI matrix configured for Linux · macOS · Windows (has not been run yet)

PostgreSQL backend is planned — SQLite is the supported default today


09 / ROADMAP

FROM COLLECTION TO A COMPLETE AGENT WORKBENCH

┌──────────────────────────────────────────────────────────────────┐
│                                                                  │
│   00   FOUNDATION                    ✔  done                     │
│   01   PACKAGE · CLI · SERVER        ✔  done                     │
│   02   SDK · INGESTION               ✔  done                     │
│  ▸03   FULL WORKBENCH             ▶  next                        │
│         overview · graph · timeline · tools · filters            │
│   04   LANGGRAPH · MULTI-AGENT       ⏳  planned                 │
│         failure demo                                             │
│   05   REPLAY                        ⏳  planned                 │
│         playback · deterministic · branch · diff                 │
│   06   EVALUATIONS                   ⏳  planned                 │
│         datasets · experiments                                   │
│   07   INTEGRATIONS · RELEASE        ⏳  planned                 │
│         LangChain · CrewAI · OTLP · Docker                       │
│                                                                  │
└──────────────────────────────────────────────────────────────────┘

LICENSE

MIT  ·  © TraceHarbor contributors


██████╗ █████╗  ██████╗  ██████╗ ███████╗
██╔══██╗██╔══██╗██╔════╝ ██╔════╝ ██╔════╝
██████╔╝███████║██║      ██║      █████╗
██╔══██╗██╔══██║██║      ██║      ██╔══╝
██████╔╝██║  ██║╚██████╗ ╚██████╗ ███████╗
╚═════╝ ╚═╝  ╚═╝ ╚═════╝  ╚═════╝ ╚══════╝

T R A C E N E S T  ·  0.2.0  ·  ALPHA

OBSERVE / DEBUG / REPLAY / EVALUATE

Made on a Friday. For agents that misbehave on Mondays.

Metadata

Release files for traceharbor 0.3.0

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

Source distribution (sdist)

Source distribution for traceharbor 0.3.0
File Size Uploaded Provenance Actions
traceharbor-0.3.0.tar.gz 1.7 MB Without provenance Details for traceharbor-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 2.1 MB

Release files / traceharbor-0.3.0.tar.gz

Download URL traceharbor-0.3.0.tar.gz
Size 1.7 MB
Tags Source
SHA-256 checksum
How to use checksums
4a57a4b7c856eb085b5c9457e1568091a2e7765a4a362285ab4051f9892c8efc
BLAKE2b-256 checksum
How to use checksums
6019827d23bae7d87323bf6833b218b2eee018dc1fa268b6977b549b8eeadf76
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release files / traceharbor-0.3.0-py3-none-any.whl

Download URL traceharbor-0.3.0-py3-none-any.whl
Size 422.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4c53958fa96d5809a48fa2f4755be465bc9c77c8e2d05c51fcc61d2146039da8
BLAKE2b-256 checksum
How to use checksums
d8e7d089461461a6b3e8185fec67903759c9e0b99aa884e57d3a9848c5f97e72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Security for traceharbor 0.3.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.3.0 This release

2 release files No 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