Docs / An agent on its own

An agent on its own

Agent keys and a GitHub workflow that fixes threads.

The agent can work the queue without anyone at a computer: a GitHub workflow asks for the agent's threads every hour, fixes them on a branch with Claude Code, closes each with what it changed, and opens a pull request. A person still merges, and confirms each fix on the live site.

1. Make an agent key

In the project's Settings → Agent on GitHub, an admin makes a key. It is shown once and kept only as a hash; you can revoke it, and see when it was last used. A key can list the project's threads and reply, resolve or reopen them as the agent — nothing else.

2. Add the workflow

npx notemend init --ci

It writes .github/workflows/notemend.yml. Commit it with .notemend.json (from npx notemend link).

3. Add the secrets

In the repository's settings, add NOTEMEND_KEY — the agent key — and ANTHROPIC_API_KEY. The workflow runs every hour, or by hand from the Actions tab.

Anywhere else

Any machine with NOTEMEND_KEY set uses the key instead of a sign-in: npx notemend, reply, done and reopen work as the agent. NOTEMEND_PROJECT names the project when there is no .notemend.json.