KeepState
UnexploredDurable agent sessions: start, watch, message and pause KeepState agents; approvals ask a person.
Install
Terminal
$npx -y @keepstateai/cli mcpmcp_config.json
{
"mcpServers": {
"ai-keepstate-ks": {
"args": [
"-y",
"@keepstateai/cli",
"mcp"
],
"command": "npx"
}
}
}Documentation
ks — the KeepState CLI
Durable agent sessions: run an AI agent in a microVM, checkpoint it, kill it, wake it — and it resumes mid-sentence, files, memory, and running processes intact.
This is the thin client. Every verb terminates at the KeepState control plane; the client is a key, the building is keepstate.ai.
Install (any one of three)
curl -fsSL https://keepstate.ai/install.sh | sh
brew install keepstateai/tap/ks
npm install -g @keepstateai/cli
Every path downloads the same public-CI-built binary and verifies its
SHA256 against the release's SHA256SUMS before installing. Releases
carry GitHub build-provenance attestations.
Three commands to a session
ks login # browser device flow
ks run # a durable session on the fleet
ks checkpoint <id> --stop && ks wake <id> # the plug-pull, survived
ks doctor checks connectivity, token, and version. ks update
self-updates (checksum-verified; a mismatch is refused).
Cruise
A Cruise job is a goal, a check and a ladder of models. The fleet runs one attempt per rung from an exact save point, verifies the candidate in a verifier the agent cannot reach, and accepts only when the check passes. A failed rung escalates to the next one; after the last rung the job waits in your review queue. Nothing is accepted on a model's word.
ks cruise init --goal "make the inventory tests pass" # drafts .keepstate/cruise.json
ks cruise approve # locks it: .keepstate/cruise.lock
ks cruise run # uploads the workspace, starts the job
ks cruise status # rung, attempts, save points, spend, verdict
ks cruise artifact <job> # the accepted tarball, sha256-verified
ks cruise receipt <job> # the signed receipt, exactly as sealed
ks cruise verify receipt.json # the receipt's signature, checked offline
init reads the repository: the check is the test command it finds
(pytest, npm test, go test) or the one you name with --tests. A
goal with no check is not a job; init stops and says so. It makes no
request and never calls a model. approve records the manifest's digest;
run refuses a draft that is not approved, a test or workspace changed
since approve, and a workspace over 50 MiB (.git and .keepstate
excluded). Defaults: 1800 s per attempt and a $2 spend ceiling
(--spend); the ladder comes from the model table (ks cruise models,
--ladder family:model,...). ks cruise logs, cancel and resume
complete the set. Every --help makes no request.
ks cruise verify RECEIPT checks a receipt's Ed25519 signature against the
public key list KeepState publishes (--keys-url, or a saved copy with
--keys-file, which makes no request at all), with no sign-in and no service
key; the receipt is never sent anywhere. Exit 0: verified under a key that was
valid at the receipt's time. Exit 1: not verified (altered, another key, key
unknown, outside its window or revoked; --trust-before-revocation accepts a
receipt made before its key was revoked). Exit 3: the receipt has no Ed25519
signature, so only the service can check it. Exit 2: unreadable inputs.
Bring a conversation in
A Claude Code or Codex CLI session on your machine can continue as a new KeepState agent session, with the same conversation; a Cursor chat comes in as a written summary.
ks import list # the sessions on this machine: id, project, date, size, messages
ks import # at a terminal: pick a session, review the plan, import
ks import claude-code --latest # shows the plan, asks, then imports it
ks import claude-code --latest --yes # the same without the question
ks import claude-code --latest --plan # what would go up, and a digest; nothing is created
ks import claude-code --latest --execute <digest> # exactly that plan
ks import codex --session 01a1c2d3 --with-files --plan
ks import cursor --latest --plan # a written summary, never a transcript
The session file is read on your machine. What must not travel is taken out
(the old machine's system prompt and tool list, account ids, permission modes,
signed thinking, encrypted reasoning), the old project paths are said as the
new workspace's, and anything shaped like a secret (API keys, tokens, private
keys, connection strings) is replaced before anything is sent; the plan counts
the replacements by kind and never shows a secret. The plan is shown first. At a
terminal you are guided and asked before anything is created (pick, files or not, review); --yes skips the question,
and without a terminal (or with --no-input) the command stops after the plan
and names the command to run. --plan creates nothing and prints a digest,
and --execute names it (a conversation that changed since is refused). A
conversation over 120 MB (120,000,000 bytes, what a session can resume) is
trimmed to what the harness sends the model, from its last compaction on, with the
summary; if it is still over, or holds no compaction, it is refused: compact it in
the tool first, or import a written summary with --brief. A session that was
written in the last two minutes is open somewhere: the plan says that what you
say after it stays behind. A
conversation goes into its own tool only; into the other one (--harness) it
goes across as a summary. --with-files brings the git repository at the
session's folder under the upload policy: .env files, credential-named
files, node_modules and what .gitignore lists stay home, and .git goes.
The first reply re-reads the whole conversation, so it costs more than a short
message. Cursor's chat store is not documented: reading it is best effort, from
a copy, and nothing in it is changed. The same import is the MCP tool
ks_import_session, which plans first and acts only on a confirm value.
Uninstall (one line)
rm -f $(command -v ks) && rm -rf ~/.config/keepstate
MIT licensed.
Sourced from the repository README.
More in AI & Agents
- PonytailMakes your AI agent think like the laziest senior dev in the room. The best code is the code you never wrote.109,599
- AgentsMulti-harness agentic plugin marketplace for Claude Code, Codex, Cursor, OpenCode, GitHub Copilot, and Google Antigravity39,079
- Frontend SlidesCreate beautiful slides on the web using a coding agent's frontend skills28,060
- Agent Skills Search ServerSearch and discover Agent Skills from the skills.sh registry. Powered by HAPI MCP server.27,534
- Agency Agents Zh🎭 267 个即插即用的 AI 专家角色 — 支持 Hermes Agent/Claude Code/Cursor/Copilot 等 18 种工具,覆盖工程/设计/营销/金融等 20 个部门。含 52 个中国市场原创智能体(小红书/抖音/微信/飞书/钉钉等)。搭配编排器 agency-orchestrator,一句话即可让多位专家按 DAG 自动协作。19,868
- Watermarks RemoverStrip multi-vendor AI provenance marks: Unicode text hygiene, statistical rewrite hooks, and C2PA/metadata from PNG/JPEG/SVG/PDF/DOCX/HTML/MD17,822