Skip to content

feat: hosted collector endpoint — managed agent-strace server with free tier #129

Description

@Siddhant-K-code

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 sharingagent-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

  • Hosted endpoint accepts the same NDJSON event batches as agent-strace server
  • Authentication via API key (Authorization: Bearer)
  • AGENT_STRACE_ENDPOINT=https://collector.agent-strace.dev works with no other client changes
  • Sessions retrievable via GET /sessions and GET /sessions/{id}
  • SSE stream works for VS Code live streaming panel
  • Free tier available without credit card
  • Docs updated: docs/server.md gets a "Hosted collector" section alongside the self-hosted guide

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions