ScaiQueue
ScaiQueue is the messaging primitive on top of ScaiGrid. You publish typed messages to queues, consumers claim and process them, and a built-in routing engine pushes matching messages between queues so you can build multi-stage pipelines without writing the plumbing yourself.
It is a ScaiGrid module: the same tenants, the same API keys, the same accounting and audit story as every other surface. There is no separate broker to deploy.
When to use it#
- You need agent-to-agent coordination — one agent publishes work, others claim and complete it.
- You need a human-in-the-loop step inside an otherwise automated pipeline.
- You want fan-out from one event to several consumers, each tracked independently.
- You want a built-in dead-letter queue, retry policy, and visibility-timeout enforcement, and you don't want to operate Redis Streams or RabbitMQ yourself.
If you just need a webhook to fire after one event, you don't need ScaiQueue — ScaiGrid's webhooks are simpler. Reach for ScaiQueue when you have stages, retries, ordering, or a HITL hand-off.
What you get#
- Scopes and queues. A scope is a namespace; queues live inside it. Each scope is auto-seeded with system queues (
_dead_letter,_events,_audit,_integrity,_corrections). - Four ordering modes per queue. FIFO, priority, deadline, or broadcast.
- At-least-once delivery. Visibility timeouts reclaim crashed consumers; retries up to
max_retries; then dead-letter. - HITL specs. Messages can carry a rendering spec describing what a reviewer sees and what they must decide.
- Routing engine. Rules with conditions and actions; first-match wins; circuit-breaker prevents loops.
- Streams. Chunked sequences (for long generations) with an assembler.
- Subscriptions, ACLs, scope grants, cross-scope trust, message schemas, HITL pattern registry, GDPR erasure, audit log.
Two-minute mental model#
You manage three nouns and a verb. A scope is a namespace. A queue is an ordered channel inside a scope. A message is a typed payload that travels through queues. The verb is publish — and on the consumer side, claim, complete, fail, release, or extend.
System agents (visibility-timeout enforcer, expiry enforcer, archiver, dead-letter monitor, priority-aging worker) do the housekeeping in the background. You don't run them; they're part of ScaiGrid.
Where to go next#
- Quickstart — scope, queue, publish, claim, complete in five minutes.
- Architecture — how publish, claim, route, and reclaim fit together.
- Topics, types, and HITL specs — what makes a queue a typed channel.
- Build a pipeline with routing — multi-stage flow with routing rules.
- Add a human review step — HITL messages end-to-end.
- API reference — every endpoint, request, response.
ScaiQueue's module ID inside ScaiGrid is scaiqueue; its API is mounted at /v1/modules/scaiqueue/.