A geometric red cardinal singing at dawn

The agentic fabric · mechanism

What keeps the ring turning.

For: developers and operators

The agents don't run themselves. A small, always-on Ticker fires the recurring routines on a schedule; a set of leases makes sure only one of each runs at a time; and a local message bus wakes a sleeping agent the moment it has mail. This page is the mechanism — the clockwork. For why the agents coordinate the way they do, see Workflow.

One Ticker, always on Single-flight leases Wake-on-message
⏱️
The Ticker

The heartbeat

The Ticker is an always-on session whose only job is to fire the recurring routines on their own schedule for as long as the machine is awake. It does no engagement work itself — it just keeps time. It is honest about the sleep gap: because every routine tracks its own progress, a machine that sleeps causes latency, not lost work — the next tick simply picks up where the last left off.

Awake-only, by design. The Ticker runs while the operator's machine is on. There is no hidden cloud cron firing things in the background — the schedule lives with the host, which keeps the whole system inspectable and under the operator's control.

Ring-tick — the routine it fires

The recurring work is bundled into a routine called ring-tick, which has two halves. A frequent core tick does the housekeeping — draining queues, classifying and grouping inbound conversations, rolling up cost, running scheduled reports, and raising alarms. A less frequent scout sweep runs the scouts to harvest new signal. Each step is bounded and idempotent: it does a little, records it, and yields.

flowchart TB
  TICK(["⏰ The Ticker
always-on session"]):::ticker subgraph routines ["🔁   Ring-tick — two halves   (bounded · idempotent · yield-each-step)"] direction LR CORE["🛠️ Core tick
every few minutes

· drain publish queue
· classify conversations
· cost rollup
· chain alarm
· daily brief · 07:00 + 17:00"]:::core SWEEP["🔭 Scout sweep
every 15–30 min

· signal scout
· backlog sentinel
· pipeline watcher
· comms harvest
· intake triage
· reuse scout"]:::sweep end TICK == fires ==> CORE TICK == fires ==> SWEEP style routines fill:#fcfbf8,stroke:#b1b1b1,stroke-dasharray:4 4 classDef ticker fill:#fef3c7,stroke:#d97706,stroke-width:3px,color:#78350f classDef core fill:#fce4ec,stroke:#b11f4b,stroke-width:2px,color:#7a1132 classDef sweep fill:#dcfce7,stroke:#16a34a,stroke-width:2px,color:#14532d

Leases — one of each at a time

The danger with a recurring routine is overlap: two ticks running the same step at once, doubling work or racing on the same rows. Cardinal prevents this with leases. Before a step runs, it acquires a named lease with a unique holder token; if it can't, another holder already has it and this run stands down. The lease is released in a guaranteed cleanup step, even on failure.

What a lease guarantees

  • Single-flight — only one holder runs a given step at a time
  • A unique token per holder, so a stale holder can't reclaim it
  • Release in a finally — no lease is held forever
  • Time-to-live expiry — a crashed holder's lease frees itself

Why it matters

The audit spine is append-only and the write-path is idempotent, but leases stop the system from trying to do the same work twice in the first place. They are how a single-machine system stays consistent under a recurring clock.

The message bus — wake on mail

Agents coordinate mostly through the database, but when one genuinely needs to hand something to another, it uses a local, Postgres-backed message bus. Each agent registers itself, runs a small listener, and ends its turn. When a message arrives for it, the listener exits and the host wakes the agent for a fresh turn — so a sleeping agent responds without a human nudging it.

How a wake works

  • An agent registers and spawns its listener, then ends its turn
  • A peer sends it a message; the bus notifies the listener
  • The listener exits; the host starts a new turn for the agent
  • The agent drains its inbox, acts, respawns its listener, ends the turn

Addressing

A message can be addressed to a specific session, to a friendly handle, or to a role — which resolves to whoever currently holds that role's seat. Senders express intent ("ask the architect"); the bus resolves identity. If a seat is empty, the message waits and is delivered when the seat is filled.

Cadence is a posture, not a default

Whether the recurring cadence runs at all is an operator decision. The cadence can be held — run on-demand only — while the focus is elsewhere, and the scouts each stay dark until explicitly enabled. Nothing fires customer-facing work on a timer without the operator having turned that cadence on. The clockwork exists; whether it ticks is a choice.

Honest status. A recurring schedule being possible is not the same as it running. Throughout these docs, "the Ticker fires X" describes the mechanism — the operator decides whether that mechanism is live for a given engagement.

Why the agents coordinate this way → · The scouts it sweeps →