@ramarivera/pi-langfuse
Pi extension that exports model usage and tool activity to Langfuse via OpenTelemetry
Package details
Install @ramarivera/pi-langfuse from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@ramarivera/pi-langfuse- Package
@ramarivera/pi-langfuse- Version
0.1.1- Published
- Jun 1, 2026
- Downloads
- 293/mo · 10/wk
- Author
- ramarivera
- License
- MIT
- Types
- extension
- Size
- 23.5 KB
- Dependencies
- 0 dependencies · 2 peers
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
@ramarivera/pi-langfuse
Pi extension that exports full Pi session traces, tool activity, token usage, and costs to Langfuse via OpenTelemetry.
By default it sends OTLP traces to:
https://langfuse.ai.roxasroot.net/otel/v1/traces
Override with PI_LANGFUSE_OTLP_ENDPOINT when testing against another collector.
Install
pi install npm:@ramarivera/pi-langfuse@0.1.0
Local Development
This checkout is live-enabled for Pi through:
.pi/extensions/langfuse/index.ts
That shim imports the package entrypoint in src/index.ts, which imports the extension factory from src/extension.ts. Tests use the same symbol so local behavior, package behavior, and manual Pi behavior do not drift.
npm install
npm run check
npm test
npm run test:e2e
npm pack --dry-run
Publishing
Publishing uses GitHub Actions trusted publishing in .github/workflows/publish.yml.
Before the first publish, configure npm trusted publishing:
- owner/repo:
ramarivera/pi-langfuse - workflow:
.github/workflows/publish.yml - environment: blank unless the workflow is changed to require one
No NPM_TOKEN is required for trusted publishing.