Authentication
Every request to LocusGraph requires an agent secret passed as a Bearer token. The secret identifies which agent is reading and writing your Structured Agent Knowledge graph, so treat it like any other production credential.
Get Your Agent Secret
Go to dashboard.locusgraph.com and sign in.
Navigate to Agents and either create a new agent or select an existing one.
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