Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.yourhq.ai/llms.txt

Use this file to discover all available pages before exploring further.

HQ uses Supabase tables as durable queues. Everything the UI tells a gateway to do — and everything agents do in the background — flows through these queues.

The two queues

Commands

agent_commands — consumed by the runner. Handles lifecycle and operations: provision, update, remove, provider auth, gateway restart, and pairing approval.

Inbox

agent_inbox_items — consumed by agents. Represents background work from task assignments, comment @-mentions, CRM automation rules, and other workspace events.

How it flows

UI writes rows  →  Daemons lease rows  →  Agents / gateway processes execute  →  Results written back to Supabase
Commands and inbox items are never deleted — they persist as durable history. You can review them from Settings → System.
Both queues use atomic leasing (FOR UPDATE SKIP LOCKED) so parallel daemons on different gateways never steal each other’s work. See Command lifecycle for the full state machine.