Summary
Set up agent-session-analytics on speck-vm for multi-machine access, mirroring the agent-event-bus deployment pattern.
Tasks
Makefile targets (mirror agent-event-bus)
Remote ingestion (push-based)
Session JSONL files live on each machine locally. Clients need to push their data to the central server.
New MCP tool:
New CLI command:
Hook integration:
Documentation
Deployment
Design Notes
Why push-based?
ingest_logs() reads from ~/.claude/projects/*.jsonl which are local to each machine
- Can't have server read client files without file sync infrastructure
- Push over MCP HTTP uses existing auth (Tailscale) and transport
Flow
[Client Machine] [Server (speck-vm)]
~/.claude/projects/*.jsonl ---> upload_session() MCP tool
| |
CLI reads local files Writes to SQLite
Parses entries Dedupes by UUID
Calls remote MCP Updates session stats
Reference
Summary
Set up agent-session-analytics on speck-vm for multi-machine access, mirroring the agent-event-bus deployment pattern.
Tasks
Makefile targets (mirror agent-event-bus)
install-servertarget (service + dependencies + MCP config)install-clienttarget (CLI + MCP config withREMOTE_URLparam)install: install-serveraliasRemote ingestion (push-based)
Session JSONL files live on each machine locally. Clients need to push their data to the central server.
New MCP tool:
upload_session(session_id, entries: list[dict])- accepts parsed entries, writes to DBNew CLI command:
agent-session-analytics-cli push [--days N]- reads local JSONL, calls remote MCPAGENT_SESSION_ANALYTICS_URLenv var for server URLHook integration:
SessionStart:compacthook to callpushafter compaction eventsDocumentation
docs/TAILSCALE_SETUP.md(adapt from agent-event-bus)Deployment
make install-servertailscale serve --bg 8081make install-client REMOTE_URL=https://speck-vm.tailac7b3c.ts.net/mcpon laptopDesign Notes
Why push-based?
ingest_logs()reads from~/.claude/projects/*.jsonlwhich are local to each machineFlow
Reference