Janus is a durable agent task broker. It sits between agents and reliably delivers tasks with governance, routing, and observability.
The fundamental unit of work. A task carries an opaque payload (the envelope) from a source agent to a target consumer. Every task has a unique ID, a tenant scope, and a lifecycle state:
pending → claimed → in_progress → completed
→ failed
→ nacked → pending (retry)
→ dlq
A named queue where tasks are delivered. Agents pull tasks from a mailbox they own. Mailboxes are durable — if an agent crashes, tasks remain until the agent comes back and pulls them.
Key properties:
When an agent pulls a task, it receives a time-bound lease. The lease prevents other agents from claiming the same task. If the agent crashes without ACKing:
pending and becomes available for another agent to pullThe payload wrapper. Contains:
type — message type identifierpayload — the actual data (structured JSON)priority — high / normal / lowcontext_refs — references to shared artifacts (files, images, previous results)Janus supports two dispatch modes:
The Intent Resolver accepts natural language descriptions and matches them to registered agent capabilities:
client.resolve_intent("Review a Go pull request for race conditions")
# → Confidence: 0.92
# → Matched capability: "go-code-review"
# → Suggested target: "review-mb"
Every task dispatch passes through policy and budget checks:
Janus speaks multiple agent communication protocols natively:
Tasks are dual-written to PostgreSQL (source of truth) and NATS JetStream (fast delivery). If the broker process crashes mid-flight:
Every task, mailbox, and artifact is scoped to a tenant. Cross-tenant access is automatically denied. All audit events are tagged with tenant ID.