kdo documentation
Introduction
kdo finds projects in a monorepo, caps how much context an agent reads, and serves that over MCP.
kdo is a workspace runtime for coding agents.
The problem
A coding agent that opens a monorepo by walking the tree reads files the task never needed. The same tool call, repeated, keeps spending tokens. Turbo, Nx, Bun, and pnpm do not answer “what should this agent read?”
What kdo does
It finds the projects, writes a short context file for each one, and serves that over MCP with a token budget. Repeated identical tool calls return an error. A spec can also run in a git worktree: plan, implement, test, review, then merge if your checkout is clean.
How it works
- Finds projects from
Cargo.toml,package.json,pyproject.toml,Anchor.toml, andgo.mod. One graph, cached under.kdo/. - Writes context.
kdo context <project> --budget Nkeeps the summary and public signatures inside that budget. Tree-sitter extracts signatures. - Runs tasks from
kdo.toml.depends_oncan betask,^task(upstream first), or//task(whole workspace first). - Serves MCP.
kdo_list_projects,kdo_get_context,kdo_read_symbol,kdo_dep_graph,kdo_affected,kdo_search_code,kdo_run_task, plus cached context resources.kdo setup claudeandkdo setup openclawwrite the client config. Other clients use--agent generic. - Stops repeat calls. OpenClaw: 3 identical calls. Other profiles: 5. The server returns a structured error.
- Runs a spec.
kdo apply -f spec.yamlandkdo factory daemon. Agents write under.kdo/worktrees/. Your API key stays in the environment or~/.kdo/credentials.toml.
What kdo is not
- Not a package manager. It does not install dependencies or own the lockfile. Use Cargo, pnpm, or bun for that.
- Not 1.0. Current release is
0.3.0-alpha.1. Commands can still change. The factory’s tested path in CI uses the mock provider, not a live model.
Where kdo sits
| kdo | turbo | nx | bun | pnpm | |
|---|---|---|---|---|---|
| Polyglot graph | ● | ○ | ◐ | ○ | ○ |
| MCP built-in | ● | ○ | ○ | ○ | ○ |
| Token-budgeted context | ● | ○ | ○ | ○ | ○ |
| Loop guards for agents | ● | ○ | ○ | ○ | ○ |
| Task pipelines | ● | ◐ | ● | ○ | ○ |
| Per-project overrides | ● | ● | ● | ○ | ○ |
| Single static binary | ● | ○ | ○ | ● | ○ |
| Package install / lockfile | ○ | ○ | ○ | ● | ● |
● full · ◐ partial · ○ not supported
Next steps
- Getting started: install,
kdo init, first run,kdo setup <agent> - CLI reference: every command with flags
- kdo.toml schema: the config format
- MCP server: tools, resources, agent profiles, loop guards