Coding agents you can leave running.
Your team's coding agents need limits, records and an API before they run unattended. Script all three on your own server, with the CLIs you already use.
- Free to self-host
- No model markup
- Refused
- Approved
- Allowed
# as the agent $ k2 dns access --json {"allowed":false} $ k2 permission request dns.manage \ --why "Add the staging record" # as a person, outside K2 $ k2 permission approve <id> # back as the agent $ k2 dns access --json {"allowed":true}
Sample data. Permission requests are Beta: k2 permission beta on.








Keep your CLIs. Run them on your server.
K2 starts the official CLI you're signed in to, unmodified.
claudecodexgrokgemini API keylocal modelThe server, not the agent, sets the limits.
Each session gets a revocable token, and the server reads identity from it, not from the agent's claim.
Recorded: sign-ins, mail sends, messages, approvals, App calls. Not terminal commands or file edits.
A failed build starts a session you can watch live.
CI sessions skip the CLI's own permission prompts by default. K2's limits are a separate check.
- name: Hand the failure to an agent if: failure() run: | curl -X POST \ "$K2_URL/v1/w/api/host-sessions" \ -H "Authorization: Bearer $K2_KEY" \ -H "Content-Type: application/json" \ -d "{\"prompt\":\"Run $GITHUB_RUN_ID failed.\"}"
k2 api onk2 api-key create --label ci --workspaces apik2 workspace api-skip-permissions set api off
CI must reach your server. API reference
Read this before you trust it.
These start off. A person allows each, and the approval is recorded.
K2 doesn't log these, and a hijacked agent could step around the rules.
Your model sees what agents send
With Claude or ChatGPT, it goes to that company. A local model keeps it on your box.
No SSO, no spend caps.
Test it on a box you can wipe.
Install on a spare Linux box
Or the Apple Silicon Mac app, without mail, database or apps.
curl -fsSL https://raw.githubusercontent.com/Alakazam-211/ K2/ main/ scripts/ install-daemon.sh | sh Add one agent and try the limits
k2 agent hiregives your CLI a folder, role and inbox. Ask it for something that starts off.k2 agent hire ~/agents/builder --name "Builder" --agent claudek2 msg builder "Add a DNS record."
- Your box, your network$0No fee per seat or agent.
- Your box, reachable from anywhere$2.99/moA k2.dev address for your phone, teammates and CI.
- A server we run$14.99/moK2 Cloud Basic, plus $2.99 a month for its address. Bigger servers cost more.
Plus your AI plan or keys. All prices · Security table