- ›
/queue— durable work queues for agents, backed by managed Amazon SQS, from a single CLI call or API request - ›
Standard or FIFO— best-effort at-least-once, or exactly-once ordered delivery, with an optional dead-letter queue - ›
Producer/consumer in four verbs— send, receive (long-poll), ack, and inspect depth - ›
Per-tenant isolation— one queue per resource, namespaced and tagged, with an access policy locked to the tenant's compute role - ›
Pairs with /compute— a worker long-polls the queue for a cheap autoscaling pipeline - ›
No AWS account— Naïve owns the credentials; your agents never hold a cloud key
Today we're launching /queue — durable work queues for your agents. Managed Amazon SQS behind one bearer token: standard or FIFO, dead-letter queues, producer/consumer fan-out, buffering, and retries. The piece that turns a pile of compute workers into a real pipeline.
The problem: agents need to decouple work
The moment an agent does more than one thing at a time, it needs a queue. Something has to:
- Buffer bursts so a spike of work doesn't overwhelm a worker.
- Fan out tasks to multiple consumers and retry the ones that fail.
- Decouple a producer (an API handler, a webhook, a scheduler) from a consumer (a worker that takes seconds or minutes per item).
Doing that yourself means an AWS account, IAM policies, queue configuration, and dead-letter wiring — infrastructure work that has nothing to do with the agent's actual job.
How /queue works
You create a queue; Naïve owns the SQS account and credentials. The model is four verbs:
# Create a queue (standard by default; --fifo for ordered, --dlq for a dead-letter queue)
naive queue create --name jobs
# Producer: enqueue work
naive queue send <id> '{"task":"resize","url":"https://..."}'
# Consumer: long-poll, then acknowledge once processed
naive queue receive <id> --wait 20
naive queue ack <id> <receiptHandle>
# Inspect depth / in-flight
naive queue attributes <id>receive long-polls and returns each message with a receipt handle; you ack that handle once the work is done. Anything you don't ack reappears after the visibility timeout — at-least-once delivery with automatic retries. For FIFO queues, pass a group_id on send for exactly-once, strictly-ordered processing within that group.
API: producer and consumer
// Producer
await fetch(`https://api.usenaive.ai/v1/queue/${queueId}/messages`, {
method: "POST",
headers: { Authorization: `Bearer ${process.env.NAIVE_API_KEY}`, "Content-Type": "application/json" },
body: JSON.stringify({ body: JSON.stringify({ task: "resize", url }) }),
});
// Consumer
const { messages } = await fetch(
`https://api.usenaive.ai/v1/queue/${queueId}/messages?max=10&wait=20`,
{ headers: { Authorization: `Bearer ${process.env.NAIVE_API_KEY}` } },
).then((r) => r.json());
for (const m of messages) {
// ...process m.body...
await fetch(
`https://api.usenaive.ai/v1/queue/${queueId}/messages?receipt_handle=${encodeURIComponent(m.receipt_handle)}`,
{ method: "DELETE", headers: { Authorization: `Bearer ${process.env.NAIVE_API_KEY}` } },
);
}The worker pattern: /queue + /compute
This is why both primitives exist. Pair a queue with a compute service that loops on it:
naive queue create --name jobs
naive compute create --name worker --type service --image me/worker:latest
# the worker loops: naive queue receive → process → naive queue ackCombined with compute's scale-to-zero and the queue's depth, that's a cheap autoscaling pipeline — fan work out to consumers, retry failures, drain the backlog, and pay only while workers run.
Per-tenant isolation
Each queue is a managed SQS queue named and tagged per tenant, with an access policy scoped to that tenant's compute task role — so a tenant's workers can only touch their own queues. Every read/write is ownership-guarded (cross-tenant access returns a 404), and your agents never hold an AWS credential: they call Naïve, and Naïve calls SQS.
What you can build with /queue
Autoscaling work pipelines — a producer enqueues, a fleet of compute workers drains the queue, failures retry, and a dead-letter queue catches the stragglers.
Burst buffering — absorb a spike of webhook events or user actions and process them at a steady rate.
Ordered task streams — FIFO queues for per-user or per-entity ordering where exactly-once matters.
Cross-primitive choreography — one agent enqueues media to render via compute, another posts the result to social.
Get started
Drop this into any coding agent to wire up Naïve:
Read https://usenaive.ai/skill.md and use it to set up Naïve in my project.
- Read the docs: usenaive.ai/docs/getting-started/queue
- CLI reference: usenaive.ai/docs/cli/queue
- API reference: usenaive.ai/docs/api-reference/queue/overview
- Pair it with /compute
- Join the community on Discord
What is /queue?+
What's the difference between standard and FIFO queues?+
How do producers and consumers work?+
How does /queue pair with /compute?+
How are queues isolated and priced?+
How do I get started with /queue?+
Co-founder of Naïve. Previously building the autonomous business stack.
@seandorje