Skip to main content
AgentOS supports bearer-token authentication to secure your API endpoints and protect your agentic systems from unauthorized access.

Authentication Methods

When a Security Key is configured, all API routes require an Authorization: Bearer <token> header for access. Without a key configured, authentication is disabled and all endpoints are publicly accessible.

Using Bearer Token Authentication

Include the authorization header in your API requests:
curl --location 'http://localhost:7777/agents/my-agent/runs' \
    --header 'Authorization: Bearer your-secret-key' \
    --header 'Content-Type: application/x-www-form-urlencoded' \
    --data-urlencode 'message=Your query here'

Configuration

Set your security key when initializing AgentOS or through the configuration file. See the AgentOS Security guide for detailed setup instructions.

Developer Resources