kōjō documentation
kōjō (工場, “factory”) is a software factory you run yourself. Its agents build features, fix bugs, review pull requests and audit security end to end, when someone asks or on a schedule. It is one Go binary plus Postgres. It runs in your infrastructure, with the model provider you choose.
Start
The quick start goes from nothing to a first session on one of your repositories: install the binary, start kōjō on one machine, connect GitHub, ask for a piece of work and read the draft pull request. Install is the full reference, with Kubernetes, GitLab, Forgejo and Slack.
To look at kōjō without an account or a model key, run the local development stack: a throwaway forge with a demo repository, and recorded model answers.
What it does
- A request arrives: a mention of the bot on an issue or pull request, a Slack message,
kojo run, an MCP client, or a schedule. - kōjō decides whether the author may trigger work and whether that work may change code.
- A session is queued in Postgres. A worker claims it and runs the orchestrator.
- The orchestrator delegates to skills. Each skill runs as a subagent with its own tools, against a sandbox that holds a clone of the repository.
- A goal critic checks each result against the skill’s
goals.yaml: commands that must pass, limits on the diff, and a rubric. A result that falls short goes back with the reasons. - If the work changed code, the merge policy decides how to publish it. The default is a draft pull request.
Concepts describes each step, the session states and the limits that apply.
What makes it different
| Property | How |
|---|---|
| It runs in your infrastructure | One binary, kojo, is the server, the egress proxy and the CLI. State is in Postgres. See Deploy. |
| Any model | Skills name a tier, not a model. You map the tiers (fast and strong are required) to models of Anthropic, OpenAI, Google AI, OpenRouter or Ollama, or to an OpenAI-compatible gateway. See Models. |
| Credentials stay out of the sandbox | The core holds the tokens and never runs repository code. Sandboxes run the code, see placeholders, and reach the network only through a proxy with an allowlist. The proxy sets a forge credential only on requests that read. See Security. |
| “Done” is code | A skill is three files in .factory/skills/<name>/: instructions, acceptance criteria and sandbox requirements. See Skills. |
| Draft pull requests by default | Asking a human or merging low-risk changes are modes you opt into. See Merge policy. |
| Sessions can be replayed and are costed | Model turns, tool calls, sandbox commands and critic verdicts are stored as steps, with tokens and cost. See Observability. |
| Changes without a redeploy | Models, budgets, policies, repositories, roles, schedules and skills are versioned config with rollback. See Managing kōjō. |
Where things are
Start
- Quick start: from nothing to a first session on your repository.
- Install: Compose on one VM, Helm, or the binary, then the first run.
- Concepts: requests, sessions, the orchestrator, subagents, the goal critic, the trust boundary.
Skills
- Skills: the
.factory/layout and how skills resolve; the filesSKILL.md,goals.yamlandkit.yaml; reference repositories and a worked example. - Built-in skills: the fourteen skills in the binary, for changing code, reviews and audits and scheduled upkeep.
- Schedules:
schedules.yaml, the cron syntax, schedules proposed in words. - Evals:
kojo eval, fixtures, evals from your own history, the activation gate.
Configure
- kojo.yaml reference: every key of the deployment config, generated from the Go structs.
- Models: tiers, providers, budgets, prices, the replay provider.
- Sandboxes: choosing a driver by where sandboxes run: sbx on one machine, k8s on Kubernetes, e2b at a sandbox service, docker and fake for development; and kojo-proxy, egress allowlists and credential injection.
- Surfaces: code platforms (GitHub, GitLab, Forgejo), chat platforms (Slack, Mattermost, Discord, Microsoft Teams), issue trackers (Linear, Jira, Asana), error tracking (Sentry, Datadog) and tools (the CLI, MCP), and who may trigger what.
- Merge policy: the modes, the risk score, auto-merge, approvals.
- Products in several repositories: linked repositories, changed together, one pull request each.
- Campaigns: one task across many repositories, a session each, at a bounded pace and cost, with a pilot first.
- Managing kōjō: what changes after the first deployment, roles, revisions and rollback. Then one page per tool: the dashboard with screenshots, the CLI, git, MCP, the HTTP API, and the config objects key by key.
Operate
- Deploy: a single VM with Compose or Kubernetes with Helm; several replicas, upgrades, secrets.
- CLI reference: every command and flag.
- Observability: traces, logs, session replay, cost; with metrics and the audit log.
- Security: the model, its caveats, what
kojo doctorchecks.
Project
- Development: building, the repository, releases; with the local stacks and testing.
- Contributing: how to propose a change.
Schemas and machine-readable docs
The JSON Schemas of the files kōjō reads are published with this site. kojo schema prints the same documents.
| Schema | Describes |
|---|---|
| kojo.schema.json | kojo.yaml, the deployment config |
| skill.schema.json | The front matter of a SKILL.md |
| goals.schema.json | goals.yaml |
| kit.schema.json | kit.yaml |
| factory.schema.json | .factory/factory.yaml |
| schedules.schema.json | .factory/schedules.yaml |
| config-export.schema.json | The file kojo config export writes |
For coding agents, llms.txt is an index of these pages and llms-full.txt is all of them in one Markdown file.