Building HookWatch: AI Agent Observability with Spring Boot
The Problem
As AI agents become more autonomous, observability becomes critical. When an agent makes 50 tool calls across multiple steps, you need to understand what happened, how much it cost, and where it failed.
The Architecture
HookWatch ingests execution traces via webhook endpoints, stores them in PostgreSQL, and visualizes them as interactive directed graphs in a React frontend. Redis handles real-time updates.
**Core Stack:** - Spring Boot 3.4 + Java 21 for the backend API - React 18 + TypeScript for the frontend - PostgreSQL 16 for persistent storage - Redis 7 for caching and real-time events - Docker for deployment
The Agentic Process
What makes this project unique: it was built almost entirely through AI agent orchestration. I set up a 24/7 VPS, configured Claude Code and OpenClaw agents, and reviewed every PR myself.
The agents handled: - Writing implementation code from architectural specs - Creating comprehensive test suites - Handling dependency management and Docker configuration - Writing documentation
I handled: - Architecture decisions - Code review for every single PR - Deployment and infrastructure - Quality gates and merge decisions
Key Learnings
- **Agent observability needs agent observability** — bootstrapping problem solved by starting simple
- **Webhook-based ingestion scales well** — no SDKs to maintain, any agent framework can emit traces
- **Graph visualization reveals patterns** — seeing agent execution as a DAG immediately highlights inefficiencies
What's Next
Active development continues. The roadmap includes cost anomaly detection, multi-agent workflow comparison, and a plugin system for different agent frameworks.
HookWatch is open source. Check it out on GitHub.