agent_id - When set, this key can only be used to ingest logs for
that agent. If a POST /ingest request presents a different agent_id
(at the payload or entry level), the request is rejected with 403 and
detail agent_id does not match the bound key. If the request omits
agent_id entirely, the bound value is used automatically. Keys without
agent_id set are unrestricted, matching prior behavior.
Management writes - A key with agent_id set gets 403 with
reason_codeagent_bound_key_forbidden when it tries to change
governance configuration: creating, updating, deleting or testing
escalation rules and notification channels, updating compliance mappings,
updating agent metadata, deleting action definitions, and reviving a
kill-switch target. It can still call POST /kill-switch/kill, so an agent
can always halt itself. Unbound keys and user sessions are unaffected.
scopes - Permission scopes granted to the key. Defaults to
["ingest"].
expires_at - Optional expiration timestamp. Once passed, the key
fails verification with 401 and detail API key has expired, distinct
from a revoked (deactivated) key.
Use an API key in SDK
from agent_sentinel import enable_remote_syncenable_remote_sync( api_token="as_your_api_key_here", # Use your API key run_id="run-001")
JWT tokens are automatically managed by the web console via Clerk authentication. You don’t need to handle these manually for SDK usage.
When you need a JWT
JWTs are required for:
Accessing the web console
Making API calls from the browser
Programmatic API access (e.g., scripts, CI/CD)
Get a JWT token
Via web console:JWTs are automatically included in all web console requests - no action needed.Programmatic access:If you need a JWT for API scripts, use Clerk’s session tokens:
Log in to the web console
Open browser DevTools → Console
Run:
await window.Clerk.session.getToken()
Copy the token (valid for 1 hour)
JWT expiration
Web console: Tokens auto-refresh - you stay logged in
Programmatic: Tokens expire after 1 hour - regenerate as needed
Best practices
Use API keys for agents: API keys are long-lived and designed for server-side usage. JWTs expire and are meant for user sessions.
Rotate keys regularly: Generate new API keys every 90 days and delete old ones.
Never commit keys to git: Use environment variables or secrets management (AWS Secrets Manager, HashiCorp Vault, etc.).
Use separate keys per environment: Different API keys for dev, staging, and production.
Troubleshooting
“401 Unauthorized”
Verify API key is correct (starts with as_)
Check key is still active (not revoked)
Check key has not passed its expires_at (detail: “API key has expired”)
Ensure you’re using Authorization: Bearer <key> header
“403 agent_id does not match the bound key”
The key is bound to a specific agent_id; the ingest payload (or an
entry within it) specified a different agent_id
Either omit agent_id in the request (the bound value is used
automatically) or use a key that isn’t bound to an agent
“API key not working after creation”
Keys may take up to 30 seconds to propagate
Verify you copied the full key including as_ prefix
Test with a simple API call to verify
See also
Quickstart - Get your first API key and connect to the platform
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Agent Sentinel","colors":{"primary":"#319165","light":"#4abf89","dark":"#2d8059"},"logo":{"light":"https://mintcdn.com/agentsentinel/B1Psb0ktqAcV0f6k/logo/light.svg?fit=max\u0026auto=format\u0026n=B1Psb0ktqAcV0f6k\u0026q=85\u0026s=c3b2e0f29a496f48c8f7c50f2acccc32","dark":"https://mintcdn.com/agentsentinel/B1Psb0ktqAcV0f6k/logo/dark.svg?fit=max\u0026auto=format\u0026n=B1Psb0ktqAcV0f6k\u0026q=85\u0026s=8b61e50f3f15526e26fb1fad9cb27cc8","href":"https://agentsentinel.dev"},"favicon":"https://mintcdn.com/agentsentinel/B1Psb0ktqAcV0f6k/favicon.svg?fit=max\u0026auto=format\u0026n=B1Psb0ktqAcV0f6k\u0026q=85\u0026s=52d30475fb54d414fa922f4d0536e184","appearance":{"default":"light","strict":true},"background":{"color":{"light":"#fbfaf6","dark":"#0d0f12"}},"navbar":{"links":[{"href":"mailto:hello@agentsentinel.dev","label":"Support"}],"primary":{"type":"button","label":"API Reference","href":"/platform/overview"}},"footer":{"socials":{"github":"https://github.com/agent-sentinel/agent-sentinel-sdk","website":"https://agentsentinel.dev"}},"fonts":{"family":"Inter"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/agent-sentinel/agent-sentinel-sdk"},{"anchor":"PyPI","icon":"python","href":"https://pypi.org/project/agentsentinel-sdk/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"agentsentinel","hasAudioNarration":false,"actualSubdomain":"agentsentinel","customDomains":["docs.agentsentinel.dev"],"gitSource":{"type":"github","owner":"agent-sentinel","repo":"agent-sentinel","deployBranch":"main","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{},"buildId":"6ae1afb657e72f17a84ac220","clientVersion":"0.0.4128","searchFilterCounts":[{"language":"default","tag":"Guides","count":55},{"language":"default","tag":"Platform API","count":18},{"language":"default","tag":"SDK (Python)","count":16},{"language":"default","tag":"Web Console","count":14},{"language":"default","tag":"Concepts","count":3},{"language":"default","tag":"AI tools","count":2},{"language":"default","tag":"Getting started","count":2}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"code,pre,kbd,samp,.code-block,.code-block code,.code-group code,.request-example code,.response-example code{font-family:\"JetBrains Mono\",\n ui-monospace,\n SFMono-Regular,\n Menlo,\n Monaco,\n Consolas,\n \"Liberation Mono\",\n \"Courier New\",\n monospace!important}"}],"page":{"pagePath":"platform/auth","slug":"/platform/auth","pageMetadata":{"title":"Authentication","description":"API keys for SDK integration and JWT tokens for web console access.","href":"/platform/auth"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"API keys for SDK integration and JWT tokens for web console access.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,ol:`ol`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Tip,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`The Agent Sentinel platform uses two authentication methods:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`API keys`}),` - For SDK integration (recommended)`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`JWT tokens`}),` - For web console access (automatic via Clerk)`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`Both are passed as HTTP headers:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`2`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Authorization: Bearer \u003ctoken>`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`api-keys-for-sdk`,children:`API keys (for SDK)`}),`\n`,_jsx(_components.p,{children:`API keys are long-lived credentials for authenticating SDK requests to the platform.`}),`\n`,_jsx(Heading,{level:`3`,id:`generate-an-api-key`,children:`Generate an API key`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Via web console (recommended):`})}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Log in to `,_jsx(_components.a,{href:`https://console.agentsentinel.dev`,children:`console.agentsentinel.dev`})]}),`\n`,_jsxs(_components.li,{children:[`Navigate to `,_jsx(_components.strong,{children:`Settings`}),` → `,_jsx(_components.strong,{children:`API Keys`})]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Generate New Key`})]}),`\n`,_jsx(_components.li,{children:`Copy the key immediately (shown only once)`}),`\n`,_jsx(_components.li,{children:`Store it securely (password manager, secrets vault)`}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Via API:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$AGENT_SENTINEL_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/api-keys/\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_JWT_TOKEN\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"name\":\"production-agent\"}'`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`Response:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"key_abc123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"as_a1b2c3d4e5f6...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"key_prefix\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"as_a1b2c3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"production-agent\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"agent_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"scopes\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ingest\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"expires_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created_at\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"2024-12-28T10:00:00Z\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`The full API key value (`,_jsx(_components.code,{children:`as_...`}),`) is only shown once at creation time. Copy and store it immediately - you cannot retrieve it later.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`agent-bound-keys`,children:`Agent-bound keys`}),`\n`,_jsx(_components.p,{children:`A key can optionally be bound to a single agent, scoped, and given an\nexpiry:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$AGENT_SENTINEL_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/api-keys/\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_JWT_TOKEN\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"name\": \"billing-agent-key\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"agent_id\": \"billing-agent\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"scopes\": [\"ingest\"],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"expires_at\": \"2026-12-31T00:00:00Z\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`agent_id`})}),` - When set, this key can only be used to ingest logs for\nthat agent. If a `,_jsx(_components.code,{children:`POST /ingest`}),` request presents a different `,_jsx(_components.code,{children:`agent_id`}),`\n(at the payload or entry level), the request is rejected with `,_jsx(_components.code,{children:`403`}),` and\ndetail `,_jsx(_components.code,{children:`agent_id does not match the bound key`}),`. If the request omits\n`,_jsx(_components.code,{children:`agent_id`}),` entirely, the bound value is used automatically. Keys without\n`,_jsx(_components.code,{children:`agent_id`}),` set are unrestricted, matching prior behavior.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Management writes`}),` - A key with `,_jsx(_components.code,{children:`agent_id`}),` set gets `,_jsx(_components.code,{children:`403`}),` with\n`,_jsx(_components.code,{children:`reason_code`}),` `,_jsx(_components.code,{children:`agent_bound_key_forbidden`}),` when it tries to change\ngovernance configuration: creating, updating, deleting or testing\nescalation rules and notification channels, updating compliance mappings,\nupdating agent metadata, deleting action definitions, and reviving a\nkill-switch target. It can still call `,_jsx(_components.code,{children:`POST /kill-switch/kill`}),`, so an agent\ncan always halt itself. Unbound keys and user sessions are unaffected.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`scopes`})}),` - Permission scopes granted to the key. Defaults to\n`,_jsx(_components.code,{children:`[\"ingest\"]`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:_jsx(_components.code,{children:`expires_at`})}),` - Optional expiration timestamp. Once passed, the key\nfails verification with `,_jsx(_components.code,{children:`401`}),` and detail `,_jsx(_components.code,{children:`API key has expired`}),`, distinct\nfrom a revoked (deactivated) key.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`use-an-api-key-in-sdk`,children:`Use an API key in SDK`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`6`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` agent_sentinel `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` enable_remote_sync`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`enable_remote_sync(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"as_your_api_key_here\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Use your API key`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` run_id`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"run-001\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`manage-api-keys`,children:`Manage API keys`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`List your keys:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$AGENT_SENTINEL_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/api-keys/\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_JWT_TOKEN\"`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Revoke a key:`})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`2`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`2`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` DELETE`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$AGENT_SENTINEL_URL`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/api/v1/api-keys/{key_id}\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_JWT_TOKEN\"`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`jwt-tokens-for-web-console`,children:`JWT tokens (for web console)`}),`\n`,_jsx(_components.p,{children:`JWT tokens are automatically managed by the web console via Clerk authentication. You don’t need to handle these manually for SDK usage.`}),`\n`,_jsx(Heading,{level:`3`,id:`when-you-need-a-jwt`,children:`When you need a JWT`}),`\n`,_jsx(_components.p,{children:`JWTs are required for:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Accessing the web console`}),`\n`,_jsx(_components.li,{children:`Making API calls from the browser`}),`\n`,_jsx(_components.li,{children:`Programmatic API access (e.g., scripts, CI/CD)`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`get-a-jwt-token`,children:`Get a JWT token`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Via web console:`})}),`\n`,_jsx(_components.p,{children:`JWTs are automatically included in all web console requests - no action needed.`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`Programmatic access:`})}),`\n`,_jsx(_components.p,{children:`If you need a JWT for API scripts, use Clerk’s session tokens:`}),`\n`,_jsxs(_components.ol,{children:[`\n`,_jsx(_components.li,{children:`Log in to the web console`}),`\n`,_jsx(_components.li,{children:`Open browser DevTools → Console`}),`\n`,_jsxs(_components.li,{children:[`Run:`,`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`Clerk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`getToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`()`})]}),`\n`]})})}),`\n`]}),`\n`,_jsx(_components.li,{children:`Copy the token (valid for 1 hour)`}),`\n`]}),`\n`,_jsx(Heading,{level:`3`,id:`jwt-expiration`,children:`JWT expiration`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Web console`}),`: Tokens auto-refresh - you stay logged in`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Programmatic`}),`: Tokens expire after 1 hour - regenerate as needed`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`best-practices`,children:`Best practices`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Use API keys for agents`}),`: API keys are long-lived and designed for server-side usage. JWTs expire and are meant for user sessions.`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Rotate keys regularly`}),`: Generate new API keys every 90 days and delete old ones.`]})}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Never commit keys to git`}),`: Use environment variables or secrets management (AWS Secrets Manager, HashiCorp Vault, etc.).`]})}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Use separate keys per environment`}),`: Different API keys for dev, staging, and production.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`troubleshooting`,children:`Troubleshooting`}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`“401 Unauthorized”`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Verify API key is correct (starts with `,_jsx(_components.code,{children:`as_`}),`)`]}),`\n`,_jsx(_components.li,{children:`Check key is still active (not revoked)`}),`\n`,_jsxs(_components.li,{children:[`Check key has not passed its `,_jsx(_components.code,{children:`expires_at`}),` (detail: “API key has expired”)`]}),`\n`,_jsxs(_components.li,{children:[`Ensure you’re using `,_jsx(_components.code,{children:`Authorization: Bearer \u003ckey>`}),` header`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`“403 agent_id does not match the bound key”`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The key is bound to a specific `,_jsx(_components.code,{children:`agent_id`}),`; the ingest payload (or an\nentry within it) specified a different `,_jsx(_components.code,{children:`agent_id`})]}),`\n`,_jsxs(_components.li,{children:[`Either omit `,_jsx(_components.code,{children:`agent_id`}),` in the request (the bound value is used\nautomatically) or use a key that isn’t bound to an agent`]}),`\n`]}),`\n`,_jsx(_components.p,{children:_jsx(_components.strong,{children:`“API key not working after creation”`})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Keys may take up to 30 seconds to propagate`}),`\n`,_jsxs(_components.li,{children:[`Verify you copied the full key including `,_jsx(_components.code,{children:`as_`}),` prefix`]}),`\n`,_jsx(_components.li,{children:`Test with a simple API call to verify`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`see-also`,children:`See also`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/quickstart`,children:`Quickstart`}),` - Get your first API key and connect to the platform`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/console/settings#api-keys`,children:`Settings`}),` - Manage API keys in the web console`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Authentication","description":"API keys for SDK integration and JWT tokens for web console access.","href":"/platform/auth"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"API keys (for SDK)","slug":"api-keys-for-sdk","depth":2,"children":[{"title":"Generate an API key","slug":"generate-an-api-key","depth":3,"children":[]},{"title":"Agent-bound keys","slug":"agent-bound-keys","depth":3,"children":[]},{"title":"Use an API key in SDK","slug":"use-an-api-key-in-sdk","depth":3,"children":[]},{"title":"Manage API keys","slug":"manage-api-keys","depth":3,"children":[]}]},{"title":"JWT tokens (for web console)","slug":"jwt-tokens-for-web-console","depth":2,"children":[{"title":"When you need a JWT","slug":"when-you-need-a-jwt","depth":3,"children":[]},{"title":"Get a JWT token","slug":"get-a-jwt-token","depth":3,"children":[]},{"title":"JWT expiration","slug":"jwt-expiration","depth":3,"children":[]}]},{"title":"Best practices","slug":"best-practices","depth":2,"children":[]},{"title":"Troubleshooting","slug":"troubleshooting","depth":2,"children":[]},{"title":"See also","slug":"see-also","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"agentsentinel","siteName":"Agent Sentinel","title":"Authentication - Agent Sentinel","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-27T11:03:58.521Z","originalFileLocation":"platform/auth.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=\"light\";if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"API keys for SDK integration and JWT tokens for web console access.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Agent Sentinel\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Authentication - Agent Sentinel\">\u003cmeta data-mint-head property=\"og:description\" content=\"API keys for SDK integration and JWT tokens for web console access.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Agent Sentinel\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.agentsentinel.dev/platform/auth\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://agentsentinel.mintlify.site/_mintlify/api/og/v2?division=Platform+API\u0026amp;title=Authentication\u0026amp;description=API+keys+for+SDK+integration+and+JWT+tokens+for+web+console+access.\u0026amp;theme=4d2fad853b271edd6d74c3a5\u0026amp;signature=59baa14cafd8dea6472fcc14717ff9dde8788a412a6a496a4b6726ac1c15e366\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Authentication - Agent Sentinel\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"API keys for SDK integration and JWT tokens for web console access.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://agentsentinel.mintlify.site/_mintlify/api/og/v2?division=Platform+API\u0026amp;title=Authentication\u0026amp;description=API+keys+for+SDK+integration+and+JWT+tokens+for+web+console+access.\u0026amp;theme=4d2fad853b271edd6d74c3a5\u0026amp;signature=59baa14cafd8dea6472fcc14717ff9dde8788a412a6a496a4b6726ac1c15e366\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/agentsentinel/dvQBrORHNLFI1x08/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Agent Sentinel\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#319165\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.agentsentinel.dev/platform/auth\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/platform/auth.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.agentsentinel.dev/#organization\",\"name\":\"Agent Sentinel\",\"url\":\"https://docs.agentsentinel.dev\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/agentsentinel/B1Psb0ktqAcV0f6k/logo/light.svg?fit=max\u0026auto=format\u0026n=B1Psb0ktqAcV0f6k\u0026q=85\u0026s=c3b2e0f29a496f48c8f7c50f2acccc32\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.agentsentinel.dev#website\",\"name\":\"Agent Sentinel\",\"url\":\"https://docs.agentsentinel.dev\",\"publisher\":{\"@id\":\"https://docs.agentsentinel.dev/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.agentsentinel.dev/platform/auth#webpage\",\"url\":\"https://docs.agentsentinel.dev/platform/auth\",\"name\":\"Authentication\",\"description\":\"API keys for SDK integration and JWT tokens for web console access.\",\"dateModified\":\"2026-10-27T11:03:58.521Z\",\"isPartOf\":{\"@id\":\"https://docs.agentsentinel.dev#website\"},\"breadcrumb\":{\"@id\":\"https://docs.agentsentinel.dev/platform/auth#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.agentsentinel.dev/platform/auth#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Platform API\",\"item\":\"https://docs.agentsentinel.dev/platform/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Authentication\",\"item\":\"https://docs.agentsentinel.dev/platform/auth\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.agentsentinel.dev/platform/auth#article\",\"headline\":\"Authentication\",\"name\":\"Authentication\",\"description\":\"API keys for SDK integration and JWT tokens for web console access.\",\"url\":\"https://docs.agentsentinel.dev/platform/auth\",\"mainEntityOfPage\":{\"@id\":\"https://docs.agentsentinel.dev/platform/auth#webpage\"},\"dateModified\":\"2026-10-27T11:03:58.521Z\",\"publisher\":{\"@id\":\"https://docs.agentsentinel.dev/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.agentsentinel.dev#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Agent Sentinel\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Agent Sentinel\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/platform/auth.md","siteName":"Agent Sentinel","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/agent-sentinel/agent-sentinel-sdk"},{"anchor":"PyPI","icon":"python","href":"https://pypi.org/project/agentsentinel-sdk/"}]},"tabs":[{"tab":"Guides","groups":[{"group":"Getting started","pages":[{"title":"Agent Sentinel","href":""},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Concepts","pages":[{"title":"Actions \u0026 runs","href":"/concepts/actions-and-runs"},{"title":"Ledger","href":"/concepts/ledger"},{"title":"Policies","href":"/concepts/policies"}]},{"group":"SDK (Python)","pages":[{"title":"Installation","href":"/sdk/python/installation"},{"title":"Instrumentation","href":"/sdk/python/instrumentation"},{"title":"Policies \u0026 budgets","href":"/sdk/python/policies"},{"title":"Cost Tracking","href":"/sdk/python/cost-tracking"},{"title":"Guardrails","href":"/sdk/python/guardrails"},{"title":"Prose policies","href":"/sdk/python/prose-policies"},{"title":"Remote sync","href":"/sdk/python/remote-sync"},{"title":"Replay","href":"/sdk/python/replay"},{"title":"Interventions","href":"/sdk/python/interventions"},{"title":"Approval Workflows","href":"/sdk/python/approvals"},{"title":"MCP Integration","href":"/sdk/python/mcp"},{"title":"Error Handling","href":"/sdk/python/errors"},{"title":"Retry \u0026 Resilience","href":"/sdk/python/retry-resilience"},{"title":"LLM Integrations","href":"/sdk/python/llm-integrations"},{"title":"Framework Integrations","href":"/sdk/python/framework-integrations"},{"title":"Compliance (Enterprise foundations)","href":"/sdk/python/compliance"}]},{"group":"AI tools","pages":[{"title":"Claude Code setup","icon":"asterisk","href":"/ai-tools/claude-code"},{"title":"Cursor setup","icon":"arrow-pointer","href":"/ai-tools/cursor"}]},{"group":"Platform API","pages":[{"title":"Platform API Overview","description":"The Agent Sentinel cloud platform API for ingesting telemetry and querying data.","href":"/platform/overview"},{"title":"Authentication","href":"/platform/auth"},{"title":"Ingest","description":"Upload SDK ledger entries to the platform.","href":"/platform/ingest"},{"title":"Runs \u0026 actions","href":"/platform/runs"},{"title":"Activity Ledger API","href":"/platform/ledger"},{"title":"Agent Discovery","href":"/platform/agents"},{"title":"Interventions API","href":"/platform/interventions"},{"title":"Approvals API","href":"/platform/approvals"},{"title":"Policies API","href":"/platform/policies"},{"title":"Budget reservations","href":"/platform/budgets"},{"title":"Kill Switch API","href":"/platform/kill-switch"},{"title":"Evals API","href":"/platform/evals"},{"title":"Stats","href":"/platform/stats"},{"title":"Replay (platform)","href":"/platform/replay"},{"title":"MCP (Model Context Protocol)","href":"/platform/mcp"},{"title":"AgentVault Credentials","href":"/platform/agentvault"},{"title":"WebSocket Real-time Updates","href":"/platform/websockets"},{"title":"Compliance (Enterprise foundations)","href":"/platform/compliance"}]},{"group":"Web Console","pages":[{"title":"Web Console Overview","href":"/console/overview"},{"title":"Console Quick Start","href":"/console/quickstart"},{"title":"Interventions Page","href":"/console/interventions"},{"title":"Approvals Page","href":"/console/approvals"},{"title":"Kill Switch","href":"/console/kill-switch"},{"title":"Runs Page","href":"/console/runs"},{"title":"Determinism Analysis","href":"/console/determinism-analysis"},{"title":"Replay Hub","href":"/console/replay"},{"title":"Activity Ledger","href":"/console/ledger"},{"title":"Agents Page","href":"/console/agents"},{"title":"Evals","href":"/console/evals"},{"title":"Analytics Page","href":"/console/analytics"},{"title":"MCP Explorer","href":"/console/mcp"},{"title":"Settings Page","href":"/console/settings"}]}]}]},"basePath":"","title":"Authentication - Agent Sentinel","buildId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","deploymentId":"dpl_5tKr6cUUeuVJdEZ9JAEY3h4soMJ8","dynamics":[],"chunks":[]}