Problem
agent-strace server works well for local and self-hosted setups. But running a persistent collector requires provisioning infrastructure, managing uptime, and handling storage — which is friction for teams that just want traces to land somewhere reliable without ops work.
The current flow for multi-agent or CI use cases:
agent → AGENT_STRACE_ENDPOINT=http://my-server:4317 → self-hosted collector
The self-hosted step is a barrier. You need a machine, a process manager, persistent storage, and a public endpoint. For many users, that's more work than the tracing itself.
Proposed solution
A hosted collector endpoint that accepts the same HTTP API as agent-strace server — no client changes required.
# Today (self-hosted)
AGENT_STRACE_ENDPOINT=http://localhost:4317 python my_agent.py
# With hosted collector (no other changes)
AGENT_STRACE_ENDPOINT=https://collector.agent-strace.dev python my_agent.py
The client (agent-strace) does not change. The server-side collector protocol is already defined. This is purely an infrastructure addition.
What it enables
- CI/CD tracing — agents running in ephemeral containers can push traces to a persistent endpoint without any infrastructure setup
- Multi-machine correlation — traces from multiple agents across different machines land in one place, correlated by session ID
- Team sharing —
agent-strace share <id> already generates a shareable HTML replay; a hosted collector makes the underlying data accessible without self-hosting
- Persistent history — local
.agent-traces/ directories get cleaned up; a hosted collector retains session history across machines and reinstalls
Scope
Collector API (unchanged from agent-strace server)
The hosted endpoint implements the same API already documented in docs/server.md:
POST /events — ingest NDJSON event batches
GET /sessions — list sessions
GET /sessions/{id} — fetch session events
GET /events/stream — SSE stream for live panel
No protocol changes. Existing --stream-to and AGENT_STRACE_ENDPOINT flags work without modification.
Authentication
API key passed as Authorization: Bearer <key> header. The existing --stream-headers flag on agent-strace watch already supports custom headers, so no CLI changes needed.
Storage
Sessions stored per API key. Retention policy TBD (e.g. 30 days on free tier).
Free tier
A free tier with reasonable limits (session count, retention, storage) so individual developers and open-source projects can use it without a credit card.
Out of scope for this issue
- Web UI / dashboard (the VS Code extension already covers session browsing)
- Team management / org accounts
- Custom retention policies
- SLA guarantees
Implementation notes
- The server implementation in
src/agent_trace/server.py is the reference. The hosted version is the same logic behind a persistent process with auth middleware added.
- Deployment target: any platform that supports persistent HTTP services and file/object storage (Fly.io, Railway, Render — all viable).
- The
agent-strace server local mode stays unchanged. This is additive.
Acceptance criteria
Problem
agent-strace serverworks well for local and self-hosted setups. But running a persistent collector requires provisioning infrastructure, managing uptime, and handling storage — which is friction for teams that just want traces to land somewhere reliable without ops work.The current flow for multi-agent or CI use cases:
The self-hosted step is a barrier. You need a machine, a process manager, persistent storage, and a public endpoint. For many users, that's more work than the tracing itself.
Proposed solution
A hosted collector endpoint that accepts the same HTTP API as
agent-strace server— no client changes required.The client (
agent-strace) does not change. The server-side collector protocol is already defined. This is purely an infrastructure addition.What it enables
agent-strace share <id>already generates a shareable HTML replay; a hosted collector makes the underlying data accessible without self-hosting.agent-traces/directories get cleaned up; a hosted collector retains session history across machines and reinstallsScope
Collector API (unchanged from
agent-strace server)The hosted endpoint implements the same API already documented in docs/server.md:
POST /events— ingest NDJSON event batchesGET /sessions— list sessionsGET /sessions/{id}— fetch session eventsGET /events/stream— SSE stream for live panelNo protocol changes. Existing
--stream-toandAGENT_STRACE_ENDPOINTflags work without modification.Authentication
API key passed as
Authorization: Bearer <key>header. The existing--stream-headersflag onagent-strace watchalready supports custom headers, so no CLI changes needed.Storage
Sessions stored per API key. Retention policy TBD (e.g. 30 days on free tier).
Free tier
A free tier with reasonable limits (session count, retention, storage) so individual developers and open-source projects can use it without a credit card.
Out of scope for this issue
Implementation notes
src/agent_trace/server.pyis the reference. The hosted version is the same logic behind a persistent process with auth middleware added.agent-strace serverlocal mode stays unchanged. This is additive.Acceptance criteria
agent-strace serverAuthorization: Bearer)AGENT_STRACE_ENDPOINT=https://collector.agent-strace.devworks with no other client changesGET /sessionsandGET /sessions/{id}docs/server.mdgets a "Hosted collector" section alongside the self-hosted guide