Agent API-key authentication
EvalGate uses organization-scoped bearer API keys for programmatic access. An API key identifies the organization and key owner, is checked against the scopes granted to that key, and is attributed in usage and audit records. It is not a model-provider credential.Discover the protected resource
Start with the RFC 9728-style metadata document:Authorization header bearer method, and the authorization-server origin.
Follow that link to RFC 8414 metadata for EvalGate’s human-approved RFC 8628
device grant. The grant uses the server-owned public client evalgate-agent;
it does not support dynamic registration or identity assertions. The shared
client ID selects the flow; it does not authenticate or identify the requesting
agent. The signed-in person’s code confirmation, tenant selection, and scope
approval remain the security boundary.
Obtain a key
An authorized organization member can create a key from Developer → API Keys in the EvalGate dashboard. An RFC 8628 client can POST form-encodedclient_id=evalgate-agent and its space-separated scope to
/oauth/device/authorization, then poll /oauth/token with the returned
device code. For JSON-only clients, use the equivalent handoff:
POST /api/agent-setup/startwith a descriptiveclient_nameand the minimumrequested_scopes.- Show the returned
verification_urianduser_codeto a person. - The person signs in with GitHub or Google and approves the displayed organization and scopes.
- Poll
POST /api/agent-setup/pollno faster than the returnedinterval.
Safe test mode
After pickup, call public MCPserver/discover, authenticated tools/list, and
read-only project.plan. Those MCP operations make no model-provider call,
persist no hosted evaluation result, and cannot enable paid overage. See the
MCP request example.
For local checks, evalgate gate --offline blocks EvalGate’s built-in and
configured provider-backed checks unless network use is explicitly enabled.
Custom in-process evaluators remain project code and can still use the network;
hard network denial for wrapped project commands is available only when Linux
unshare succeeds. This is not a production-like sandbox.
Least-privilege scopes
Grant only the scope required by the integration:agent:execute is for controlled product actions, not unrestricted repository
mutation, credential management, billing changes, or arbitrary model execution.
Existing EvalGate API keys and their established product scopes remain
compatible; these three names are reserved for agent-facing integrations.
Use the credential
Send the key as a bearer token on every authenticated request:Errors and discovery hints
An unauthenticated request returns401 Unauthorized with a challenge like:
403 Forbidden with the
standard EvalGate typed error envelope. Request the smallest missing scope from
an authorized organization member; never substitute a provider key or a
session cookie.