05
  • Observability
  • AI

Synapsee

Follow what agents did. Understand what went wrong. Give the OS agent a way to improve.

Synapsee collects telemetry across runtimes and rebuilds a graph of agents, sessions, traces, tools and messages. Inside Zion OS, the Synapsee app takes the OS agent's runs further: it analyzes sessions, identifies performance gaps and produces concrete recommendations with evidence to investigate.

In the ecosystemThe standalone platform supplies cross-runtime monitoring. The analysis and self-improvement workflow described here comes from the Synapsee app in Zion OS: inspect a run, investigate a finding, improve the agent and review the next run.

00
  • Overview

System

Telemetry in, one graph out. Runtimes export OpenTelemetry to a collector and Kafka. A Rust receptor normalizes it, an ingestor posts it to a Go API that keeps the graph, and the dashboard and Heart both read that API.

Pipeline
OTel · Kafka · Rust
API
Go · Gin
Storage
FalkorDB · ClickHouse · Redis
Frontend
Next.js
langgraph claude code google adk otel genai otlp 1 collector otel grpc · http spans · logs metrics publish kafka topics otlp spans · logs otlp metrics agents · traces compositions communications 2 in out receptor rust decode → event parse first that fits langgraph · claude code google adk · genai 3 ingestor rust kafka → http post post api go · gin agents · sessions traces · tool calls communications compositions raw traces from clickhouse 4 clickhouse raw events kafka engine storage behind the api falkordb graph redis metrics postgres users 5 dashboard next.js graph · traces rest a2a heart go · adk the assistant tools mcp server go the api as tools 6
Fig. 05Telemetry in, one graph out
  1. 1RuntimesLangGraph, Claude Code, Google ADK, and anything that follows OpenTelemetry's GenAI conventions. The agents keep running where they are; they only export telemetry.01 Parsing
  2. 2Collector and KafkaAn OpenTelemetry Collector publishes spans, logs and metrics to Kafka, where raw and normalized events wait on their own topics.01 Parsing
  3. 3ReceptorDecodes each message into a generic event, then hands it to the first parser that can read it.01 Parsing
  4. 4Ingestor and APIThe ingestor posts normalized events to the Go API, which writes them into the graph and serves every reader.02 Graph
  5. 5StorageFalkorDB holds the relationships. ClickHouse reads raw events straight from Kafka, Redis caches metrics, and Postgres keeps users.02 Graph
  6. 6Dashboard and HeartThe dashboard shows the network, traces and sessions. Heart, the assistant, answers through MCP tools that call the same API.02 Graph
  7. 7Analysis in Zion OSThe OS app analyzes traces and sessions, then generates performance findings, scores and concrete recommendations for the OS agent.03 Analysis
  8. 8Evidence for improvementSaved records link findings to spans and measured context data. A developer can investigate the evidence, make a change and review a fresh record.04 Investigation
01
  • Receptor

Parsing

Two stages: decode the wire format, then let the right parser claim the event.

Stage one picks a decoder by topic, turns the protobuf into a generic event, and writes it to a raw topic that ClickHouse reads. Stage two tries event parsers until one succeeds: one named for the topic first, then one named for its prefix, then the rest. Each parser checks for the shape it expects — Claude Code exports logs, LangGraph and ADK export spans — so a parser that can't read an event fails and the next one tries. The winner's agents, traces, compositions and communications go back to Kafka for the ingestor. A new runtime is a new parser.

otlp_logs decode event stage 1 → raw events stage 2 · first parser that fits 1langgraphwants spans 2google adkwants spans 3claude codeparses the logs 4genai logsnot tried to kafka: agents · traces compositions · communications
Fig. 05.1One Claude Code log, two stages
Stages
Decode · parse
Parsers
LangGraph · Claude Code · ADK · GenAI logs and metrics
Out
Agents · traces · compositions · communications
Language
Rust
02
  • Model

Graph

What happened, as relationships, not as a log.

The API writes what the parsers found into FalkorDB. Agents take part in sessions; traces belong to a session and nest under their parents; a tool call is made by an agent and uses a tool; a message starts at one agent, targets another and belongs to a trace. Agents that work together form compositions. The dashboard draws this graph as its network view, and Heart queries it through the same API, so both see the same data. The raw events stay in ClickHouse for the trace view.

session agent a message agent b trace child trace tool call tool falkordb · read by the dashboard and heart
Fig. 05.2One session as a graph
Nodes
Agent · session · trace · tool call · tool · message
Groups
Compositions of agents
Graph
FalkorDB
Raw
ClickHouse, from Kafka
03
  • Zion OS app
  • Analysis

Analysis

Turn an OS agent run into a diagnosis and a concrete next step.

Open a trace or a whole session in Synapsee. The server reconstructs the goal, decisions, tools, outcomes and delegation patterns. A separate performance record examines eight areas: missing tools, hallucination, unused relevant tools, error recovery, context loss, prompt redundancy, delegation and promises the agent's capabilities cannot support.

The analysis combines labeled spans with measured context-token trends and a breakdown of the prompt. Each finding describes what happened, why it matters, its evidence and a recommended fix. A deterministic pass filters noise, resolves span citations and computes scores from the surviving findings. When configured, a TypeSafe judgement adds an impact and evidence assessment. A clean run can have no findings.

session spans tools · turns · errors measured context tokens · prompt draft → refine → score optional impact judgement performance record finding · evidence · recommendation scores follow the findings
Fig. 05.3The OS agent's run, reviewed
Input
Trace or session · measured context
Review
Eight performance topics
Output
Findings · evidence · recommendations
Execution
Server-side · cached · regenerable
04
  • Zion OS app
  • Evidence

Investigation

Follow a finding back to the run that produced it.

The record carries session and runtime provenance, the OS build, the analysis prompt version and API links. Span citations resolve to stable trace and span IDs. Alongside the record, Synapsee saves an evidence bundle: spans for each trace, measured context tokens, the prompt breakdown and session activity when available. The records API exposes the bundle and resolves cited spans, checking saved evidence before the live span store.

This gives a developer something to inspect after the run: which tool failed, what context grew, or where the agent offered an action it could not perform. The record survives a failed bundle write; the evidence manifest reports missing or truncated data. Correlated application logs are still a later addition.

record.json finding → trace ID + span ID session · runtime · build · prompt version pinned evidence spans per trace context tokens prompt breakdown session activity* records API read the record inspect the bundle resolve a span check the manifest * when the session can be resolved
Fig. 05.4A record with evidence to investigate
Identity
Session · runtime · OS build
References
Stable trace and span IDs
Storage
Record + evidence bundle on disk
Access
Records and evidence API
05
  • OS agent
  • Improvement workflow

Self-improvement

Use the agent's own runs to decide what to change.

A performance finding is the starting point for improving the OS agent. A developer or coding agent reads the record, follows its evidence and changes the relevant prompt, tool or capability registration. Another run produces a fresh record to review alongside the original, checking the outcome, remaining findings and measured token usage.

For example, a prompt-redundancy finding must identify a prompt section and cite measured token counts. Its recommendation can propose a specific trim and estimate the saving. The next run provides new measurements to check whether that change helped while preserving the agent's ability to complete the task.

Analysis, recommendations and evidence retrieval are implemented in Zion OS. Applying changes and comparing runs is developer-driven today; automatic remediation, record lifecycle tracking and cross-run trend APIs are future extensions.

OS agent run traces + context analysis record findings + fixes investigate follow evidence change + rerun prompt · tool solid: record generation dashed: developer-driven steps
Fig. 05.5Evidence → change → another run
Scope
Improving the Zion OS agent
Implemented
Analysis · recommendations · evidence
Changes
Developer or coding agent
Verification
Fresh run · fresh record · review