Skip to main content
mnemom agent sends Claude Code’s model traffic through the Mnemom gateway, but Claude Code still has to sign in to Anthropic. There are three ways to do that: Your Mnemom µ balance is checked and charged the same way whichever option you pick. See Account and µ balance.

How the option is picked

The first time you run mnemom agent in a terminal, it looks at how Claude Code is signed in on this machine (~/.claude.json, or .claude.json in $CLAUDE_CONFIG_DIR). If there is a real choice, it asks once. For example:
Type the number and press Enter. Your answer is saved as auth in ~/.mnemom/launcher.toml. If you press Enter without a number, this launch uses an API key and you are asked again next time. You are never asked in a script, a pipe or CI. A non-interactive launch with nothing set uses an API key. To change the option later, or set it for one launch:
Precedence: --auth, then MNEMOM_AGENT_AUTH, then auth in ~/.mnemom/launcher.toml, then api-key. To see what a launch would use without launching, run mnemom agent --dry-run. mnemom agent doctor also reports it.

Claude subscription (Team or Enterprise)

Use your company’s Claude plan. You don’t need an Anthropic API key.
  1. Sign Claude Code in to your Team or Enterprise claude.ai account: run claude, then /login.
  2. Run mnemom agent and pick Claude subscription, or run mnemom agent config set auth subscription.
What happens on a subscription launch:
  • Claude Code sends its own claude.ai login to the gateway. mnemom agent doesn’t read or store it.
  • The gateway checks your plan with Anthropic. Only Team and Enterprise plans are accepted. Pro and Max plans are refused and need an API key instead.
  • Usage counts against your Claude plan, as it does when you use Claude Code without Mnemom.
  • The session runs in your terminal.
  • Your governed agent is created in your Mnemom org on the session’s first turn, so you don’t need to run mnemom agent setup first.
  • The gateway identifies you by a Mnemom API key. The first time one is needed, mnemom agent creates a gateway-only key and saves it to ~/.mnemom/launcher.json (readable only by you). To use your own key instead, set MNEMOM_AGENT_MNEMOM_KEY to an org API key with the gateway scope.

Anthropic API key

This is the default. mnemom agent looks for your key in this order:
  1. the environment: MNEMOM_AGENT_ANTHROPIC_KEY, else ANTHROPIC_API_KEY;
  2. its own store, ~/.mnemom/launcher.json (readable only by you);
  3. a masked prompt, which offers to save the key for next time.
mnemom agent config set key_source env|store|prompt narrows the search: env uses the environment only, store uses the environment then the store, and prompt always asks. The key goes only to the Claude Code process mnemom agent launches. It is never logged, printed or passed as a command-line argument. If no key is found, mnemom agent stops instead of launching Claude Code without the gateway.

Anthropic Console

Use this if your team pays for Claude through the Anthropic Console (API billing) and you sign Claude Code in with a Console account.
  1. Run claude, then /login → Anthropic Console account. Claude Code creates an API key for you and keeps it on this machine: in your login keychain on macOS, otherwise in Claude Code’s .claude.json.
  2. Run mnemom agent and pick Anthropic Console, or run mnemom agent config set auth console.
On every launch, mnemom agent reads the key Claude Code created and uses it exactly like an API key you supplied. It never copies the key into its own files. If Claude Code has no Console key on this machine, a launch with auth = console stops with this message:
This happens, for example, after claude auth login --console, which signs you in without creating a key. Sign in again with /login as above, or switch to an API key.