Control plane
A Linux server that runs the long-lived services in containers: the Cezar orchestrator, the model gateway, memory, observability and secrets. It is the only place work is scheduled from.
A self-hosted software factory. Issues go in; planned, implemented, reviewed and validated changes come out. Coding agents do the bounded work, deterministic workflows keep them honest, and local models run on our own hardware.
Where this stands. We use it every day, and we change it every day. Parts of it need restructuring before it is something we would ask anyone else to run, so there is no install guide or support yet, and details on this page describe the shape of the system rather than a fixed specification. The code is public if you want to follow along.
Architecture
The Factory is deliberately split so that the machine scheduling work and the machine running models can each be changed, restarted or replaced on their own.
A Linux server that runs the long-lived services in containers: the Cezar orchestrator, the model gateway, memory, observability and secrets. It is the only place work is scheduled from.
A separate machine that does nothing but serve models. Weights and runtime state stay on it, and the control plane reaches it over the trusted LAN through a single OpenAI-compatible endpoint.
Where a person works interactively. Changes made here go through the same branch, review and validation path as changes made by agents.
The orchestrator. It owns runs, worktrees, automations and workflow execution, and can drive several coding agents (Claude Code, Codex and others) side by side. It is an open-source project we build on rather than something we wrote.
Serves local models behind an OpenAI-compatible API. It sits on its own host so inference load never competes with the services that schedule the work.
The gateway in front of every model. Agents ask for a capability and the gateway decides which provider or local model answers, so a model can be swapped without touching a workflow.
Optional semantic memory. It helps agents recall past decisions, but it is never the source of truth: run ledgers and tests remain authoritative, and everything keeps working if memory is offline.
Tracing, metrics and dashboards. Each run carries a trace identity so a workflow, its agent steps and its verification can be followed together.
Agents reach tools such as GitHub through one gateway rather than each holding their own credentials. What a given run may use is a narrowing profile, not an open grant.
Secret storage for credentials the services need. Secrets are injected at run time and kept out of prompts, repositories and logs.
The Factory repository itself holds the workflows, skills, policies, automations and the deployment definitions. It is mounted into Cezar as the shared source of all of them, so projects do not need their own copy.
Workflows
Every issue follows the same path, and each hand-off is a label that an automation is listening for. The exact states and rules are policy, so they can change without rewriting the pipeline.
An issue arrives and is classified by type and risk.
A plan is written and sized. Unclear plans go back, not forward.
An agent works in an isolated worktree and opens a PR.
An independent review, or a structured self-review when working solo.
Only after local validation has passed.
The host validates, canaries, then advances stable.
Work moves through GitHub issue labels. A lifecycle label routes an issue to an automation, which starts a named workflow. Ordinary edits do nothing.
A workflow is an ordered list of steps defined in YAML. Command steps run deterministic scripts; skill steps hand a bounded task to an agent. Agents are never asked to run the plumbing, and never set lifecycle labels themselves.
States, owners, legal transitions and deadlines live in a policy file rather than being scattered through scripts. A project can change its process, for example adding a manual sign-off for risky work, by selecting a profile.
Event triggers fire once and can be missed. A periodic sweep checks that every open issue is in exactly one state, that the state has an owner, and that it has not sat there too long.
Whoever opens a PR carries it to merge: integrating the latest dev, resolving conflicts and re-validating. A PR is not done when it is opened.
Each stage has a skill: planning, implementing, reviewing, fixing, investigating. They live in the repository, are shared across projects, and a project can override one where it needs to.
Models
Not every task needs the biggest model, and not every task should leave the building. Routing decides, and the decision is recorded.
Tasks can name a capability tier. A deterministic router then picks an eligible model and account based on features, quality, locality and current capacity. The same inputs always give the same decision.
Hosted subscription agents handle the work that needs them. Local vLLM models take utility jobs and experiments, with the aim of shifting more work local as they prove themselves.
Quota and concurrency are tracked per account. If nothing is available a task is deferred, and a pinned task never silently downgrades to a different model.
Workflows probe the model endpoint before spending a run on it, so an unreachable or overloaded host shows up as a clear failure instead of a long timeout.
Delivery
The path from a merged change to a running one is owned by the host, not by whoever happens to be working that day.
There is no hosted CI. A local test suite, a pre-commit hook and receipts from the host's own runs are the evidence for a merge.
Changes are written on Windows and run on Linux. Validation is therefore repeated on the host, in a container, before a change is merged, so the first Linux run is never the production one.
After a merge to dev, a single host timer validates the exact commit, activates a development channel, runs canary jobs against it, and only then advances stable. A failed canary rolls back and quarantines the commit.
The release posture is configuration. The default trusts self-review plus passing validation; a stricter mode adds independent approval and a soak period.
Principles
These are the ideas that survive the restructuring. The implementation underneath them is the part that keeps moving.
Before opening this up we plan to stabilise the core loop, make the process configurable per project, and write a proper getting-started guide. Until then, treat everything here as a work in progress. The source is at github.com/bin0110001/cezar-factory, and it builds on the open-source Cezar orchestrator.
← Back to all projects