#Error Message

1 messages · Page 1 of 1 (latest)

fresh fox
#

Has anybody seen this issue :
Agent failed before reply: No API key found for provider "anthropic". Auth store: /Users/fred/.openclaw/agents/main/agent/auth-profiles.json (agentDir: /Users/fred/.openclaw/agents/main/agent). Configure auth for this agent (openclaw agents add <id>) or copy auth-profiles.json from the main agentDir.
Logs: openclaw logs --follow

delicate hareBOT
#

To help others find answers, you can mark your question as solved via Right click solution message -> Apps -> âś… Mark Solution

steady meteorBOT
#

Yep — that error basically means the agent that’s running can’t resolve any Anthropic credentials from the place it expects (your auth-profiles.json for that agent, or env vars that the Gateway actually sees).

A quick checklist that fixes ~90% of these:

  1. Version + sanity check
openclaw --version
openclaw models status

(If you paste output, please redact tokens/keys.)

  1. Most common cause on macOS: Gateway runs as a service and doesn’t see your shell env
    If you set ANTHROPIC_API_KEY in ~/.zshrc/terminal, launchd won’t inherit it. Put it in:
  • ~/.openclaw/.env (recommended), then:
    openclaw gateway restart
    
#
  openclaw models status

Docs: https://docs.openclaw.ai/help/faq#i-started-the-gateway-via-the-service-and-my-env-vars-disappeared-what-now

  1. Auth is per-agent
    Your error points at:
    ~/.openclaw/agents/main/agent/auth-profiles.json

So make sure you’re configuring that agent (especially if you have multiple agents/profiles/remote mode). Running openclaw models auth … on your laptop won’t help if the Gateway is on another machine.

  1. If you’re using Claude subscription auth (setup-token) instead of an API key
    Generate/paste a setup-token for Anthropic on the gateway host (see FAQ entry for the exact commands).

Docs: https://docs.openclaw.ai/help/faq#where-do-i-find-an-anthropic-setup-token

#

If you reply with openclaw --version + the relevant lines from openclaw models status, I can tell which of the above you’re hitting.

fresh fox
#

Thanks guys it up and working I really appreciate it