Skip to Content
Create your first agentStore an LLM credentialStore an LLM credential

Store an LLM credential

Agents need a language model to answer with. Hiveloom stores provider secrets in an encrypted vault. Secrets never go on the command line as arguments.

Quick rule

Hiveloom picks the provider from the agent’s model ID:

  • Models starting with claude- use the credential named anthropic.
  • Everything else uses the credential named openai.

For the guided path, store one of these:

ProviderCredential nameModel ID examples
Anthropicanthropicclaude-sonnet-4-20250514
OpenAIopenaigpt-4o, gpt-4o-mini

Set the credential

Three ways to feed the secret — never as a CLI argument:

# 1. From a file hiveloom credential set anthropic --from-file ~/anthropic.key # 2. From an environment variable hiveloom credential set anthropic --from-env ANTHROPIC_API_KEY # 3. From stdin (convenient for one-off pipes) echo "sk-ant-..." | hiveloom credential set anthropic

For OpenAI, replace anthropic with openai.

Want OpenRouter, Groq, Ollama, or another OpenAPI-compatible provider?

Hiveloom ships an OpenAPI-spec client that can be pointed at any provider that implements OpenAI’s Chat Completions schema — same openai credential, different base URL.

Verify

hiveloom credential list

The table shows credential names and metadata but never the values.

Rotate or remove

cat ~/new-anthropic.key | hiveloom credential rotate anthropic hiveloom credential remove anthropic

Troubleshooting

  • credential 'anthropic' not found — the agent model starts with claude-, so Hiveloom is looking for the credential named anthropic.
  • credential 'openai' not found — the agent model does not start with claude-, so Hiveloom is looking for openai.
  • Auth failure at chat time — the key is stored but invalid or revoked. Rotate it.

Next: Create the agent.

Last updated on