Authentication
Every request to LocusGraph requires an agent secret passed as a Bearer token.
Get Your Agent Secret
1
Open the dashboard
Go to dashboard.locusgraph.com and sign in.
2
Create or select an agent
Navigate to Agents and either create a new agent or select an existing one.
3
Copy the secret
Click Reveal Secret and copy the value. You will only see it once.
Never commit agent secrets to source control. Use environment variables or a secrets manager. Rotate secrets immediately if exposed.
Environment Variables
Set these two variables in your environment:
| Variable | Required | Default |
|---|---|---|
LOCUSGRAPH_AGENT_SECRET | required | — |
LOCUSGRAPH_SERVER_URL | optional | https://api.locusgraph.com |
Bearer Token Format
All API requests use the Authorization header:
Authorization: Bearer <agent-secret>The SDKs handle this automatically when you pass the secret during client initialization. For raw HTTP calls, include the header manually:
curl -H "Authorization: Bearer $LOCUSGRAPH_AGENT_SECRET" \
https://api.locusgraph.com/v1/memories