Generate, configure, and use Security Keys to protect your AgentOS instance with bearer-token authentication
Authorization: Bearer <token>
header for access. Without a key configured, authentication is disabled.
Generate keys through the AgentOS UI, configure them on your server, and use them across development environments, CI/CD pipelines, and production services.
OS_SECURITY_KEY
environment variable where your AgentOS server runs. When present, the server automatically enforces bearer authentication on all API routes.
OS_SECURITY_KEY
into the AgentOS router’s
internal authorization logic. If configured, requests without a valid
Authorization: Bearer
header return 401 Unauthorized
.OS_SECURITY_KEY
environment variable and reload/redeploy AgentOSAuthorization: Bearer <key>
and that the server has OS_SECURITY_KEY
configuredOS_SECURITY_KEY
before starting the application