@traceroot-ai/pi-extension

Traceroot extension for pi. Automatic OpenTelemetry tracing of pi sessions, turns, LLM calls, and tool executions to Traceroot.

Packages

Package details

extension

Install @traceroot-ai/pi-extension from npm and Pi will load the resources declared by the package manifest.

$ pi install npm:@traceroot-ai/pi-extension
Package
@traceroot-ai/pi-extension
Version
0.1.1
Published
Sep 30, 2026
Downloads
240/mo · 12/wk
Author
traceroot-ai
License
Apache-2.0
Types
extension
Size
140.7 KB
Dependencies
5 dependencies · 1 peer
Pi manifest JSON
{
  "extensions": [
    "./src/index.ts"
  ]
}

Security note

Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.

README

traceroot-pi-extension

npm version

npm package · Pi package page

TraceRoot extension for pi that sends per-session traces to TraceRoot.

Each pi session is traced with conversation turns, LLM calls, tool executions, token usage, and session continuity metadata.


Installation

Install @traceroot-ai/pi-extension from npm:

pi install npm:@traceroot-ai/pi-extension

Or, from a clone of this repo:

pi install .

Configuration

Tracing is opt-in. Set the following environment variables before starting pi:

Variable Required Description
TRACEROOT_ENABLED Yes Set to true to enable tracing.
TRACEROOT_API_KEY Yes Your TraceRoot API key. Find it at app.traceroot.ai under Settings > API Keys.
TRACEROOT_HOST_URL No TraceRoot base URL. Defaults to the hosted service. Set this only when self-hosting.
TRACEROOT_OTLP_ENDPOINT No Explicit OTLP traces endpoint override. Defaults to <TRACEROOT_HOST_URL>/api/v1/public/traces.

Example (add to ~/.zshrc, ~/.bashrc, or your shell profile):

export TRACEROOT_ENABLED=true
export TRACEROOT_API_KEY="tr-..."
# Optional: only needed for self-hosted deployments
# export TRACEROOT_HOST_URL="https://your-traceroot.example.com"

Restart pi, or open a new terminal session, after setting the variables.


License

Apache-2.0