documentation/guides/agent/key.md
Agent requires a key for production deployments. Keys are tied to specific OpenAPI documents in the Registry.
Add the key to your API reference configuration:
Scalar.createApiReference('#app', {
sources: [
{
url: 'https://registry.scalar.com/@your-namespace/apis/your-api/latest?format=json',
agent: {
key: 'your-agent-scalar-key',
},
},
],
})
For production, use GitHub Actions to automatically sync your OpenAPI document with the Registry. This ensures your Agent always has the latest API information.