Keyoku
Open source · MCP-native · Local-first

The harness with muscle memory.

Keyoku watches how you work in Claude Code, Codex, or Cursor, and turns the goals you actually finish into reusable workflows. Next time, your agent reaches for what already worked — no re-explaining. And reuse needs no API key: the agent itself is the judge.

No API key — integrates with your coding agentSupercharge with an optional SLMLocal-first — you’re the trust boundary
keyoku · agentFirst run
youShip staging.
watching · learning the workflow

Install Keyoku, then wire it into Claude Code — MCP server plus three hooks (record, brief, context). If you use Codex, init wires it too. Keyoku nudges your agent when a pattern repeats — you never have to ask.

1
Install Keyoku globally (durable — survives npm cache pruning)npm install -g keyoku
2
Wire the hooks + MCP server (Codex too, if present)keyoku init
3
Skip the cold start — backfill your transcript historykeyoku import
4
Restart Claude Code — tracing and nudges are live
The loop

Goals go in. Muscle memory comes out.

Keyoku closes the loop between doing the work and reusing it — so your agent never rediscovers what already worked.

  1. GoalDeclare what “done” means — as machine-checkable criteria.
  2. ActYour agent does the work, one step at a time.
  3. ConvergeProbes pass ✓ — the goal is verified met, not guessed.
  4. LearnThe winning trace becomes a reusable workflow.
  5. ReuseNext similar goal, your agent reaches for it — no API key needed.
Does it actually help?Measured: did the agent adopt the proven step?
Cold (no memory)0–33%
With muscle memory100%

Adoption of the proven step across repeated trials: 0–33% cold → 100% with memory (+67–100pp, strong & weaker models).

Muscle memory, automatically

Every goal you converge becomes a reusable workflow — captured live as you work, or back-filled from your activity log if you just did the work without recording. Have older, empty workflows? keyoku backfill repopulates them from what's already logged.

Reuse with zero dependency

Keyoku is driven by a frontier coding agent — so the agent itself judges which past workflow fits, matching goals that share meaning, not just words. No API key, no second model required. A lite model is an optional accelerator for headless runs.

Yours, and in your control

Local JSONL, secrets redacted at write time, and keyoku inspect shows exactly what's stored. Bash runs, judgment pauses, human-review waits — approval is the trust boundary. keyoku pause silences everything instantly.

How it works

Simple outside.
Structured underneath.

Keyoku turns your real working patterns into runnable workflows, then keeps you in control of every action.

01

Observe

Record every command, edit, and tool call as structured activity.

A PostToolUse hook captures your agent's real work — entities extracted, secrets redacted at record time, stored as local JSONL. No cloud, no telemetry, zero configuration — and keyoku pause silences it all.

02

Learn

A converged goal becomes a reusable workflow — your muscle memory.

When a goal's criteria pass, its steps are captured as a workflow — live, recorded, or back-filled from your activity log. Pattern mining catches repeated routines too. An optional SLM sharpens and names drafts; without one, the deterministic miner and your agent cover it.

03

Run

Execute approved workflows with one command — judgment included.

Approved workflows become native slash commands. Bash steps run directly with timeouts and a full audit trail, params fill {{placeholders}} at run time. Judgment steps hand off to your coding agent and resume on completion. Human-review steps wait for explicit sign-off.

Get started

Pick your path.

Native

Claude Code

Wire the MCP server and three hooks in one command. Import your transcript history and Keyoku is suggesting workflows in minutes.

Get started →
Native

Codex

First-class, automatically: init wires ~/.codex/config.toml, import reads your Codex sessions, and export bakes workflows into AGENTS.md. Cursor and any MCP client connect via standard registration.

View tools →

CLI

Inspect status, mine patterns, review approvals, and audit every action keyoku takes — straight from your terminal.

View CLI →

Open Source

MIT-licensed TypeScript, 260+ tests, documented security model. Read the code and audit the trust boundary yourself.

View source →

Stop re-explaining your workflows.

Approve once. Run with one command. Start in ten seconds.