Open source · 2026 - contextq

Local queues for AI agents — named queues with built-in context, FIFO claims, and a durable journal on disk. No daemon, no server.

  • Go
  • CLI
  • AI-assisted development
contextq.longship.dev

Modern CLIs answer to two readers: humans and agents. Once an agent is the one invoking your tool, the shape of its output, its error model, and the protocol it enforces all become first-class design surfaces.

contextq is one small experiment in that direction: a tiny local CLI for coordinating agent work. Named queues carry a required block of agent-facing context, work items are bare string keys, and item pop is the only way to take work — it atomically claims the oldest available item under a per-queue file lock. No daemon, no server, no network. Just files on disk and a small Go binary.

Narrow, predictable, deterministic

Good agent-facing tools give agents structured answers instead of ambiguous prose — keeping context windows focused, response times short, and behavior on a known path. contextq returns one shape every time: --json with stable error codes means the agent branches on a field, not a paragraph.

A small model, deliberately

Three nouns — queue, key, item lifecycle — and five states with five legal transitions. Everything is appended to a per-queue events.jsonl you can inspect with cat and replay to recover state. The CLI rejects races, duplicate work, and invalid state transitions at the boundary, so an agent’s plan can’t drift into shapes the system was never built to handle.

More work

Open source

trellis

Durable intent for AI-assisted codebases — every unit of code gets a sidecar that states its contract, for humans and agents alike.

Open source

mason

Publish to your VPS with one command — deploy static sites and share files to a personal server behind Caddy.

Tell us about your project

The studio

Selle Valley, North Idaho
hello@longship.dev