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 path | How the key is used |
|---|---|
| n8n | Stored in the AgentBrains Integration API credential and reused across nodes |
| Direct API usage | Sent in request authentication headers |
| MCP | Used 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.
Recommended flow
- Sign in to AgentBrains.
- Open API Keys.
- Enter a token name.
- Choose the expiration date if you need.
- Select the scopes needed for the integration.
- Create the personal access token for the integration you want to connect.
- Copy the generated key immediately and store it in a secure credential manager.
- 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:
| Capability | Typical usage |
|---|---|
| Knowledge Base data access | Exact document, category, and attachment retrieval |
| Semantic retrieval and index-backed search | RAG and AI tool workflows |
| Webhook registration for live integrations | Production workflow entry points |
| Synthetic user execution and scoring | QA, regression testing, and monitoring |
Best practices
| Practice | Why it helps |
|---|---|
| Store the token only in a secure credential manager | Keeps it out of workflow JSON, prompt text, and code |
| Use separate keys for sandbox and production | Reduces accidental cross-environment access |
| Rotate keys when ownership or environment changes | Limits long-term exposure |
| Use a custom domain only when needed | Prevents misrouting requests to the wrong environment |
Common setup pattern
- Create the API key in AgentBrains.
- Add it to your integration layer of choice.
- Reuse that credential consistently instead of copying raw secrets into multiple places.
- 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.