AnyAgent

Kilo Code

Use the Kilo CLI through AnyAgent: what you can ask for, how it behaves, and the endpoint underneath.

The kilo-code adapter drives the Kilo CLI over ACP (kilo acp); import kiloCode from anyagent-js/kilo-code. Kilo’s CLI is an opencode fork with the identical endpoint, so this adapter shares its implementation with the opencode adapter. Kilo is bring-your-own-key (BYOK) with standard provider env vars, or works through a Kilo account (kilo auth login); neither changes a channel here.

What you can ask for

model (as "provider/model"), effort, readOnly, resume, forkSession, attachments, and mcp work on the endpoint’s own channels; systemPrompt and schema are provided by AnyAgent. models() runs kilo models, every printed provider/model id valid verbatim as model; authStatus() reads ~/.local/share/kilo/auth.json plus the provider key env vars, a hint rather than a guarantee. The full grid is on the support matrix.

Good to know

  • Detection looks for kilo, then kilocode, on PATH; the first found wins.
  • Every turn runs on a live connection, so sessions steer; the session id lands on result.sessionId and is what resume takes back.
  • effort is set after model, because kilo scopes the levels it accepts to the session’s current model and refuses any other.
  • readOnly: true rests on two mechanisms at once: the session switches into plan mode, which covers edits, and every permission request for a tool that is not reading is denied, which covers the rest.
  • mcp servers are added to whatever the machine already configures rather than replacing them, each under the name you key it by.

Under the hood

Every session launches kilo acp and configures it over the protocol; the prompt travels as a content block. Run options become:

OptionChannel
modelconfig option model, as "provider/model"
effortconfig option effort, applied after model
cwdthe cwd of the new session, and of the endpoint process
readOnly: trueconfig option mode: "plan", plus a denial of every permission request for a tool that could change the machine
resumesession/load with the session id
forkSession: truesession/fork with the session id, branching instead of continuing
attachmentsa resource_link block per file, beside the prompt text
mcpmcpServers on session/new, per command or url

On this page