All projects

watchtower

0 comments

What it does

Watchtower is a live security ops room for on-chain protocols, run by a swarm of concurrent agents instead of a human on pager duty. Independent watcher participants subscribe to real Solana mainnet programs over websockets and turn raw transaction logs into structured chain events using code-only filters (failed-transaction bursts, large transfers, SPL authority changes). A Risk Analyst agent classifies each event with a severity and reason, a Correlator agent looks for linked activity across streams, and a Briefer agent maintains a plain-English rolling brief and answers operator questions. When something is rated high severity, a Responder agent proposes a protective action, but a Guardrail interception handler pauses the tool call and routes it to the human operator, who approves or rejects it in real time. Every incident is correlated back to the exact event that caused it. The result is early warning plus context for small teams that cannot afford enterprise monitoring: see what is happening, understand it fast, and decide as a human.

How the agents run concurrently

One Mozaik 4.0 runtime, shared RuntimeState, no central scheduler. Agents coordinate only through events and situation handlers. Who runs at the same time: two Solana watchers (Jupiter and Pump.fun), each on its own websocket, emit chain.event items from real mainnet activity. Every non-heartbeat event starts its own Risk Analyst runLoop, so the Analyst often has several inferences in flight. The Briefer, Correlator, and Responder react to the Analyst's model.answer events and run in parallel with it and with each other. Measured live: peak of 3 concurrent inferences, including the Analyst overlapping itself. What state they share: one EnvironmentState with incidents, correlations, the rolling brief, pending approvals, executed actions, an event log, and an inference budget. Each agent writes its own slice and reads the rest. How they coordinate: watchers publish chain.event; the Analyst fires on it; the Briefer, Correlator, and Responder fire on the Analyst's answers, filtered by producer; the Guardrail publishes guardrail.pending and guardrail.decision, which the Briefer reacts to. The Responder's tool call is gated by an InterceptionHandler that waits for the human operator while everything else keeps running. What made it real: a fresh ModelContext per concurrent loop (shared memory would cross-contaminate parallel inferences), an eventId the model must echo so answers correlate to their trigger, and budget reservation inside specifications so simultaneous events cannot double-claim. pnpm proof and pnpm live print peak concurrency and the overlap list.

Comments

No comments yet.

Sign in to like and comment

Newsletter

For developers who want to learn how to build self-organizing agents.

Join our online hackathon