Agent Fleet Observability Desk
Overview
Kelly Agent Observability is a Busabase Cloud App-in-Skill. Its canonical
product surface is the AirApp in Busabase, not a separate local-data
product. The same Hono source supports an explicitly requested local preview
with OAuth connection bootstrap. It gives an operator a read-mostly
dashboard over a MOCK fleet of LLM agents running behind a shared AI gateway
for a generic organization: per-agent call volume, latency (p50/p95),
error/failure rate, cost, an hourly call-volume sparkline, and a Trace Detail
view that highlights exactly where a chain of tool calls broke.
This skill was never a live monitoring integration, even before this
conversion — there is no real gateway, no real agents, and no real telemetry
anywhere. The fleet snapshot (agents + metrics + traces) is generated by a
deterministic, seeded function and written into Busabase by a trusted
skill-root script (scripts/generate_fleet_data.mjs); the AirApp itself only
ever reads whatever was last generated there. The only human action is
narrow: append an "acknowledge" / "needs investigation" handoff note to an
agent or trace — always a brand-new row in the handoffs Base, never a field
update on the agent/trace's own record.
Default behavior is AirApp-first. Unless the user explicitly asks only for
explanation, ensure the mock fleet exists (run the seed script below if the
agents Base is empty) and give the user the clickable AirApp URL. Start
localhost only when local preview/debugging is explicitly requested; it uses
the same Busabase resources and never offers another data provider. Use
chat-only mode only when the user says "纯聊天", "chat only", "no UI", or
similar.
This is deliberately generic and brand-free: agent names are generic
archetypes (Booking Assistant, Support Triage, etc.) for a generic
organization ("your organization", "the fleet") — no real company or product
appears anywhere in the code, config, or seed data.
Mandatory Dependencies
- Read and follow
$kelly-app-skill-creator for product behavior, visual
quality, responsive layout, and the complete canonical content/kelly-agent-observability-app/ artifact.
- Read and follow
$busabase for connection, target Space, node discovery,
ChangeRequests, review, and merge behavior.
- Read and follow
$busabase-app-creator for resource modeling, AirApp
runtime limits, security, validation, and deployment.
If a dependency is unavailable, preserve this skill's artifact and product
contracts, stop before the unavailable Busabase operation, and report the
exact missing dependency. Do not invent a second data backend.
App UI Screenshots
Boundary
- Read-mostly dashboard over a generated mock fleet. NEVER contact any real
agent gateway, LLM provider, or third-party API. There is no live
monitoring integration in this skill by design.
- Agents and traces are never created or edited by the AirApp; they enter
Busabase only through the trusted
scripts/generate_fleet_data.mjs seed
script, the same way kelly-portfolio-health's contracts enter through an
external sync process the app doesn't control.
- The only Base the AirApp itself ever writes to is
handoffs, and only ever
by creating a brand-new row (an acknowledge / needs-investigation note) —
never a field update on an agent or trace record.
- Never reference any real company, brand, or production system. Agent names
are generic archetypes for a generic organization ("your organization",
"the fleet").
Busabase Resources
Four Bases under one application Folder (kelly-agent-observability),
declared in content/kelly-agent-observability-app/app/js/config.js and the generated template sidecars under content/:
agents: one row per mock agent archetype (8 rows) — identity plus the
latest rolled-up health metrics (status, call volume, p50/p95 latency,
error rate, cost) and a 48h hourly call/error series (JSON array). Written
only by the trusted generator script.
traces: one row per mock trace (ordered tool-call chain), capped to fit
under the 100-record read limit (8 agents × 10 traces = 80 by default).
steps (JSON array) carries the ordered timeline; broke-at-step-id flags
exactly where a broken chain stopped. Written only by the trusted generator
script.
handoffs: append-only human-in-the-loop log — an acknowledge /
needs-investigation note against one agent or trace. The only Base the
AirApp itself ever writes to.
settings: sanitized fleet-generation metadata (schema version, seed,
generated-at), one row keyed by kind.
Resources provision lazily through an idempotent Busabase ChangeRequest the
first time the app runs in a Space; see references/fleet-schema.md for
exact field shapes.
First Run And Onboarding
On invocation, check the agents Base. If it's empty, run the trusted seed
script to generate the mock fleet:
node skills/kelly-agent-observability/scripts/generate_fleet_data.mjs --apply
There are no credentials to collect — this skill never calls an external
system, so onboarding is just running the seed script once.
Local App
Default behavior is AirApp-first — give the user the clickable AirApp URL.
Start pnpm --dir content/kelly-agent-observability-app dev only when local preview/debugging is explicitly
requested.
Required app views (hash routes):
#/overview: total calls (24h), total cost (today), degraded/critical/
healthy agent counts, and a per-agent card grid with a call-volume
sparkline.
#/agents: sortable Agent Health table (call volume, p50/p95 latency,
error rate, cost, status badge).
#/agents/<agent_id>: agent detail — metrics, sparkline, recent traces,
and a handoff form (acknowledge / needs investigation).
#/traces/<trace_id>: trace detail — ordered step timeline with the
chain-break step visually flagged, and a handoff form.
#/handoffs: history of recorded handoffs.
#/settings: data provider and status-threshold summary.
Demo Mode
?demo=1 opens a deterministic, fully offline mock fleet (8 agents, 48h of
hourly buckets, 16 traces per agent) for documentation and screenshots. It
never reads or writes Busabase and never claims a real connection; demo
handoff submissions only update the in-memory list already rendered.
?demo=agents and ?demo=trace select named mock scenes (agent health
table, a broken trace).
lang=en or lang=zh forces UI chrome language for screenshots.
UI language: support English and Chinese chrome with Auto default.
Fleet Generation Model
content/kelly-agent-observability-app/app/js/fleet-model.js (generateFleetData/summarizeFleet) is ported
verbatim from the retired lib/generate.ts:
- Per-agent profile — a fixed "personality" (volume, latency base/jitter,
error tendency, cost per call) per agent archetype, so the fleet reads as
varied, not random noise.
- Hourly buckets — 48 hours of calls/errors per agent on a
business-hours-ish curve, seeded per agent.
- Status —
statusFor(error_rate_pct, p95_latency_ms): critical at
error rate ≥ 8% or p95 ≥ 8000ms, degraded at ≥ 3% or ≥ 4000ms, else
healthy.
- Traces — an ordered tool-call chain per trace; a trace can "break" mid
chain (
status: error, broke_at_step_id set to the last step), with the
break probability tied to the agent's error tendency.
Same seed + same "now" + same tracesPerAgent always produces bit-identical
output — this is the property scripts/generate_fleet_data.mjs and the demo
provider both rely on.
Handoffs
The one human action — acknowledge or flag "needs investigation" on an agent
or trace, with a free-text note — writes a brand-new row into the handoffs
Base via busabase-sdk, never a field update on the agent/trace record
itself:
- From a standalone local preview the write merges immediately (trusted
operator).
- From the deployed AirApp it creates a pending ChangeRequest for the
trusted process to merge, per the AirApp boundary in
$busabase-app-creator.
Safety
- Never invent a real incident or real company data; this is illustrative
mock telemetry only.
- Keep all writes scoped to the
handoffs Base. No external network calls
anywhere in this skill.
- Redact nothing sensitive is collected here — there are no credentials in
this skill.
Useful Commands
node skills/kelly-agent-observability/scripts/generate_fleet_data.mjs --apply
pnpm --dir skills/kelly-agent-observability/content/kelly-agent-observability-app dev
Execution reports
Re-read the active provider's decisions immediately before any approved execution. Record each concrete operation, target, status, timestamp, and error in the provider-backed execution report; keep app actions local-only.
1---2name: kelly-agent-observability3description: Busabase App-in-Skill dashboard visualizing a generated MOCK fleet of LLM agents running behind a shared AI gateway for a generic organization. Use when the user invokes $kelly-agent-observability or /kelly-agent-observability, wants to review agent health, call volume, latency, error rates, cost, or trace-level chain breaks across an agent fleet. This is a demo/reference dashboard over a generated mock fleet snapshot seeded into Busabase by a trusted script — never a live monitoring integration, never a real gateway or real agents.4---56# Agent Fleet Observability Desk78## Overview910Kelly Agent Observability is a Busabase Cloud App-in-Skill. Its canonical11product surface is the AirApp in Busabase, not a separate local-data12product. The same Hono source supports an explicitly requested local preview13with OAuth connection bootstrap. It gives an operator a read-mostly14dashboard over a MOCK fleet of LLM agents running behind a shared AI gateway15for a generic organization: per-agent call volume, latency (p50/p95),16error/failure rate, cost, an hourly call-volume sparkline, and a Trace Detail17view that highlights exactly where a chain of tool calls broke.1819This skill was never a live monitoring integration, even before this20conversion — there is no real gateway, no real agents, and no real telemetry21anywhere. The fleet snapshot (agents + metrics + traces) is generated by a22deterministic, seeded function and written into Busabase by a trusted23skill-root script (`scripts/generate_fleet_data.mjs`); the AirApp itself only24ever **reads** whatever was last generated there. The only human action is25narrow: append an "acknowledge" / "needs investigation" handoff note to an26agent or trace — always a brand-new row in the `handoffs` Base, never a field27update on the agent/trace's own record.2829Default behavior is AirApp-first. Unless the user explicitly asks only for30explanation, ensure the mock fleet exists (run the seed script below if the31`agents` Base is empty) and give the user the clickable AirApp URL. Start32localhost only when local preview/debugging is explicitly requested; it uses33the same Busabase resources and never offers another data provider. Use34chat-only mode only when the user says "纯聊天", "chat only", "no UI", or35similar.3637This is deliberately **generic and brand-free**: agent names are generic38archetypes (Booking Assistant, Support Triage, etc.) for a generic39organization ("your organization", "the fleet") — no real company or product40appears anywhere in the code, config, or seed data.4142## Mandatory Dependencies43441. Read and follow `$kelly-app-skill-creator` for product behavior, visual45 quality, responsive layout, and the complete canonical `content/kelly-agent-observability-app/` artifact.462. Read and follow `$busabase` for connection, target Space, node discovery,47 ChangeRequests, review, and merge behavior.483. Read and follow `$busabase-app-creator` for resource modeling, AirApp49 runtime limits, security, validation, and deployment.5051If a dependency is unavailable, preserve this skill's artifact and product52contracts, stop before the unavailable Busabase operation, and report the53exact missing dependency. Do not invent a second data backend.5455## App UI Screenshots5657<table>58 <tr>59 <td width="50%"><img src="assets/screenshots/overview.webp" alt="Fleet overview"></td>60 <td width="50%"><img src="assets/screenshots/agent-health.webp" alt="Agent health table"></td>61 </tr>62 <tr>63 <td><strong>Fleet Overview</strong><br>Total calls, total cost, degraded/critical/healthy agent counts, and a per-agent sparkline card grid.</td>64 <td><strong>Agent Health</strong><br>Sortable table with call volume, p50/p95 latency, error rate, cost, and a status badge per agent.</td>65 </tr>66 <tr>67 <td width="50%"><img src="assets/screenshots/trace-detail.webp" alt="Trace detail with chain break"></td>68 <td width="50%"><img src="assets/screenshots/overview.zh-CN.webp" alt="Fleet overview in Chinese"></td>69 </tr>70 <tr>71 <td><strong>Trace Detail</strong><br>Ordered step timeline for one trace; the step where the chain broke is visually flagged.</td>72 <td><strong>Chinese UI</strong><br>Full zh-CN chrome via the language toggle or <code>lang=zh</code>.</td>73 </tr>74</table>7576## Boundary7778- Read-mostly dashboard over a generated mock fleet. NEVER contact any real79 agent gateway, LLM provider, or third-party API. There is no live80 monitoring integration in this skill by design.81- Agents and traces are never created or edited by the AirApp; they enter82 Busabase only through the trusted `scripts/generate_fleet_data.mjs` seed83 script, the same way `kelly-portfolio-health`'s contracts enter through an84 external sync process the app doesn't control.85- The only Base the AirApp itself ever writes to is `handoffs`, and only ever86 by creating a brand-new row (an acknowledge / needs-investigation note) —87 never a field update on an agent or trace record.88- Never reference any real company, brand, or production system. Agent names89 are generic archetypes for a generic organization ("your organization",90 "the fleet").9192## Busabase Resources9394Four Bases under one application Folder (`kelly-agent-observability`),95declared in `content/kelly-agent-observability-app/app/js/config.js` and the generated template sidecars under `content/`:9697- `agents`: one row per mock agent archetype (8 rows) — identity plus the98 latest rolled-up health metrics (status, call volume, p50/p95 latency,99 error rate, cost) and a 48h hourly call/error series (JSON array). Written100 only by the trusted generator script.101- `traces`: one row per mock trace (ordered tool-call chain), capped to fit102 under the 100-record read limit (8 agents × 10 traces = 80 by default).103 `steps` (JSON array) carries the ordered timeline; `broke-at-step-id` flags104 exactly where a broken chain stopped. Written only by the trusted generator105 script.106- `handoffs`: append-only human-in-the-loop log — an acknowledge /107 needs-investigation note against one agent or trace. The only Base the108 AirApp itself ever writes to.109- `settings`: sanitized fleet-generation metadata (schema version, seed,110 generated-at), one row keyed by `kind`.111112Resources provision lazily through an idempotent Busabase ChangeRequest the113first time the app runs in a Space; see `references/fleet-schema.md` for114exact field shapes.115116## First Run And Onboarding117118On invocation, check the `agents` Base. If it's empty, run the trusted seed119script to generate the mock fleet:120121```bash122node skills/kelly-agent-observability/scripts/generate_fleet_data.mjs --apply123```124125There are no credentials to collect — this skill never calls an external126system, so onboarding is just running the seed script once.127128## Local App129130Default behavior is AirApp-first — give the user the clickable AirApp URL.131Start `pnpm --dir content/kelly-agent-observability-app dev` only when local preview/debugging is explicitly132requested.133134Required app views (hash routes):135136- `#/overview`: total calls (24h), total cost (today), degraded/critical/137 healthy agent counts, and a per-agent card grid with a call-volume138 sparkline.139- `#/agents`: sortable Agent Health table (call volume, p50/p95 latency,140 error rate, cost, status badge).141- `#/agents/<agent_id>`: agent detail — metrics, sparkline, recent traces,142 and a handoff form (acknowledge / needs investigation).143- `#/traces/<trace_id>`: trace detail — ordered step timeline with the144 chain-break step visually flagged, and a handoff form.145- `#/handoffs`: history of recorded handoffs.146- `#/settings`: data provider and status-threshold summary.147148## Demo Mode149150- `?demo=1` opens a deterministic, fully offline mock fleet (8 agents, 48h of151 hourly buckets, 16 traces per agent) for documentation and screenshots. It152 never reads or writes Busabase and never claims a real connection; demo153 handoff submissions only update the in-memory list already rendered.154- `?demo=agents` and `?demo=trace` select named mock scenes (agent health155 table, a broken trace).156- `lang=en` or `lang=zh` forces UI chrome language for screenshots.157158UI language: support English and Chinese chrome with `Auto` default.159160## Fleet Generation Model161162`content/kelly-agent-observability-app/app/js/fleet-model.js` (`generateFleetData`/`summarizeFleet`) is ported163verbatim from the retired `lib/generate.ts`:164165- **Per-agent profile** — a fixed "personality" (volume, latency base/jitter,166 error tendency, cost per call) per agent archetype, so the fleet reads as167 varied, not random noise.168- **Hourly buckets** — 48 hours of calls/errors per agent on a169 business-hours-ish curve, seeded per agent.170- **Status** — `statusFor(error_rate_pct, p95_latency_ms)`: `critical` at171 error rate ≥ 8% or p95 ≥ 8000ms, `degraded` at ≥ 3% or ≥ 4000ms, else172 `healthy`.173- **Traces** — an ordered tool-call chain per trace; a trace can "break" mid174 chain (`status: error`, `broke_at_step_id` set to the last step), with the175 break probability tied to the agent's error tendency.176177Same seed + same "now" + same `tracesPerAgent` always produces bit-identical178output — this is the property `scripts/generate_fleet_data.mjs` and the demo179provider both rely on.180181## Handoffs182183The one human action — acknowledge or flag "needs investigation" on an agent184or trace, with a free-text note — writes a brand-new row into the `handoffs`185Base via `busabase-sdk`, never a field update on the agent/trace record186itself:187188- From a standalone local preview the write merges immediately (trusted189 operator).190- From the deployed AirApp it creates a pending ChangeRequest for the191 trusted process to merge, per the AirApp boundary in192 `$busabase-app-creator`.193194## Safety195196- Never invent a real incident or real company data; this is illustrative197 mock telemetry only.198- Keep all writes scoped to the `handoffs` Base. No external network calls199 anywhere in this skill.200- Redact nothing sensitive is collected here — there are no credentials in201 this skill.202203## Useful Commands204205```bash206node skills/kelly-agent-observability/scripts/generate_fleet_data.mjs --apply207pnpm --dir skills/kelly-agent-observability/content/kelly-agent-observability-app dev208```209210## Execution reports211212Re-read the active provider's decisions immediately before any approved execution. Record each concrete operation, target, status, timestamp, and error in the provider-backed execution report; keep app actions local-only.