- Python 49.9%
- TypeScript 42.9%
- JavaScript 3%
- HTML 2.8%
- CSS 1%
- Other 0.4%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
|
|
||
| .forgejo/workflows | ||
| brandkit | ||
| charts/kascoord | ||
| docs | ||
| src/kascoord | ||
| tests | ||
| web | ||
| .dockerignore | ||
| .gitignore | ||
| .python-version | ||
| AGENTS.md | ||
| Dockerfile | ||
| LICENSE | ||
| pyproject.toml | ||
| README.md | ||
| uv.lock | ||
Coding agents, coordinated from your browser
Kascoord gives Claude Code, Codex, and OpenCode a shared web interface on Kubernetes. Start a session against a Git repository, follow the agent's work, and review its changes from your laptop or phone. Switch agents while keeping the same workspace.
Built on kubernetes-sigs/agent-sandbox and the Agent Client Protocol (ACP), Kascoord runs agents inside your cluster using your container images, storage, and model credentials.
What you can do
- Run Claude Code, Codex, or OpenCode. Choose the models, permission modes, and settings such as effort and fast mode that each adapter exposes, approve tool requests, or stop a running turn.
- Start from a repository and optional branch, or open a session in an existing writable Sandbox. Pick a session image and skills before creating a new Sandbox.
- Follow streamed replies and tool activity, queue follow-up messages while the agent works and cancel any before it runs, attach files to prompts, and inspect the workspace diff, including untracked files.
- Switch agents in the same workspace, clear a conversation while keeping its files, and read archived transcripts.
- Monitor Sandboxes across namespaces with live status, pod logs, and quota usage. Suspend, resume, or delete writable Sandboxes; idle sessions automatically release agent connections and suspend Sandboxes created by Kascoord.
Sign in with a password or OIDC, and manage accounts and admin roles on the Users page. All users share access to sessions and workspaces.
The interface supports light and dark themes, mobile layouts, and resizable desktop panes. Global instructions, default agent modes, session images, the idle suspend time, and the git commit author are managed in Settings.
How sessions work
By default, a new session creates a Sandbox named ksc-<id> from a SandboxTemplate you provide. Kascoord clones the repository into /workspace/src, installs the selected skills, and starts the agent through Kubernetes exec. Agent adapters need no listening port.
One agent runs at a time per session. Switching agents keeps the Sandbox and files; the new agent gets a fresh ACP session with a transcript handoff. Workspace volumes survive suspend and resume. Sessions and chat events are stored in SQLite.
Security warning: every signed-in user controls every Sandbox kascoord manages. kascoord talks to the Kubernetes API with
pods/exec, so any user can run commands in the namespaces it manages, read the workspaces and use the credentials mounted into the pods. Only admins can delete Sandboxes or change skills, settings and users. Give accounts only to people you would trust with that access, and serve kascoord over HTTPS (see Signing in). The chart defaults to aClusterIPService with no Ingress or route.
Prerequisites
- Kubernetes with the agent-sandbox controller and its CRDs installed (
Sandbox,SandboxTemplate; v1.0.8 or later foroperatingModesuspend and resume). - A
SandboxTemplatein the sandbox namespace. The chart can render a basic one (see below), or you write your own. - Optional: a sandboxing runtime class such as gVisor or Kata, set as
runtimeClassNamein the template. - A storage class for the 1Gi SQLite volume (the cluster default works).
- Helm 3.8 or later.
Quick install
The container image and the chart come from your own registry; build them from this repo (see Development).
kubectl create namespace kascoord
kubectl -n kascoord create secret generic kascoord-admin --from-literal=password=...
helm install kascoord oci://REGISTRY/OWNER/charts/kascoord \
--namespace kascoord \
--version VERSION \
--set image.repository=REGISTRY/OWNER/kascoord \
--set image.tag=TAG \
--set sandboxNamespace=sandboxes \
--set template=my-session \
--set auth.adminPassword.secretName=kascoord-admin
kubectl -n kascoord port-forward svc/kascoord 8000:8000
Then sign in at http://localhost:8000 as admin. Use the image tag and chart version published by your build. The sandbox namespace must already exist.
sandboxNamespace and template are required and have no defaults. To let the chart create a starter template that reads a Claude token from a Secret you made:
kubectl -n sandboxes create secret generic anthropic --from-literal=ANTHROPIC_AUTH_TOKEN=...
helm upgrade kascoord ... \
--set sandboxTemplate.create=true \
--set sandboxTemplate.image=REGISTRY/PATH/kascoord-sandbox-image:TAG \
--set sandboxTemplate.apiKeySecret.name=anthropic
The template sets ANTHROPIC_AUTH_TOKEN from the Secret. Add --set sandboxTemplate.baseUrl=https://... to point Claude at an Anthropic-compatible endpoint. Do not use ANTHROPIC_API_KEY: a headless session cannot answer the one-time approval prompt it triggers. For Codex, expose OPENAI_API_KEY, or the env_key variable of your provider, in a custom template.
What the chart grants
| Where | Access |
|---|---|
sandboxNamespace |
create, patch, delete on sandboxes; get on sandboxtemplates; get, create on pods/exec (WebSocket exec is authorized as get before Kubernetes 1.35); get, delete on persistentvolumeclaims; get, list on resourcequotas; get on pods/log; read on sandboxes, pods, events |
each of watchNamespaces |
read-only on sandboxes, pods, events |
| whole cluster | read-only ClusterRole, only with clusterWide=true |
sandboxNamespace is always watched, so listing it in watchNamespaces is optional. watchNamespaces rejects *; set clusterWide=true instead. RBAC cannot restrict PVC deletion to kascoord's own claims, so give kascoord sessions a dedicated namespace.
Signing in
Every page needs a signed-in user. Users sign in in one of two ways:
- With a password. An admin adds these users on the Users page. The first admin comes from
auth.adminPassword: on its first start, kascoord creates a useradminwith the password from that Secret. Later changes to the Secret do nothing, so change the password on the Users page. - Through OIDC. kascoord creates the user on their first sign-in and names them after the
preferred_usernameclaim. The identity provider decides who may sign in.
Both can be on at once, which keeps a password admin as a way in when the identity provider is down. Admins can also delete Sandboxes and change skills and settings. Every user sees and can use every session.
A password login lasts 30 days. An OIDC login stays signed in, for up to 400 days, while the identity provider keeps renewing its refresh token, which kascoord redeems every hour; a user blocked in the provider is signed out within the hour. A provider that is unreachable keeps users signed in until it answers again. Without a refresh token, an OIDC login lasts 30 days. Deleting a user signs them out. An OIDC user you delete comes back on their next sign-in, so block them in the identity provider as well.
With an https publicUrl, the login cookie is marked Secure. kascoord refuses writes that the browser marks as cross-site or same-site through Sec-Fetch-Site, so other apps on sibling subdomains cannot act with a user's cookie.
OIDC with Authentik
-
In Authentik, create an OAuth2/OpenID provider with client type Confidential and the redirect URI
https://KASCOORD_HOST/api/auth/oidc/callback. Keep the defaultopenid,profileandemailscope mappings and addoffline_access, so Authentik issues refresh tokens. The provider's refresh token validity sets how long a browser may stay away before its user signs in again. -
Create an application named
kascoordthat uses the provider. Bind the users or groups who may sign in to it. -
Store the client secret:
kubectl -n kascoord create secret generic kascoord-oidc --from-literal=client-secret=... -
Point the chart at Authentik:
helm upgrade kascoord ... \ --set publicUrl=https://KASCOORD_HOST \ --set auth.oidc.issuer=https://AUTHENTIK_HOST/application/o/kascoord/ \ --set auth.oidc.clientId=CLIENT_ID \ --set auth.oidc.clientSecret.secretName=kascoord-oidc \ --set auth.oidc.adminGroup=kascoord-admins
Authentik's default profile mapping sends a groups claim. With adminGroup set, kascoord sets the admin role from that claim on every sign-in, so a role changed on the Users page lasts only until that user's next sign-in. Leave adminGroup empty to manage OIDC admins on the Users page.
The kascoord pod needs egress to the issuer URL. kascoord checks the ID token's issuer, audience, expiry and nonce. It does not check the signature, because it receives the token directly from the token endpoint over TLS, so use an https issuer. A user whose OIDC username is already taken by a password user cannot sign in until one of the two is renamed or deleted. Other OIDC providers that support the authorization code flow with PKCE work the same way.
Configuration
The chart sets these environment variables from values. When running the image yourself, set them directly.
| Variable | Chart value | Default | Meaning |
|---|---|---|---|
KASCOORD_SANDBOX_NAMESPACE |
sandboxNamespace |
none, required | Namespace where sessions create Sandboxes. Other Sandboxes here are tagged interactive. |
KASCOORD_TEMPLATE |
template |
none, required | Name of the SandboxTemplate that sessions render from. |
KASCOORD_WATCH_NAMESPACES |
watchNamespaces, clusterWide |
the sandbox namespace | Comma list of namespaces to watch. * watches the whole cluster. |
KASCOORD_READONLY_NAMESPACE_PREFIXES |
readonlyNamespacePrefixes |
empty | Comma list. Sandboxes in namespaces starting with a prefix are tagged readonly and have no actions. |
KASCOORD_IDLE_MINUTES |
idleMinutes |
30 |
Idle time before disconnecting an agent and suspending its Kascoord-created Sandbox. The volume is kept. The Settings page overrides it. |
KASCOORD_DEFAULT_MODES |
defaultModes |
empty | Comma list of agent=mode, e.g. claude=bypassPermissions. New sessions start in that ACP mode; a mode the agent lacks is ignored. The Settings page overrides it per agent. |
KASCOORD_SESSION_IMAGES |
sessionImages |
empty | Comma list of name=image; the chart takes a list of {name, image}. A new session can run one of these as its agent container image in place of the SandboxTemplate's. The image must keep the session image contract: uid 1000, HOME=/workspace and the ACP adapters. The Settings page adds more. |
KASCOORD_SESSION_TEMPLATES |
sessionImages[].template |
empty | Comma list of name=template. A chart session image with a template renders new Sandboxes from that SandboxTemplate in the sandbox namespace instead of KASCOORD_TEMPLATE, so it can carry credentials other sessions do not get. Images added in the Settings page always use KASCOORD_TEMPLATE. |
KASCOORD_DEFAULT_SESSION_IMAGE |
defaultSessionImage |
empty | Name from the list that new sessions preselect. Empty keeps the template's image. The Settings page overrides it. |
KASCOORD_GIT_AUTHOR_NAME, KASCOORD_GIT_AUTHOR_EMAIL |
gitAuthor.name, gitAuthor.email |
empty | Commit identity each agent starts with, set as GIT_AUTHOR_* and GIT_COMMITTER_* over the SandboxTemplate's. Empty keeps the template's. The Settings page overrides it. |
KASCOORD_GLOBAL_INSTRUCTIONS |
globalInstructions |
empty | Instructions written to ~/.claude/CLAUDE.md, and linked to ~/.codex/AGENTS.md and ~/.config/opencode/AGENTS.md, each time an agent starts. The Settings page overrides it. |
KASCOORD_CONTAINER |
container |
agent |
Container in the template's pod that runs the agent. |
KASCOORD_DB_PATH |
dbPath |
/data/kascoord.db |
SQLite file for sessions and event history. |
KASCOORD_WEB_DIR |
none | /app/web/dist |
Built frontend, set by the image. |
KASCOORD_LOG_CONFIG |
none | packaged default | Path to a logging YAML file. |
KASCOORD_PUBLIC_URL |
publicUrl |
empty | URL users open kascoord at. Required for OIDC. An https URL marks the login cookie Secure. |
KASCOORD_PUSH_CONTACT |
pushContact |
empty | Contact push services can reach about kascoord's notifications (the VAPID subject): an email, mailto: or https: URL. Empty uses an https public URL, then a placeholder address. |
KASCOORD_ADMIN_PASSWORD |
auth.adminPassword |
empty | Password for a user admin, created at startup if no user of that name exists. |
KASCOORD_OIDC_ISSUER |
auth.oidc.issuer |
empty | OIDC issuer URL. Empty turns OIDC sign-in off. |
KASCOORD_OIDC_CLIENT_ID |
auth.oidc.clientId |
empty | OIDC client id. Required with an issuer. |
KASCOORD_OIDC_CLIENT_SECRET |
auth.oidc.clientSecret |
empty | OIDC client secret; the chart reads it from a Secret. |
KASCOORD_OIDC_ADMIN_GROUP |
auth.oidc.adminGroup |
empty | Members of this group in the groups claim are admins. Empty leaves roles to the Users page. |
Sandbox tags: kascoord (label app.kubernetes.io/managed-by=kascoord), interactive (any other Sandbox in the sandbox namespace), readonly (matches a prefix) and other (everything else). Only kascoord and interactive Sandboxes get actions.
The resource quota bar is optional. If resourcequotas is absent or forbidden, kascoord returns no quota and the UI hides the bar.
Writing a SandboxTemplate for another model gateway
kascoord renders a Sandbox from the template and execs the agent adapter (claude-agent-acp, codex-acp, or opencode acp) inside the container named by KASCOORD_CONTAINER. The template only needs to:
- Run the session image (or any image with
gitand the adapters onPATH), with a long-running command such assleep infinity. - Mount a volume at
/workspaceand setHOME=/workspace. - Pass the model credentials as environment variables.
For Claude through an Anthropic-compatible gateway, set ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN. Prefer these over ANTHROPIC_API_KEY: a headless session cannot answer the one-time approval prompt that the API key variable triggers. For Codex, put a [model_providers.*] table in $CODEX_HOME/config.toml (mount a ConfigMap and copy it at start) and expose the provider's env_key variable. Nothing in kascoord depends on the gateway.
SandboxTemplate example has a complete gateway configuration.
kascoord copies only podTemplate, volumeClaimTemplates, service and failedPodPolicy from the template and logs a warning for any other key. A template's networkPolicy does not carry over to the Sandbox, so apply a NetworkPolicy to the whole sandbox namespace to restrict egress.
Private repositories
Sessions clone over HTTPS with whatever credentials the pod has. SSH URLs need a key the template would have to mount, which the chart does not do. Use https:// clone URLs.
Create a file in git's credential-store format, one line per forge:
https://USER:TOKEN@github.com
https://oauth2:TOKEN@gitlab.com
Store it as a Secret without putting the token on a command line, then point the chart at it:
kubectl -n sandboxes create secret generic git-credentials --from-file=credentials=./git-credentials
helm upgrade kascoord ... --set sandboxTemplate.gitCredentials.secretName=git-credentials
The chart mounts the Secret read-only at /etc/kascoord-git and sets GIT_CONFIG_* environment variables so git reads credentials from /etc/kascoord-git/<key> through git credential-store, answering get only because the mount is read-only. No gitconfig file is involved. If you write your own template, set the same three variables and mount the Secret yourself.
Token scopes:
- GitHub (fine-grained token): Contents read and write on the repositories you use.
- GitLab:
read_repositoryandwrite_repository. - Forgejo and Gitea: repository read and write.
- Bitbucket: an app password or repository access token with repository read and write.
Every session can use this token for every repository it covers. Prefer a token limited to the repositories you run agents on.
The chart also sets GIT_AUTHOR_* and GIT_COMMITTER_* from sandboxTemplate.gitAuthor.name and .email (default kascoord and kascoord@localhost), so agents can commit. To commit as someone else with any template, set gitAuthor.name and .email or use the Settings page; Kascoord starts each agent with that identity.
Session image
The session image is built separately from the Kascoord web app. Use kascoord-sandbox-image or your own image with:
gitand the adapters for your chosen agents onPATH:claude-agent-acp,codex-acp, and/oropencode(invoked asopencode acp).- A writable, persistent
/workspace,HOME=/workspace, and uid 1000 for catalog session images. - A long-running container command, such as
sleep infinity. - The
skillsCLI and Node 22.20 or later if you use skill installation.
Provide model credentials and gateway configuration through the SandboxTemplate. Selecting an agent requires its adapter to be installed in the image; Kascoord does not install adapters for you.
Skills
Attach agent skills on the Skills page by pasting a skills.sh page URL or the npx skills add ... command shown there. A bare owner/repo also works. The new-session form lists every attached skill, all ticked by default, so you can leave some out of a session.
When kascoord creates a session's Sandbox, it runs skills add <source> [--skill <name>] -g -a claude-code -a codex -y once per selected skill, before the agent starts. Skills land in ~/.claude/skills and ~/.agents/skills on the session volume, so they survive suspend and resume. Each install shows up in the chat as a one-line notice. A failed install does not stop the session. Sessions that attach to an existing Sandbox get no installs.
- The session image must include the
skillsCLI, which needs Node 22.20 or later. - Installs fetch from GitHub, so the sandbox namespace needs egress to it.
- kascoord sets
DISABLE_TELEMETRY=1so the CLI does not report installs to skills.sh. - A skill is prompt text from a third party that the agent will follow. Read it before you attach it.
Models and agent switching
The chat composer has an agent picker and, when the adapter reports a model config option, a model picker. The model picker's menu also holds each thought_level or model_config select option the adapter reports, such as effort or fast mode, and its label lists the ones not at their default. Adapters offer some of these only for some models; Codex, for example, offers fast mode only for models with a fast tier. A new model or setting applies from the next message; a running turn keeps the ones it started with.
Switching the agent, for example from Claude Code to Codex or OpenCode, also applies from the next message. If the session is idle, kascoord connects the new agent right away so its models and modes show up. The new agent runs in the same Sandbox and workspace, but in a fresh ACP session. Its first prompt starts with a transcript of the earlier conversation: user prompts and agent replies, without tool calls, cut to the last 40,000 characters. Any agent session that kascoord could not resume or load gets the same transcript.
Session lifecycle
Idle sessions disconnect after idleMinutes (30 by default). For Sandboxes created by Kascoord, this also suspends the Sandbox while keeping its volume. For sessions attached to an existing Sandbox, Kascoord stops the agent without suspending the Sandbox. If the agent left a background command running, such as a Bash call run in the background, the idle time starts over instead. Kascoord looks for a shell process under the agent. Send a prompt to a suspended session to continue; it resumes the Sandbox first. Suspending a Sandbox from the Sandboxes page disconnects its idle session as well. Resuming a suspended Sandbox from the Sandboxes page wakes its session as well. In the last five minutes, the session header counts down to the suspend. The Settings page overrides idleMinutes, and open sessions pick up the new value.
Archive deletes a Sandbox and its PVCs when Kascoord created them. Save or push any work you need first. Attached Sandboxes are kept; only their agent is stopped. In both cases, the transcript remains readable. Delete an archived session to permanently remove its transcript.
The sidebar keeps a repository listed after its last session is archived, so its + button still starts a new session there. The × next to it removes the repository by deleting all of its sessions and their transcripts. Active sessions are archived first, and the prompt warns about their unpushed commits.
Notifications
Tap the bell next to your username in the sidebar to get a push notification when an agent finishes a turn, fails, or asks for a permission. Tapping a notification opens its session. Every subscribed device is notified about every session, because sessions are shared. While a session is open in a window you are using (visible, focused, and touched in the last minute), none of your devices get pushes for that session. Other sessions still notify, and hiding the window or switching session ends the hold at once. Signing out turns notifications off for that device.
- Android and desktop browsers work from a normal tab. On iPhone and iPad (iOS 16.4 or later), add Kascoord to the Home Screen first and use the bell there; Safari tabs cannot receive push, so the bell is hidden.
- The page must be served over HTTPS.
- The Kascoord pod needs HTTPS egress to the browsers' push services (for example
fcm.googleapis.com,web.push.apple.com,updates.push.services.mozilla.com). - The VAPID key is generated on first use and stored in the database. Set
pushContactto an address push services can reach you at. Apple can reject pushes whose contact it cannot parse.
Clear a session
Use Clear in the session header to start a fresh conversation in the same Sandbox. Confirming removes the chat history and resets the agent's context. Files, repository changes, installed skills, and model, setting, and mode selections stay in place. Stop any running turn before clearing; archived sessions cannot be cleared.
Development
Backend (Python 3.14, uv):
uv sync
uv run ruff check src/ tests/
uv run pyright
uv run pytest tests/ -v
Frontend (web/, pnpm):
pnpm -C web install
pnpm -C web lint && pnpm -C web typecheck && pnpm -C web test
pnpm -C web build
Chart:
helm lint charts/kascoord --set image.repository=x,image.tag=1,sandboxNamespace=sandboxes,template=t
helm package charts/kascoord
CI (.forgejo/workflows/build.yaml) builds the image and chart on pushes to main, except changes limited to README.md and docs/. It also supports manual runs. Images are published as <registry>/<owner>/kascoord:<version> and charts as oci://<registry>/<owner>/charts/kascoord, with matching YYYY.MDD.P versions. It needs:
- Secret
REGISTRY_TOKEN: a token with package write access, used with the repository owner as the user name. - Variable
REGISTRY(optional): the registry host to push to. Defaults to the host of the forge's server URL, which is wrong when the runner reaches the forge on an internal http address. - Variable
DOCKER_HOST(optional): the Docker daemon the runner jobs use, for example atcp://address when the daemon runs as a sidecar. Leave it unset to use the runner's default.
The API is described by the types in web/src/api.ts and served under /api (/api/healthz, /api/auth, /api/users, /api/sandboxes, /api/sessions, /api/skills, /api/settings/*). Live updates use server-sent events.
Brand assets
See the brand guidelines and brand kit for logos, fonts, and the visual reference.
License
Apache-2.0.
