Skip to content

feat(providers): add a Kilo example provider profile #5630

Open

Description

@DenisDupeyron

User Story

I work at Anaconda, which owns Kilo, the open-source coding agent CLI this proposal is about. I'd like Kilo to become one of the agents OpenShell supports, starting with the example profile proposed here. To write it, I ran Kilo in OpenShell myself and reviewed every connection the sandbox denied, and the findings below come from those runs.

Problem Statement

OpenShell ships example profiles for Claude Code, Codex, GitHub Copilot, Cursor and OpenCode, whose profile is openrouter.yaml, and none for Kilo. Kilo's default model service is the Kilo Gateway at ai-gateway.kilo.ai, with account lookups at api.kilo.ai, and no example profile covers either host, and nothing in the repository says which other hosts Kilo contacts or how Kilo's own sandbox behaves inside an OpenShell sandbox.

Impact / Why This Matters

Without an example, an operator writes a Kilo profile by trial and error from the denials OpenShell records, as I did to find the hosts below. Besides the two gateway hosts, two of them receive KILO_API_KEY when a policy allows them:

Host Kilo's use Receives the key
api.kilo.ai Kilo Gateway, account lookups yes
ai-gateway.kilo.ai Kilo Gateway, inference and model list yes
us.i.posthog.com CLI telemetry no
models.dev model catalog, Kilo falls back to a bundled copy no
ingest.kilosessions.ai cloud session upload yes
events.kiloapps.io presence service, seen in the stock image's interactive interface yes

The less obvious failure comes from Kilo's own sandbox. It uses bubblewrap, which cannot create its namespaces under OpenShell's seccomp filter. Kilo leaves it off by default, but when a project's kilo.jsonc turns it on, tool calls fail with bubblewrap errors, and kilo run still exited 0 in both of my runs, which recorded 100 and 82 of them while the test failed. In a script, the run looks successful.

Proposed Design

Operators would import and use providers/kilo.yaml like the existing example profiles:

openshell provider profile lint   -f providers/kilo.yaml
openshell provider profile import -f providers/kilo.yaml --global
openshell provider create --name kilo --type kilo --from-existing
openshell sandbox create --provider kilo \
  --from ghcr.io/kilo-org/kilocode:latest-openshell -- \
  kilo run --model kilo/nvidia/nemotron-3.5-lightning:free 'reply with OK'

The profile declares KILO_API_KEY as a bearer credential, allows api.kilo.ai, ai-gateway.kilo.ai and the telemetry host with L7 enforcement, and limits all three to /usr/local/bin/kilo, the path in the published images. Its header follows the standard block and adds what the problem statement describes: the hosts the profile leaves blocked, and the published ghcr.io/kilo-org/kilocode:latest-openshell image, which keeps Kilo's own sandbox off whatever a project says and stops Kilo from trying the blocked hosts. The header also says that the image's environment reaches the sandbox's main command only, and how to get the same behavior with another image through /etc/kilo/kilo.json and the Kilo settings. Following #3904 and #3906, the change adds the YAML file and its entry in the profile listing test, with no docs or telemetry change.

Acceptance Criteria

  • openshell provider profile lint -f providers/kilo.yaml passes, and the file imports at platform scope.
  • The header's smoke test replies OK with the published ghcr.io/kilo-org/kilocode:latest-openshell image, and Kilo's model calls go through the profile's endpoints.
  • Inside the sandbox, KILO_API_KEY holds an OpenShell placeholder, and no environment variable holds the real key.
  • The header names the Kilo hosts the profile leaves blocked and how to keep Kilo's own sandbox off and the published image that keeps it off.
  • The tests that load the example profiles pass with the new file.

Alternatives Considered

  • The existing openrouter profile. Kilo supports OpenRouter directly, so an operator can copy openrouter.yaml and change binaries to /usr/local/bin/kilo. Such a copy serves OpenRouter users only. Kilo Gateway users still need a profile for api.kilo.ai and ai-gateway.kilo.ai, and the copy would say nothing about Kilo's other hosts or its sandbox.
  • A tutorial like Run Pi with OpenRouter. It would reach more readers, but Remove the inference provider table and provider profile telemetry buckets #3906 keeps contributed profiles to the YAML, so the operator notes go in the header. A tutorial can follow if maintainers want one.
  • Middleware or an interceptor. The need is a credential bound to Kilo's endpoints and binary, which is what a provider profile does, so neither applies.

Agent Investigation

I used a coding agent to script and record the runs, and checked the results myself.

  • Kilo 7.8.27 reads KILO_API_KEY and sends it as a bearer token, and the published image installs the CLI at /usr/local/bin/kilo. With the profile attached, the sandbox sees openshell:resolve:env:v<digits>_KILO_API_KEY, and no environment variable holds the real key.
  • In OpenShell 0.1.8, the seccomp filter returns EPERM for unshare and clone with CLONE_NEWUSER, returns ENOSYS for clone3, and blocks mount, pivot_root, umount2 and setns. With Kilo's sandbox on, two runs recorded 100 and 82 bubblewrap errors, the test failed in both, and kilo run exited 0 both times.
  • Kilo loads /etc/kilo/kilo.json after project configuration, so a project cannot override {"sandbox": {"enabled": false}} there. With that file in a derived image, Kilo completed the task with the project's kilo.jsonc turning its sandbox on.
  • KILO_DISABLE_MODELS_FETCH=1, KILO_DISABLE_SESSION_INGEST=1, KILO_DISABLE_PRESENCE=1 and KILO_TELEMETRY_LEVEL=off left no denied connection in the sandbox log, and with KILO_DISABLE_PRESENCE=1 the interactive interface made no presence attempt.

Checklist

  • I've reviewed existing issues and the published docs
  • This is a design proposal, not a "please build this" request

Activity

  1. purp commented on Nov 17, 2026

    @purp
    Collaborator

    📋 triage-agent

    Assessment: technically valid and well evidenced; awaiting maintainer disposition.

    What I checked:

    • No Kilo profile exists on main. providers/ has openrouter.yaml, openai.yaml, copilot.yaml, cursor.yaml and others, and no open or closed issue or PR covers Kilo. feat(providers): add a Vercel AI Gateway example profile (fx) #4440 (Vercel AI Gateway profile) is the same kind of request and is accepted, so there is precedent for single-YAML example profiles.
    • The User Story attests first-hand use, and the findings come from the author's own runs in OpenShell. The extension alternatives (middleware, interceptor, existing openrouter profile) are addressed, and the reasoning holds: the need is a credential bound to specific hosts and one binary, which is what a profile does.
    • The proposed shape (one bearer credential, L7-enforced endpoints, binaries: [/usr/local/bin/kilo], header with smoke test) matches openrouter.yaml and the contribution rules in providers/README.md.
    • The seccomp claim is consistent with the code. crates/openshell-sandbox/src/sandbox/linux/seccomp.rs blocks unshare and clone with CLONE_NEWUSER and blocks clone3, so bubblewrap would fail inside a sandbox.

    Not verified:

    • I did not run Kilo, the published ghcr.io/kilo-org/kilocode:latest-openshell image, or the profile, so acceptance criteria 2 and 3 are unconfirmed.
    • Whether kilo run exiting 0 with failed tool calls is a Kilo behavior rather than anything OpenShell can change. It looks like the former, so the header note is the right place for it.

    Notes for the PR:

    • openshell provider create --type kilo --from-existing needs the profile imported first, as the proposed commands order it.
    • Confirm the telemetry host (us.i.posthog.com) belongs in the allowed endpoints. The table says it does not receive the key, and the header should say why it is allowed while the other non-key hosts are blocked.
    • Per Remove the inference provider table and provider profile telemetry buckets #3906, the change should be the YAML plus the profile listing test entry only.

    Next human decision: a maintainer decides whether to mark this state:accepted. I left state:triage-needed in place because the state:validated label has no description, so I could not confirm its meaning. Area/topic labels are deferred until acceptance.

  2. added
    state:acceptedA maintainer decided OpenShell should pursue this issue
    area:runtimeSandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle.
    topic:authnzAuthentication, authorization, identity, sessions, credential protection, and policy integrity.
    and removed
    state:triage-neededOpened without agent diagnostics and needs triage
    topic:authnzAuthentication, authorization, identity, sessions, credential protection, and policy integrity.
    on Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:runtimeSandbox execution, isolation, supervision, policy enforcement, networking, and provider lifecycle.state:acceptedA maintainer decided OpenShell should pursue this issue

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions