Activity tracing
A PostToolUse hook records every Bash, Edit, Write, and Read tool call.
Events land in ~/.keyoku/activity.jsonl (size-capped ~10k events). Successful connector calls are recorded too.
Keyoku watches how you work in Claude Code, learns the patterns you repeat, and turns them into one-command workflows. A TypeScript MCP server and CLI in a single npm package.
Local-first. No cloud, no telemetry. Zero API keys required.
Keyoku covers the full loop: trace what you do, mine what repeats, and run what you approve — with connectors, goals, and an audit trail around it.
A PostToolUse hook records every Bash, Edit, Write, and Read tool call.
Events land in ~/.keyoku/activity.jsonl (size-capped ~10k events). Successful connector calls are recorded too.
Heuristic detection of 2–6 step sequences that repeat at least 3 times.
Mined within each session, counted across sessions, with non-overlapping occurrence counting. Sequences need at least one ACTION step, so pure looking-around chains never qualify.
Approve a suggestion and it becomes a template you can run anywhere.
Templates support bash, mcp_call, agent_prompt, and human_review steps. Executions persist step-by-step and resume in order.
Register external MCP servers — stdio, HTTP, or synthesized from an OpenAPI spec.
Each connector gets an autonomy level: observe, suggest, approve, or autonomous. Approval-gated calls queue for your sign-off.
Convergence mode: define machine-checkable criteria and let the harness keep checking.
Probes are command, http, or mcp calls with assertions. Re-assess on demand or run a CLI watch loop.
Every action lands in an append-only audit log.
Inspect it with the audit_list tool or `keyoku audit` from the CLI.
| Item | Detail |
|---|---|
Package | keyoku on npm — MCP server + CLI in one |
Language | TypeScript |
License | MIT |
Repository | github.com/Keyoku-ai/keyoku |
State | ~/.keyoku (directory mode 0700, files 0600) |
Agents | Claude Code first-class; Cursor and Codex via MCP |
keyoku (TypeScript, MIT) is the workflow harness on this page. keyoku-engine (Go, BSL 1.1) is the separate backend for the knowledge graph, semantic search, and team sync — see the Engine docs.
Quick start
# Registers the MCP server and the activity hook
npx keyoku init
# Restart Claude Code, then check
keyoku statusFollow the quickstart, see the full pipeline, or jump straight to the tool reference.