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 runmnemom 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:
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:
--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.- Sign Claude Code in to your Team or Enterprise claude.ai account: run
claude, then/login. - Run
mnemom agentand pick Claude subscription, or runmnemom agent config set auth subscription.
- Claude Code sends its own claude.ai login to the gateway.
mnemom agentdoesn’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 setupfirst. - The gateway identifies you by a Mnemom API key. The first time one is needed,
mnemom agentcreates a gateway-only key and saves it to~/.mnemom/launcher.json(readable only by you). To use your own key instead, setMNEMOM_AGENT_MNEMOM_KEYto an org API key with thegatewayscope.
Anthropic API key
This is the default.mnemom agent looks for your key in this order:
- the environment:
MNEMOM_AGENT_ANTHROPIC_KEY, elseANTHROPIC_API_KEY; - its own store,
~/.mnemom/launcher.json(readable only by you); - 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.- 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. - Run
mnemom agentand pick Anthropic Console, or runmnemom agent config set auth console.
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:
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.
Related
- mnemom agent: install, invitations and launching
- Savings estimates: the first-run savings screen and the in-session counter