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

  1. 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.
  2. kōjō decides whether the author may trigger work and whether that work may change code.
  3. A session is queued in Postgres. A worker claims it and runs the orchestrator.
  4. 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.
  5. 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.
  6. 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

Configure

Operate

Project

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.

Scroll to move. + - zoom, 0 fit, Esc close.100%