sam-4screen-desktop 2026-8-3:19:29:15
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
---
|
||||
created: 2026-05-16
|
||||
modified: 2026-08-02
|
||||
modified: 2026-08-03
|
||||
type: note
|
||||
tags:
|
||||
- ai
|
||||
@@ -109,6 +109,7 @@ pi → omni provider → POST /v1/chat/completions { model: "default-opencode-go
|
||||
| **@tintinweb/pi-tasks** | npm (global) | Task management with dependency tracking, auto-cascade, background process tracking, TaskExecute spawns subagents via RPC |
|
||||
| **gentle-engram** | `~/.agents` | Memory service connecting to engram via ENGRAM_URL. Replaces memory-vault. Session capture, compaction recovery |
|
||||
| **headroom-bridge** | `~/.agents` | `compress_for_agent` tool — compresses >20K chars via Headroom Docker on .13:8787. 60-95% token reduction |
|
||||
| **pi-langfuse** | npm (project) | Langfuse LLM observability for pi — one trace per conversation, grouped by pi session, with tokens + cost. See [[#pi-langfuse — LLM Observability for Pi]] |
|
||||
|
||||
|
||||
### pi-subagents (@tintinweb)
|
||||
@@ -391,6 +392,47 @@ ssh 192.168.20.13 "cd /home/sam/Docker/Containers/headroom && docker compose pul
|
||||
| `/home/sam/Docker/Containers/headroom/.env` | Environment file (on .13) |
|
||||
|
||||
|
||||
## pi-langfuse — LLM Observability for Pi
|
||||
|
||||
Sends pi's LLM traffic to Langfuse (self-hosted on .13:3001) for tracing, token usage, and cost-per-session. One trace per user prompt, grouped by pi session.
|
||||
|
||||
| Aspect | Detail |
|
||||
|--------|--------|
|
||||
| **What it is** | pi extension (npm package `pi-langfuse` v1.5.8, by gooyoung) that captures pi runs — agent steps, LLM generations, tool calls, final output, usage, cost — into Langfuse |
|
||||
| **Where it runs** | Per-project — enabled by adding `npm:pi-langfuse` to `<project>/.pi/settings.json` `packages`. Keys read globally from `~/.pi/agent/pi-langfuse/config.json` |
|
||||
| **Config file** | `~/.pi/agent/pi-langfuse/config.json` (mode 600): `{ "publicKey": "pk-lf-…", "secretKey": "sk-lf-…", "host": "http://192.168.20.13:3001" }` |
|
||||
| **Env var fallback** | `LANGFUSE_PUBLIC_KEY`, `LANGFUSE_SECRET_KEY`, `LANGFUSE_BASE_URL` (used only when config.json is missing/incomplete) |
|
||||
| **Commands** | `/langfuse-setup` (interactive key entry), `/langfuse-status` (show config state, masked keys, capture policy) |
|
||||
| **Requirements** | Node ≥ 22 (machines run 24); peer dep `@earendil-works/pi-coding-agent: *` |
|
||||
| **What you get** | Root `agent`, per-request `generation`, and per-tool `tool` observations; token usage + cost; privacy controls (input/output/tool redaction, path hashing, secret redaction) |
|
||||
| **Dashboard** | `http://192.168.20.13:3001` |
|
||||
|
||||
### Install (per project)
|
||||
|
||||
Add to the project's `.pi/settings.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
"packages": ["npm:pi-langfuse"]
|
||||
}
|
||||
```
|
||||
|
||||
Restart pi — it installs the extension into `.pi/npm/` and picks up the config automatically.
|
||||
|
||||
### Global install (all projects / machines)
|
||||
|
||||
The global `~/.pi/agent/settings.json` is a Nix-store symlink (read-only). To enable everywhere, add `npm:pi-langfuse` to the `packages` list in `/etc/nixos/home/sam/home.nix` and rebuild Home Manager.
|
||||
|
||||
### Why not the OmniRoute langfuse plugin?
|
||||
|
||||
OmniRoute's example langfuse plugin is **broken against the 3.8.48 runtime** (verified in source, 2026-08-03):
|
||||
- Plugin config is stored in SQLite but **never delivered to hook payloads** — `PluginContext` has no `config` field
|
||||
- `onRequest` metadata is **not threaded** to `onResponse` (each hook gets a fresh `metadata: {}`)
|
||||
- **Streaming requests** (what pi uses) receive `response: { status: 200, streamed: true }` — no response body to trace
|
||||
|
||||
pi-langfuse traces at the pi layer instead, which works for streaming and gives per-session grouping. The plugin files were removed from .13 (compose restored, container recreated clean).
|
||||
|
||||
|
||||
## codebase-memory-mcp
|
||||
|
||||
Code intelligence MCP server by DeusData. Single static C binary (~13MB), zero dependencies, 158 languages. Indexes a codebase into a persistent knowledge graph — average repo in milliseconds. 15 MCP tools for structural queries. Runs locally, code never leaves your machine.
|
||||
@@ -686,6 +728,8 @@ Path: `~/.pi/agent/subagents.json`. Configuration for pi-subagents agent types,
|
||||
| `get_subagent_result()` | Retrieve results from background agent |
|
||||
| `steer_subagent()` | Send mid-run steering message |
|
||||
| `compress_for_agent()` | Compress large content via Headroom |
|
||||
| `/langfuse-setup` | Set Langfuse keys interactively (pi-langfuse) |
|
||||
| `/langfuse-status` | Show pi-langfuse config state (masked keys, host, capture policy) |
|
||||
|
||||
|
||||
## Agent Roster (18)
|
||||
@@ -749,5 +793,6 @@ compress_for_agent({ content })
|
||||
- [x] Update Pi Subagent.md and Pi Agent Extensions & Skills.md documentation ✅ 2026-06-14
|
||||
- [x] Update pi-subagents to v0.10.3 ✅ 2026-06-14
|
||||
- [x] Update pi-tasks to v0.7.0 ✅ 2026-06-13
|
||||
- [x] Install pi-langfuse tracing extension (pi → Langfuse on .13:3001) ✅ 2026-08-03
|
||||
- [ ] Verify video-extract works with Gemini
|
||||
- [ ] Clean up workspace-map.json entries for any stale memory packs
|
||||
|
||||
Reference in New Issue
Block a user