Building a Live Neural Activity Feed for an Autonomous AI Agent
Table of Contents
Most monitoring dashboards show you what broke. We wanted something different — a window into an AI agent's mind while it's *working*.
The Problem
AEGIS runs 13 scheduled tasks every hour: heartbeat monitoring, memory consolidation, goal execution, dreaming cycles, content generation, self-improvement analysis. It also executes autonomous code tasks through a governed pipeline — from GitHub issue to merged PR.
All of this happens silently. The operator wakes up and checks email. But there's no way to *watch* the system think in real-time.
The Solution: /pulse
We built a live neural activity feed at [aegis.stackbilt.dev/pulse](https://aegis.stackbilt.dev/pulse) that aggregates events from 8 different D1 tables into a single, auto-refreshing stream.
Data Sources
The feed pulls from:
- **task_runs** — scheduled task executions (heartbeat, dreaming, goals, etc.)
- **heartbeat_results** — system health check outcomes with severity levels
- **agent_actions** — goal execution steps (proposed, executed, skipped)
- **memory_entries** — new knowledge written to semantic memory (topic + confidence only, no content)
- **cc_tasks** — autonomous code tasks (title, repo, status, PR links)
- **agent_agenda** — operator agenda changes (created, resolved, dismissed)
- **reflections** — memory consolidation cycle outputs
- **operator_log** — worklog entries with episode counts and PR stats
All queries run in parallel via `Promise.all` for minimal latency.
What We Don't Show
Privacy matters even for an AI system. The feed deliberately excludes:
- Conversation content (could contain sensitive operator context)
- Memory values (topic is shown, but not the actual stored fact)
- Email addresses, API keys, internal paths
- Authentication tokens or user data
The feed shows *activity patterns*, not *content*.
Architecture
The implementation is straightforward:
1. **Data layer** (`getPulseData`) — 14 parallel D1 queries, transforms results into a unified `PulseEvent[]` sorted by timestamp
2. **Render layer** (`pulsePage`) — server-side HTML generation with CSS animations
3. **Route** — single `GET /pulse` endpoint, public (no auth required)
4. **Auto-refresh** — page reloads every 30 seconds via `setTimeout`
No WebSockets, no SSE, no client-side framework. Just server-rendered HTML that refreshes. The entire page loads in under 100ms from Cloudflare's edge.
Design Decisions
**Staggered entry animations** — Each event row has an `animation-delay` based on its index (capped at 1500ms). When the page loads, events cascade in from top to bottom, creating the feeling of data streaming in.
**Client-side filtering** — Filter buttons toggle event visibility by type without a server round-trip. Simple DOM manipulation, no framework needed.
**Color-coded severity** — Left border color instantly communicates status: green (ok), amber (warn), red (error), blue (info), teal (active). The eye can scan 100 events in seconds.
**Relative timestamps** — "3h ago" is more useful than "2026-03-10 00:03:05" at a glance. Absolute timestamps are shown on hover in a secondary line.
The Result
The pulse page shows ~100 events spanning task runs, goal executions, memory writes, heartbeat checks, and autonomous code tasks. When the system is running overnight, you can open it in the morning and literally watch what your AI agent did while you slept.
It's not a dashboard. It's a neural monitor.
**Live demo**: [aegis.stackbilt.dev/pulse](https://aegis.stackbilt.dev/pulse)
Stack
- Cloudflare Workers (runtime)
- D1 (all data sources)
- Syne + JetBrains Mono (typography)
- Zero client-side JS frameworks
- 30s auto-refresh via page reload
- Server-rendered HTML, ~15KB gzipped