Skip to content

coilyco-flight-deck/otel-a2a-relay

Repository files navigation

πŸ”πŸ”—πŸ€– otel-a2a-relay (o2r)

Agent activity as OTel spans. Every agent message, handoff, and task transition becomes a queryable trace any OTel-native tool can render. A2A is the current wire format; the session derivation generalizes to any transport-keyed channel (GitHub issue, Slack thread, Linear ticket), so the same trace shape holds when other wire formats land.

otel-a2a-relay is the canonical name (repo, package, protocol doc). o2r is the dictation-friendly shortname used in CLI entrypoints, span identifiers (service.name=o2r), and prose.

Animated session topology from a real multi-agent run: four agent leaves around a magenta relay hub, particles tracing each agent's posts to the channel as OTel spans, the message log on the right replaying the real coordination

A real run, animated: four agents coordinating a live cross-node k3s flannel fix through one relay, rendered straight from the channel's OTel spans in start-time order, host/network identifiers scrubbed. See docs/visualization.md.

What it ships

Agent peers coordinate through this relay; every message becomes OTel spans exported via OTLP/HTTP to whatever OTEL_EXPORTER_OTLP_ENDPOINT points at. The trace IS the operations view. Two coordination shapes share one span schema:

  1. A2A wire format - JSON-RPC 2.0 over HTTP into traces, with a deterministic sha256(<repo>:<issue>) session ID for issue-rooted coordination.
  2. Agent Channel - a Postgres-backed channel with 4-character dictatable IDs, an append-only event log (spec/state/status/comms/log), and a self-describing onboarding endpoint. Spec: docs/channels-protocol.md. Every channel event also emits one OTel span.

Trace propagation is W3C traceparent end-to-end (client β†’ relay β†’ peer is one trace). Default visualizer is Phoenix; anything OTLP-native works. Full inventory: docs/FEATURES.md.

Workspace layout

A uv workspace: a backend-agnostic core plus per-backend extensions, each a publishable package.

  • otel-a2a-relay-core - relay HTTP server, tracing.bootstrap(), echo peer, task store. No backend coupling.
  • otel-a2a-relay-channels - the Agent Channel layer (FastAPI router + Postgres + Pydantic).
  • otel-a2a-relay-arize-phoenix - Phoenix harness, query helpers, animated topology GIF renderer, make view.
  • otel-a2a-relay-tempo-grafana - Tempo bootstrap helper, harness probe, dockerized Tempo+Grafana stack.
  • luca-flow - the AURORA microsite multi-agent demo, backend-agnostic.

Where to go next

Deploy

Deploy artifacts live in-tree (core/chart/, core/Dockerfile) so they version with the code; only the GitOps deployment state lives elsewhere. See docs/FEATURES.md.

See also

Cross-reference convention from coilysiren/agentic-os#59. This repo is the worked example.

License

MIT.

About

πŸ”πŸ”—πŸ€– Generalized agent-activity emitter. Turns agent communication, tool use, and lifecycle into OTel spans any observability tool can render. Subsumes the agent-channel protocol. (o2r)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors