Embedding pi in your own Node process with
@earendil-works/pi-coding-agent? Use the pi SDK integration instead.Install
Requires Node.js 22.19 or later and pi 0.79 or later.Set up
Tracing is opt-in. Set these before starting pi, then restart pi:
Inside pi,
/traceroot status shows whether tracing is on and where it sends; /traceroot disable and /traceroot enable switch it for the current session.
Usage
Use pi as usual. Each session becomes one trace, with one span per turn.Verify
Run one prompt in pi and confirm the trace arrives:- In the traceroot UI: Navigate to Tracing > Traces in traceroot Cloud. You should see a trace with root span
pi.session. - Via the CLI: Run
traceroot traces listto inspect your recent traces from the terminal.
What gets captured
With content capture on, prompts and tool I/O are sent as they are. Nothing is redacted; set
TRACEROOT_CAPTURE_CONTENT=false and TRACEROOT_CAPTURE_TOOL_IO=false to send metadata only. See Data Capture and Privacy.
Limitations
- The exporter ignores
HTTPS_PROXY, so exports can fail on proxy-only networks. - If no trace arrives, run
/traceroot statusand setTRACEROOT_PI_DEBUG=trueto log to stderr.
Run the example
traceroot-pi-extension
Source and full settings
Next steps
pi SDK
Trace pi sessions you run from your own code.
Data Capture and Privacy
Control what leaves your machine.