Architecture · LikeC4

Agent Diagnostics

Turns raw agent-trial output into a labeled, queryable reliability dataset (11,995 trials, 40 categories / 11 dimensions)

built evolving planned research risk

The whole picture

System landscape

The system in context, then opened up into its containers.

Agent Diagnostics — system landscape

Agent Diagnostics — system landscape

index
Agent Diagnostics — containers

Agent Diagnostics — containers

observatorySystem

Turns raw agent-trial output into a labeled, queryable reliability dataset (11,995 trials, 40 categories / 11 dimensions)

Risks & open questions

Risks & open questions

risks
Evolving contracts

Evolving contracts

evolving

Inside each box

Containers & components

Each part decomposed into the components that implement it. Every box links to its source in the interactive explorer.

Core package (src/agent_diagnostics) — components

Core package (src/agent_diagnostics) — components

coreContainer

src/agent_diagnostics — the extraction / annotation / training / serving engine behind the CLI

LLM annotator — backends, prompt & cache

LLM annotator — backends, prompt & cache

llmView

Reads actual trajectories and classifies with Claude. Three interchangeable backends behind one dispatch interface; signals redacted before the prompt to prevent label leakage

Signal extraction — registry & cache

Signal extraction — registry & cache

signalsView

Reads each trial dir (result.json + trajectory.json) into a 31-field TrialSignals row; classifies tool calls via the tool registry

Golden-corpus & docs scripts

Golden-corpus & docs scripts

scriptsView

Out-of-CI tooling: build / curate the committed golden regression corpus, and regenerate the schema docs from the authoritative code

How it runs

Walkthrough flows

Dynamic views — the narrative spine of the system, step by step.

Walkthrough — ingest (trials → signals)

Walkthrough — ingest (trials → signals)

ingestFlow

Point the tool at a directory of trial dirs. The extractor reads result.json + trajectory.json per trial, classifies tool calls via the per-agent registry, and writes one 31-field row per trial; the content-hash cache skips trials whose bytes are unchanged.

Walkthrough — the label pipeline

Walkthrough — the label pipeline

labelFlow

Heuristic rules label the whole corpus instantly; the LLM labels a sample from the real trajectories. blend merges them (heuristic-only share capped) into a training set; train cross-validates per category and stores held-out F1; ensemble trusts deterministic tier-1 rules plus tier-2 classifier categories that clear the F1 (and optional ECE) gate.

Walkthrough — LLM annotation of one trial

Walkthrough — LLM annotation of one trial

llmAnnotateFlow

The prompt builder strips outcome-bearing signal fields (reward / passed / exception) so the model cannot read the answer, then truncates the trajectory head+tail. The annotation cache is keyed on sha256(prompt + model id), so a re-run with the same prompt and model is free; errors are never cached and re-run.

Walkthrough — query & export the dataset

Walkthrough — query & export the dataset

serveFlow

A fresh clone can query immediately: the query engine prefers data/export/*.parquet over the JSONL working set. export rewrites Parquet deterministically (fixed created_by, native list columns) and writes a MANIFEST with schema version, row counts, sha256, and source commit.

Where it runs

Deployment

What runs where, and the process & data boundaries between the pieces.

Deployment — where each piece runs

Deployment — where each piece runs

deployment

Explore it live

The figures above are static exports. The interactive explorer lets you pan, zoom, follow relationships, and jump from any box to the source.