Agent BrainsAgent Brains

Access API Key

Create and manage the AgentBrains API key used by n8n nodes, API calls, and MCP integrations.

Access API Key

Before any external tool can talk to AgentBrains, you need an AgentBrains access token. In practice, this is the API key used to authenticate requests to the AgentBrains integration layer.

Why the API key matters

AgentBrains is designed to be framework-agnostic. Whether you connect through n8n, direct API calls, or MCP, the API key is the credential that gives your workflow access to the same production backbone:

  • structured Knowledge Base access
  • semantic retrieval
  • image retrieval
  • conversation logging
  • automated scoring and QA services

This is what lets you keep your workflow logic in your preferred builder while AgentBrains stays responsible for knowledge, retrieval, analytics, and operational tooling.

Where you use it

The same key pattern is used across AgentBrains integrations:

Integration pathHow the key is used
n8nStored in the AgentBrains Integration API credential and reused across nodes
Direct API usageSent in request authentication headers
MCPUsed to authenticate tool access to the same underlying services

In the n8n node pack, the credential automatically sends the same secret as both:

  • a bearer token
  • an access-key header

That means you only enter the value once in n8n and all AgentBrains nodes can reuse it.

How to create it in AgentBrains

Create the key from the AgentBrains System Integration → API Keys page in your Control Panel.

  1. Sign in to AgentBrains.
  2. Open API Keys.
  3. Enter a token name.
  4. Choose the expiration date if you need.
  5. Select the scopes needed for the integration.
  6. Create the personal access token for the integration you want to connect.
  7. Copy the generated key immediately and store it in a secure credential manager.
  8. Add it to your target integration, such as n8n credentials, API clients, or MCP configuration.

Important

The generated key is shown only once at creation time. After you reload or leave the page, the same key value cannot be viewed again.

If you manage more than one environment, create separate keys for each environment instead of reusing one token everywhere.

What the key unlocks

Once the credential is added, your external tools can authenticate to AgentBrains services such as:

CapabilityTypical usage
Knowledge Base data accessExact document, category, and attachment retrieval
Semantic retrieval and index-backed searchRAG and AI tool workflows
Webhook registration for live integrationsProduction workflow entry points
Synthetic user execution and scoringQA, regression testing, and monitoring

Best practices

PracticeWhy it helps
Store the token only in a secure credential managerKeeps it out of workflow JSON, prompt text, and code
Use separate keys for sandbox and productionReduces accidental cross-environment access
Rotate keys when ownership or environment changesLimits long-term exposure
Use a custom domain only when neededPrevents misrouting requests to the wrong environment

Common setup pattern

  1. Create the API key in AgentBrains.
  2. Add it to your integration layer of choice.
  3. Reuse that credential consistently instead of copying raw secrets into multiple places.
  4. Test the connection before activating production workflows.

Troubleshooting

Invalid access key or scope

If a node or client returns an authentication error, the most common causes are:

  • the token was copied incorrectly
  • the key belongs to another environment
  • the custom domain points to the wrong AgentBrains environment
  • the key does not match the scope expected by the requested service

Credential test fails

Re-open the credential or integration settings, paste the token again, and confirm the environment or domain value is correct.

On this page