Status:
v0.3.0adds the loop that improves the agent from your sessions; see How it improves itself.
npm install -g chopin-aiRequires Node.js 24.8 or later.
Start chopin in the project you want it to work on:
cd my-project
chopin- Connect a provider. The first run asks for one, by its sign-in or an API key, then for a model, which becomes
the default. A key already set in the provider's usual environment variable skips the first step.
/loginconnects another provider later, and/modelswitches models. - Give it a task. Type what you want and press
enter. While it works,entersteers the running turn andalt+enterqueues a follow-up. - Come back any time. The agent runs in the project's background service, so closing the terminal does not stop
it. Run
chopinin the same directory again, and/resumepicks up the conversation, finished or still running. - Work from your editor. Have an ACP client run
chopin acpin the project; it joins the same service as the terminal.
/hotkeys lists every key.
- Durable conversations. Every step is saved before it is shown, so a run cut off by a restart picks up where it stopped.
- One agent, every client. Each project has a background service; the terminal and editors (
chopin acp) join the same conversation, and closing the terminal leaves the agent working. - Any provider.
/loginconnects one by its sign-in or an API key;/modelandctrl+pswitch models mid-conversation. - Your shell in the conversation.
!commandruns a command the agent then sees;!!commandkeeps it to you. - Steer while it works.
entersteers the running turn,alt+enterqueues a follow-up,alt+uptakes queued messages back. - Conversations that branch.
/resume,/fork,/compactand/export. - Your project's instructions.
AGENTS.mdfiles from the repository root down to the working directory are read before every request. - Workspaces per user.
chopin serveruns one container workspace per user, who is named by the integrator's signed tokens.
The agent's behavior lives in a mutable layer: AGENTS.md instructions, Agent Skills, MCP servers and gate rules,
shared by both harnesses, plus each harness's own code. The layer uses open formats, so what it learns carries over
to other agents. Write your own in ~/.chopin/layer, and check one with chopin layer check <dir>.
The RSI (recursive self-improvement) loop runs in the background on your local sessions, chopin's and other agents'. When one kind of failure recurs in two sessions and still happens often when those sessions are resumed, it reads every time it happened, with your corrections, and proposes a single instruction or skill. It keeps the change only when, resumed at the steps that failed and at steps that went right in other conversations, it mends at least two of the failures and fixes more than it breaks, so that false gains stay a bounded share of the changes kept. Each change can be undone, one unused for 30 days is archived, and spending stops at a weekly budget.
chopin evolveruns a round now;evolve status,evolve logandevolve undo <id>show and revert changes.chopin evolve correctionsasks, kind by kind, whether the agent should learn from how your messages corrected it.chopin evolve reviewapproves or refuses the changes the audit could not settle, held for you whenholdForReviewis on; an approved one is still tested before it is kept.rsiin~/.chopin/config.jsonturns it on:regularModel,strongModel,weeklyBudgetUsd,transcriptSourcesfor other agents' session logs,rulesFilefor rules no change may break, andholdForReview.
On macOS, commands the agent runs can neither read nor write ~/.chopin, which holds credentials, conversations
and the loop's records. Other systems do not enforce this, and neither does a container engine the agent's commands
can reach, since a container can mount any directory.
| Where | What |
|---|---|
~/.chopin/auth.json |
Credentials saved by /login; a provider's usual environment variable works too |
~/.chopin/config.json |
Default model, enabledModels for ctrl+p, theme, httpProxy, rsi |
~/.chopin/models.json |
Extra providers and models |
~/.chopin/layer/ |
AGENTS.md, skills/<name>/SKILL.md, mcp.json, gates.yaml |
CHOPIN_MODEL |
Overrides the default model |
CHOPIN_HOME |
Moves ~/.chopin |
CHOPIN_TOKEN |
The one credential chopin serve --workspace-port admits |
HTTP_PROXY, HTTPS_PROXY |
Route requests through a proxy |
chopin serve --jwks <url> runs agents for many users, each in a container workspace; build the image from a
checkout with pnpm --filter @chopin-ai/harness-pi image. Clients reach it through the client protocol or ACP.
chopin serve --workspace-port <port> --root <dir> serves one user whose workspace runs beside it on the same
network, such as another container of the same pod, running the workspace package's
loopback-listener.sh <port> <daemon>. It admits the credential in CHOPIN_TOKEN, starts conversations with the
model CHOPIN_MODEL names, and GET /status with that credential says whether it is busy. The user's client hands
it their model API key through the client protocol, and it keeps the key in memory alone.
| Package | Purpose |
|---|---|
chopin-ai |
The chopin command: terminal client, ACP and the project service |
@chopin-ai/core |
Mutable-layer formats, ACP transcripts, the RSI loop's core and chopin layer check |
@chopin-ai/workspace |
Workspace lifecycle interface with directory, container and socket implementations |
@chopin-ai/harness-pi |
Durable harness adapter: agent service, client protocol, ACP bridge |
@chopin-ai/harness-dsh |
Plugin harness adapter: mutable-layer loading, headless runs |
Requires pnpm 12.
pnpm install
pnpm typecheck # packages and tests
pnpm testv0.1.0 archives the previous design.
CHANGELOG lists every release.