headgate
Open source. Built for the whole fleet.

Background jobs.
Fleet-wide control.

Shared rate limits. Fair tenants. Workers in sync.
Background jobs for Go and Rust, on the database you already use.

Apache 2.0+Self-hosted+Go & Rust
Long-running agents. One shared gate.
INTERACTIVE SIMULATION
01 / QUEUED AGENT RUNS
Acme4 queued
2 admitted2 waiting
Orbit4 queued
2 admitted2 waiting
Nova4 queued
2 admitted2 waiting
headgateOne atomic decision.
Agent start rate
Tenant fairness
Concurrency cap
6 agent runs admitted
02 / YOUR WORKER FLEET
worker-01Planning research
worker-02Planning research
worker-03Planning research
6 agents running0 slots available
Admitted jobs Waiting for admissionAgent elapsed: 00:00 · simulated
Workers3
Agent runs hold their slots while they research, synthesize, and save results. Every job starts under the same fleet policy.
Time-compressed simulation: 12-minute agent runs, with 2 minutes per tick. Controls restart the scenario. Limits apply to job starts, not model tokens.
YOUR STORE. YOUR INFRASTRUCTURE.
PostgreSQL
MySQL
Redis
01 — ADMISSION, NOT JUST DEQUEUE

One fleet.
One set of rules.

Every worker asks the same question: “What am I allowed to run?” Headgate evaluates your policies atomically inside the store, in the same operation that claims the job.

Limits that stay shared.

Add workers without multiplying your rate budget. Concurrency and rate limits apply across the entire fleet.

Explore fleet policies

A fair turn for every tenant.

A busy tenant shouldn’t drown out everyone else. Quiet tenants get service, and spare capacity stays useful.

Understand admission

Bad jobs stop spreading.

Correlate repeated crashes by payload fingerprint. Quarantine troublesome work before it keeps taking down workers.

See quarantine controls
02 — WRITE THE JOB. WE’LL COORDINATE.

Your language.
Your kind of job.

A research agent that runs for minutes. A multi-step analysis. Define a typed handler and let Headgate coordinate execution across your fleet.

  • First-class Go and Rust SDKs
  • Shared wire format and conformance suite
  • Install only the backend you need
Run your first job
01

Define your job.

Give your agent a typed payload and a stable job kind.

type ResearchAgent struct {
    Question string `json:"question"`
}

func (ResearchAgent) Kind() string {
    return "agent:research"
}
Integration fragment · see full setup below.Full setup
02

Bring your agent logic.

Register a handler. Your application supplies the research logic.

registry := headgate.NewRegistry()
err := headgate.RegisterFunc[ResearchAgent](registry,
    func(ctx context.Context,
        job *headgate.Job[ResearchAgent]) error {
        return runResearchAgent(ctx, job.Args.Question)
    },
)
if err != nil {
    return err
}
Integration fragment · see full setup below.Full setup
03

Send it to the fleet.

Enqueue through the client. Workers claim under shared policies.

payload, err := json.Marshal(ResearchAgent{
    Question: "What changed in our market?",
})
if err != nil {
    return err
}
client := headgate.NewClient(store)
return client.Enqueue(ctx, []headgate.Envelope{{
    ID: jobID, Kind: ResearchAgent{}.Kind(),
    SchemaVersion: 1, Payload: payload,
    Queue: "research", PartitionKey: "tenant-a",
    MaxAttempts: 3, RetentionMs: 86_400_000,
}})
Integration fragment · see full setup below.Full setup

Fragments assume an initialized store, a running worker, and a unique job ID. Your application supplies its model and tool calls.

AGENT SKILL

Your coding agent, up to speed.

Give your coding agent Headgate-specific guidance for producers, workers, resumable steps, and workflows. Includes Go and Rust references and operational troubleshooting.

Explore the skill
Add to your agent’s toolkit
npx skills add Mujhtech/headgate

Install with the Skills CLI in your project.

03 — ROOM FOR THE COMPLEX PARTS

Start with a job.
Keep building.

Research that takes minutes. Agent runs that span hours. Explore the mechanics that keep the work moving.

See the full feature index
04 — SEE WHAT’S REALLY HAPPENING

“Why isn’t this
job running?”

A question your queue should answer. Inspect admission decisions, follow workflows, and manage your fleet from the embedded console.

Meet the operations console
Embedded in your Go or Rust binary.
headgate / operations
Headgate operations console showing a workflow graph, job states, and workflow controls
GUARANTEES WITH SOMETHING BEHIND THEM

Trust is built.
Then tested.

Two languages. Three stores. One shared behavioral contract. Headgate’s conformance suite exercises admission, lifecycle, and cross-language behavior against real backends.

Explore the verification suite
SUPPORTERS

Help build what’s next.

Headgate is early, open source, and looking for its first supporters. Help us keep building reliable background jobs.

Get involved on GitHub
Your logo could be hereA place for our first supporter.

Your next job starts here.

Pick your language. Bring your database. Let’s get to work.

Get started with Headgate Early public release. Your feedback shapes what comes next.