Install authsome, then either drive it from an AI agent via the skill or use the CLI directly to log in and run agents with injected credentials.
There are two ways to use Authsome day-to-day:
Agent-driven. Install the skill and let your coding agent (Claude Code, Cursor, Codex, etc.) call Authsome on your behalf.
CLI-driven. Run authsome commands yourself from your shell or scripts.
This page covers both. Pick the one that matches how you will actually use it.
Prerequisites
Python 3.13 or newer
A graphical browser on the same machine (for the initial login). For SSH or CI, see Headless setup.
Verify the install
authsome --versionauthsome doctor
doctor runs health checks on the home directory layout, encryption availability, and provider parsing. All checks should pass. For other install paths, see Installation.
When you’re not sure of the right command or flag, read the built-in help before guessing. authsome --help lists every top-level command; authsome <command> --help shows the flags for that command. Agents driving the CLI should consult these before falling back to web search.
Path 1: Agent-driven (recommended)
Install the Authsome skill into your agent. The skill teaches the agent how to call Authsome when it needs credentials. It handles missing credentials, revokes and re-logs in on 401s, asks for --scopes on 403s, and never asks you for tokens directly.See Agent integrations for per-agent install paths (Claude Code, Codex, Cursor, OpenCode, LangChain, LlamaIndex, OpenAI Agents SDK, Anthropic SDK). The pattern across all of them is the same: drop the skill into the agent’s skill / context directory, then ask the agent to perform a task that needs an external service.Sample tasks that exercise the skill:
Star the repo agentrhq/authsome.Get my last five emails from Gmail.Check my Stripe balance.
The agent runs authsome login <provider> itself when it hits a missing credential. The browser opens on your machine for the OAuth consent, then the agent picks up from there with the proxy-injected token. You do not paste any keys.
Path 2: CLI-driven
If you’re scripting against authsome directly or you want to manually pre-seed a credential before launching anything, drive the CLI yourself.Pick one of the two setup tracks below. The first uses GitHub plus OpenAI and produces a runnable demo agent; the second uses Notion via MCP and skips OAuth-app setup entirely.
GitHub + OpenAI (full walkthrough)
Notion via MCP (zero setup)
Register the GitHub OAuth app (first-time setup)
GitHub doesn’t support Dynamic Client Registration, so before your first authsome login github you need to register an OAuth app once. This is a one-time setup.
The Authorization callback URL must be exactly http://127.0.0.1:7998/auth/callback/oauth. Authsome’s PKCE flow listens only on this address; any other value will fail with redirect_uri_mismatch at login time.
Click Register application.
4
Copy the Client ID and generate a Client Secret
GitHub now shows your new app’s settings.
Copy the Client ID.
Click Generate a new client secret and copy the secret immediately.
Save the Client Secret somewhere safe (a password manager) before navigating away. GitHub shows the secret only once. If you lose it, you’ll need to generate another one and update your authsome connection.
You’ll paste both values into authsome’s local browser bridge on the next step. They’re stored encrypted in your vault and reused on every subsequent login. They are never accepted as command-line arguments.
Log in to a provider
1
Run the login command
authsome login github
Authsome opens a local form at http://127.0.0.1:7998 asking for your GitHub OAuth credentials.
2
Paste the Client ID and Client Secret
Paste the values you saved during the OAuth app registration. They’re encrypted and stored locally; you won’t be asked for them again unless you authsome revoke github.
Authsome's local bridge form for GitHub OAuth credentials
3
Approve access on GitHub
A second browser window opens to https://github.com/login/oauth/authorize. Click Authorize to grant the requested scopes (repo and read:user by default). GitHub exchanges the authorization for an OAuth access token, the callback lands on http://127.0.0.1:7998/auth/callback/oauth, and authsome stores the token encrypted in your vault. The terminal prints Successfully logged in to github (default).The stored access token is what later commands inject. client_id and client_secret identify your OAuth app to GitHub; the access token is the user-level credential that makes API calls on your behalf. You don’t need a separate PAT.
4
Confirm the connection
authsome provider list
GitHub should show as connected.
For other providers, see Agent integrations or the per-provider page under OAuth providers. API-key providers like OpenAI don’t need an OAuth app — see the next section.
Add an API-key provider
API-key providers like OpenAI use the same login command, but the flow opens a local form so you can paste the key without it appearing in shell history or process listings.
A minimal agent that uses both credentials you just set up: it stars agentrhq/authsome on GitHub (a small thank-you to the project) and asks OpenAI to write a one-line celebration. The same script works whether you export env vars first or wrap the command with authsome run --. Save it as my_agent.py.
View my_agent.py (Python, standard library only)
# my_agent.py# Stars agentrhq/authsome on GitHub and asks OpenAI to write a one-line# celebration. The same script works whether you eval $(authsome export ...)# first or wrap the command with `authsome run --`. Under the proxy,# the env vars below hold the placeholder `authsome-proxy-managed`;# the proxy substitutes real values in outbound HTTPS to api.github.com# and api.openai.com.import jsonimport osimport urllib.requestdef http(method: str, url: str, token: str, body: dict | None = None) -> dict | None: req = urllib.request.Request( url, method=method, headers={"Authorization": f"Bearer {token}"}, ) if body is not None: req.data = json.dumps(body).encode() req.add_header("Content-Type", "application/json") with urllib.request.urlopen(req) as r: raw = r.read() return json.loads(raw) if raw else None# 1. Star agentrhq/authsome with your GitHub OAuth token.http( "PUT", "https://api.github.com/user/starred/agentrhq/authsome", os.environ["GITHUB_ACCESS_TOKEN"],)print("Starred agentrhq/authsome.")# 2. Ask OpenAI to celebrate the moment.answer = http( "POST", "https://api.openai.com/v1/chat/completions", os.environ["OPENAI_API_KEY"], { "model": "gpt-5", "messages": [ { "role": "user", "content": ( "Write a single playful sentence to celebrate " "that I just starred the authsome credential broker." ), } ], },)print(answer["choices"][0]["message"]["content"])
Zero pip dependencies — just the standard library. Now pick how to give it credentials.
Run behind the auth proxy
Best for production-style agents. Authsome starts a local HTTP proxy that intercepts outbound requests to known provider hosts and injects the auth headers. The child process never sees the raw secret.
authsome run -- python my_agent.py
Inside the child process, OPENAI_API_KEY is set to the placeholder authsome-proxy-managed. The real key is added to outbound requests at the proxy layer.
HTTPS interception requires the mitmproxy CA certificate to be trusted on your machine. See Proxy networking if you see TLS errors.
Notion’s MCP endpoint at mcp.notion.com supports Dynamic Client Registration. You don’t need to create an OAuth app — authsome registers a client for you on first login.
Log in
authsome login notion_dcr
What happens:
1
Authsome registers a client
Authsome POSTs to https://mcp.notion.com/register and Notion’s OIDC server issues a fresh client_id and client_secret. They are stored encrypted in your vault.
2
Approve access in the browser
A browser window opens to https://mcp.notion.com/authorize. Click Authorize to grant access to your Notion workspace. The callback lands on http://127.0.0.1:7998/auth/callback/oauth and the terminal prints Successfully logged in to notion_dcr (default).
3
Confirm the connection
authsome provider list
notion_dcr should show as connected.
That’s the entire setup. No OAuth app to create, no client credentials to paste.
Use the connection
The Notion DCR token authenticates requests to mcp.notion.com, which is an MCP (Model Context Protocol) endpoint, not a REST API. To put the connection to work, wire it into an MCP-aware agent:
Claude Code — add an MCP server entry wrapped in authsome run --.
Per-agent setup: Claude Code, Codex, Cursor, OpenCode, LangChain, and more.
Login flows
Pick the right flow for each provider: PKCE, device code, DCR.
Custom providers
Add any service that authsome doesn’t ship as a bundled provider.
CLI reference
Every command, every flag.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Authsome","description":"Local credential broker for AI agents. Log in once via OAuth2 or API key. Authsome keeps tokens fresh and injects them at runtime.","colors":{"primary":"#10B981","light":"#4EDEA3","dark":"#059669"},"logo":{"light":"https://mintcdn.com/agentr/_F0MkdgJfdcL4uN6/logo/light.svg?fit=max\u0026auto=format\u0026n=_F0MkdgJfdcL4uN6\u0026q=85\u0026s=12677ee405e1ce7b9f26dca217f5cc01","dark":"https://mintcdn.com/agentr/_F0MkdgJfdcL4uN6/logo/dark.svg?fit=max\u0026auto=format\u0026n=_F0MkdgJfdcL4uN6\u0026q=85\u0026s=d406db6cbe78c64bda55168623b9b2f2"},"favicon":"https://mintcdn.com/agentr/_F0MkdgJfdcL4uN6/favicon.svg?fit=max\u0026auto=format\u0026n=_F0MkdgJfdcL4uN6\u0026q=85\u0026s=84b21296801fc5f385ce98328dc8b792","appearance":{"default":"dark","strict":false},"background":{"color":{"light":"#FFFFFF","dark":"#09090B"}},"navbar":{"links":[{"icon":{"style":"brands","name":"discord"},"href":"https://discord.gg/9YP2C9tvMp","label":"Discord"},{"icon":{"style":"brands","name":"python"},"href":"https://pypi.org/project/authsome/","label":"PyPI"}],"primary":{"type":"github","href":"https://github.com/agentrhq/authsome"}},"footer":{"socials":{"github":"https://github.com/agentrhq/authsome","discord":"https://discord.gg/9YP2C9tvMp"},"links":[{"header":"Product","items":[{"label":"Home","href":"https://authsome.ai"},{"label":"GitHub","href":"https://github.com/agentrhq/authsome"},{"label":"PyPI","href":"https://pypi.org/project/authsome"}]},{"header":"Docs","items":[{"label":"Quickstart","href":"/docs/quickstart"},{"label":"CLI reference","href":"/docs/reference/cli"},{"label":"Architecture","href":"/docs/concepts/architecture"},{"label":"llms.txt","href":"/docs/llms.txt"}]},{"header":"Company","items":[{"label":"Agentr","href":"https://agentr.dev"}]}]},"seo":{"metatags":{"canonical":"https://authsome.ai/docs","title-template":"%s · Authsome","og:site_name":"Authsome Docs","og:type":"website","og:description":"Local credential broker for AI agents. Log in once via OAuth2 or API key. Authsome keeps tokens fresh and injects them at runtime.","og:locale":"en_US","twitter:card":"summary_large_image","twitter:site":"@agentrhq","twitter:creator":"@agentrhq"},"indexing":"all"},"banner":{"content":"Authsome is in active development. [Star us on GitHub](https://github.com/agentrhq/authsome) to follow along.","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","cursor"],"display":"header"},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"agentr","hasAudioNarration":false,"actualSubdomain":"agentr","customDomains":["authsome.ai"],"gitSource":{"type":"github","owner":"agentrhq","repo":"authsome","deployBranch":"main","contentDirectory":"docs/site","isPrivate":true,"mountPath":"","label":""},"feedback":{"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ae9576d62209e0b20b73b9a:success","clientVersion":"0.0.4377","searchFilterCounts":[{"language":"default","tag":"Integrations","count":60},{"language":"default","tag":"API-key providers","count":32},{"language":"default","tag":"Guides","count":18},{"language":"default","tag":"Documentation","count":16},{"language":"default","tag":"OAuth providers","count":15},{"language":"default","tag":"Agent frameworks","count":13},{"language":"default","tag":"Reference","count":12},{"language":"default","tag":"Concepts","count":6},{"language":"default","tag":"Troubleshooting","count":6},{"language":"default","tag":"Security","count":4}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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":"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":"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":"turbopuffer-dual-write","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":"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":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"quickstart","slug":"/quickstart","pageMetadata":{"title":"Quickstart","description":"Install authsome, then either drive it from an AI agent via the skill or use the CLI directly to log in and run agents with injected credentials.","href":"/quickstart"},"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: \"Install authsome, then either drive it from an AI agent via the skill or use the CLI directly to log in and run agents with injected credentials.\"\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`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{Accordion,Card,CodeBlock,Columns,Frame,Heading,Note,OptimizedImage,Step,Steps,Tab,Table,Tabs,Tip,Warning}=_components;if(!Accordion)_missingMdxReference(`Accordion`,true);if(!Card)_missingMdxReference(`Card`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Columns)_missingMdxReference(`Columns`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);if(!Tip)_missingMdxReference(`Tip`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`There are two ways to use Authsome day-to-day:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Agent-driven.`}),` Install the skill and let your coding agent (Claude Code, Cursor, Codex, etc.) call Authsome on your behalf.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`CLI-driven.`}),` Run `,_jsx(_components.code,{children:`authsome`}),` commands yourself from your shell or scripts.`]}),`\n`]}),`\n`,_jsx(_components.p,{children:`This page covers both. Pick the one that matches how you will actually use it.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`Python 3.13 or newer`}),`\n`,_jsxs(_components.li,{children:[`A graphical browser on the same machine (for the initial login). For SSH or CI, see `,_jsx(_components.a,{href:`/guides/headless-device-code`,children:`Headless setup`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`verify-the-install`,children:`Verify the install`}),`\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:`authsome`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --version`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`authsome`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` doctor`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`doctor`}),` runs health checks on the home directory layout, encryption availability, and provider parsing. All checks should pass. For other install paths, see `,_jsx(_components.a,{href:`/installation`,children:`Installation`}),`.`]}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`When you’re not sure of the right command or flag, read the built-in help before guessing. `,_jsx(_components.code,{children:`authsome --help`}),` lists every top-level command; `,_jsx(_components.code,{children:`authsome \u003ccommand> --help`}),` shows the flags for that command. Agents driving the CLI should consult these before falling back to web search.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`path-1-agent-driven-recommended`,children:`Path 1: Agent-driven (recommended)`}),`\n`,_jsxs(_components.p,{children:[`Install the Authsome skill into your agent. The skill teaches the agent how to call Authsome when it needs credentials. It handles missing credentials, revokes and re-logs in on 401s, asks for `,_jsx(_components.code,{children:`--scopes`}),` on 403s, and never asks you for tokens directly.`]}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/integrations/agents/index`,children:`Agent integrations`}),` for per-agent install paths (Claude Code, Codex, Cursor, OpenCode, LangChain, LlamaIndex, OpenAI Agents SDK, Anthropic SDK). The pattern across all of them is the same: drop the skill into the agent’s skill / context directory, then ask the agent to perform a task that needs an external service.`]}),`\n`,_jsx(_components.p,{children:`Sample tasks that exercise the skill:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,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:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Star the repo agentrhq/authsome.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Get my last five emails from Gmail.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Check my Stripe balance.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`The agent runs `,_jsx(_components.code,{children:`authsome login \u003cprovider>`}),` itself when it hits a missing credential. The browser opens on your machine for the OAuth consent, then the agent picks up from there with the proxy-injected token. You do not paste any keys.`]}),`\n`,_jsx(Heading,{level:`2`,id:`path-2-cli-driven`,children:`Path 2: CLI-driven`}),`\n`,_jsx(_components.p,{children:`If you’re scripting against authsome directly or you want to manually pre-seed a credential before launching anything, drive the CLI yourself.`}),`\n`,_jsx(_components.p,{children:`Pick one of the two setup tracks below. The first uses GitHub plus OpenAI and produces a runnable demo agent; the second uses Notion via MCP and skips OAuth-app setup entirely.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`GitHub + OpenAI (full walkthrough)`,id:`github-%2B-openai-full-walkthrough`,\"data-child-heading-ids\":`[\"register-the-github-oauth-app-first-time-setup\",\"log-in-to-a-provider\",\"add-an-api-key-provider\",\"run-an-agent-with-injected-credentials\",\"run-behind-the-auth-proxy\"]`,children:[_jsx(Heading,{level:`3`,id:`register-the-github-oauth-app-first-time-setup`,children:`Register the GitHub OAuth app (first-time setup)`}),_jsxs(_components.p,{children:[`GitHub doesn’t support Dynamic Client Registration, so before your first `,_jsx(_components.code,{children:`authsome login github`}),` you need to register an OAuth app once. This is a one-time setup.`]}),_jsxs(Steps,{children:[_jsx(Step,{title:`Open GitHub developer settings`,children:_jsxs(_components.p,{children:[`Visit `,_jsx(_components.a,{href:`https://github.com/settings/developers`,children:`github.com/settings/developers`}),`.`]})}),_jsx(Step,{title:`Click 'New OAuth App'`,children:_jsx(_components.p,{children:`The button sits at the top right of the OAuth Apps list.`})}),_jsxs(Step,{title:`Fill the registration form`,children:[_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Field`}),_jsx(_components.th,{children:`Value`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Application name`}),_jsxs(_components.td,{children:[`Anything memorable, e.g. `,_jsx(_components.code,{children:`authsome (local)`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Homepage URL`}),_jsxs(_components.td,{children:[_jsx(_components.code,{children:`http://localhost:3000`}),` (any URL works; GitHub doesn’t validate it for OAuth functionality)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Application description`}),_jsx(_components.td,{children:`Optional`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Authorization callback URL`}),_jsx(_components.td,{children:_jsx(_components.code,{children:`http://127.0.0.1:7998/auth/callback/oauth`})})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Enable Device Flow`}),_jsx(_components.td,{children:`☑ check it on`})]})]})]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Authorization callback URL`}),` must be exactly `,_jsx(_components.code,{children:`http://127.0.0.1:7998/auth/callback/oauth`}),`. Authsome’s PKCE flow listens only on this address; any other value will fail with `,_jsx(_components.code,{children:`redirect_uri_mismatch`}),` at login time.`]})}),_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Register application`}),`.`]})]}),_jsxs(Step,{title:`Copy the Client ID and generate a Client Secret`,children:[_jsx(_components.p,{children:`GitHub now shows your new app’s settings.`}),_jsxs(_components.ol,{children:[`\n`,_jsxs(_components.li,{children:[`Copy the `,_jsx(_components.strong,{children:`Client ID`}),`.`]}),`\n`,_jsxs(_components.li,{children:[`Click `,_jsx(_components.strong,{children:`Generate a new client secret`}),` and copy the secret immediately.`]}),`\n`]}),_jsx(Warning,{children:_jsxs(_components.p,{children:[`Save the `,_jsx(_components.strong,{children:`Client Secret`}),` somewhere safe (a password manager) before navigating away. GitHub shows the secret only once. If you lose it, you’ll need to generate another one and update your authsome connection.`]})})]})]}),_jsx(_components.p,{children:`You’ll paste both values into authsome’s local browser bridge on the next step. They’re stored encrypted in your vault and reused on every subsequent login. They are never accepted as command-line arguments.`}),_jsx(Heading,{level:`3`,id:`log-in-to-a-provider`,children:`Log in to a provider`}),_jsxs(Steps,{children:[_jsxs(Step,{title:`Run the login command`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`authsome`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` login`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` github`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Authsome opens a local form at `,_jsx(_components.code,{children:`http://127.0.0.1:7998`}),` asking for your GitHub OAuth credentials.`]})]}),_jsxs(Step,{title:`Paste the Client ID and Client Secret`,children:[_jsxs(_components.p,{children:[`Paste the values you saved during the OAuth app registration. They’re encrypted and stored locally; you won’t be asked for them again unless you `,_jsx(_components.code,{children:`authsome revoke github`}),`.`]}),_jsx(Frame,{caption:`Authsome's local bridge form for GitHub OAuth credentials`,children:_jsx(OptimizedImage,{src:`https://mintcdn.com/agentr/giu3ZFKl5_0srdkk/images/login-github-authsome.png?fit=max\u0026auto=format\u0026n=giu3ZFKl5_0srdkk\u0026q=85\u0026s=f0b1549828a6275e58d459468b0e3697`,alt:`Authsome local browser form prompting for GitHub Client ID and Client Secret`,\"data-og-width\":`1260`,width:`1260`,\"data-og-height\":`1478`,height:`1478`,\"data-path\":`images/login-github-authsome.png`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/agentr/giu3ZFKl5_0srdkk/images/login-github-authsome.png?w=280\u0026fit=max\u0026auto=format\u0026n=giu3ZFKl5_0srdkk\u0026q=85\u0026s=7602ea098e7b37ca31d37451bbd52f80 280w, https://mintcdn.com/agentr/giu3ZFKl5_0srdkk/images/login-github-authsome.png?w=560\u0026fit=max\u0026auto=format\u0026n=giu3ZFKl5_0srdkk\u0026q=85\u0026s=3ca9dbf605ce7c1fe4ec7a98b78d3593 560w, https://mintcdn.com/agentr/giu3ZFKl5_0srdkk/images/login-github-authsome.png?w=840\u0026fit=max\u0026auto=format\u0026n=giu3ZFKl5_0srdkk\u0026q=85\u0026s=38073a2b4bfdcaf591cb22c9e2d196b8 840w, https://mintcdn.com/agentr/giu3ZFKl5_0srdkk/images/login-github-authsome.png?w=1100\u0026fit=max\u0026auto=format\u0026n=giu3ZFKl5_0srdkk\u0026q=85\u0026s=58bf788fa3df89114ff705b3438c1413 1100w, https://mintcdn.com/agentr/giu3ZFKl5_0srdkk/images/login-github-authsome.png?w=1650\u0026fit=max\u0026auto=format\u0026n=giu3ZFKl5_0srdkk\u0026q=85\u0026s=49ee0376a7abdf78b2c3d368f9113cd2 1650w, https://mintcdn.com/agentr/giu3ZFKl5_0srdkk/images/login-github-authsome.png?w=2500\u0026fit=max\u0026auto=format\u0026n=giu3ZFKl5_0srdkk\u0026q=85\u0026s=f01ce83ecb4630e5c7b7393ead620004 2500w`})})]}),_jsxs(Step,{title:`Approve access on GitHub`,children:[_jsxs(_components.p,{children:[`A second browser window opens to `,_jsx(_components.code,{children:`https://github.com/login/oauth/authorize`}),`. Click `,_jsx(_components.strong,{children:`Authorize`}),` to grant the requested scopes (`,_jsx(_components.code,{children:`repo`}),` and `,_jsx(_components.code,{children:`read:user`}),` by default). GitHub exchanges the authorization for an OAuth access token, the callback lands on `,_jsx(_components.code,{children:`http://127.0.0.1:7998/auth/callback/oauth`}),`, and authsome stores the token encrypted in your vault. The terminal prints `,_jsx(_components.code,{children:`Successfully logged in to github (default).`})]}),_jsxs(_components.p,{children:[`The stored access token is what later commands inject. `,_jsx(_components.code,{children:`client_id`}),` and `,_jsx(_components.code,{children:`client_secret`}),` identify your OAuth app to GitHub; the access token is the user-level credential that makes API calls on your behalf. You don’t need a separate PAT.`]})]}),_jsxs(Step,{title:`Confirm the connection`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`authsome`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` provider`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`GitHub should show as `,_jsx(_components.code,{children:`connected`}),`.`]})]})]}),_jsxs(_components.p,{children:[`For other providers, see `,_jsx(_components.a,{href:`/integrations/agents/index`,children:`Agent integrations`}),` or the per-provider page under `,_jsx(_components.a,{href:`/integrations/oauth/index`,children:`OAuth providers`}),`. API-key providers like OpenAI don’t need an OAuth app — see the next section.`]}),_jsx(Heading,{level:`3`,id:`add-an-api-key-provider`,children:`Add an API-key provider`}),_jsx(_components.p,{children:`API-key providers like OpenAI use the same login command, but the flow opens a local form so you can paste the key without it appearing in shell history or process listings.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`authsome`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` login`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` openai`})]}),`\n`]})})}),_jsx(_components.p,{children:`Verify the key was captured:`}),_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:`authsome`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` connections`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` inspect`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` openai`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --field`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` status`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# → connected`})}),`\n`]})})}),_jsx(Heading,{level:`3`,id:`run-an-agent-with-injected-credentials`,children:`Run an agent with injected credentials`}),_jsxs(_components.p,{children:[`A minimal agent that uses both credentials you just set up: it stars `,_jsx(_components.code,{children:`agentrhq/authsome`}),` on GitHub (a small thank-you to the project) and asks OpenAI to write a one-line celebration. The same script works whether you export env vars first or wrap the command with `,_jsx(_components.code,{children:`authsome run --`}),`. Save it as `,_jsx(_components.code,{children:`my_agent.py`}),`.`]}),_jsx(Accordion,{title:`View my_agent.py (Python, standard library only)`,icon:`file-code`,id:`view-my-agent-py-python-standard-library-only`,children:_jsx(CodeBlock,{filename:``,numberOfLines:`51`,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:`51`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# my_agent.py`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Stars agentrhq/authsome on GitHub and asks OpenAI to write a one-line`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# celebration. The same script works whether you eval $(authsome export ...)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"# first or wrap the command with `authsome run --`. Under the proxy,\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"# the env vars below hold the placeholder `authsome-proxy-managed`;\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# the proxy substitutes real values in outbound HTTPS to api.github.com`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# and api.openai.com.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` urllib.request`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` http`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`method`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`url`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`str`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`body`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`dict`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) -> `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:`dict`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` |`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` req `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` urllib.request.Request(`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` url,`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` method`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`method,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`token`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` body `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`is`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` not`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` req.data `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json.dumps(body).encode()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` req.add_header(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` urllib.request.urlopen(req) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` r:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` raw `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` r.read()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json.loads(raw) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` raw `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`else`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` None`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Star agentrhq/authsome with your GitHub OAuth token.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`http(`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"PUT\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.github.com/user/starred/agentrhq/authsome\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GITHUB_ACCESS_TOKEN\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Starred agentrhq/authsome.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Ask OpenAI to celebrate the moment.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`answer `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` http(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api.openai.com/v1/chat/completions\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OPENAI_API_KEY\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gpt-5\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: (`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Write a single playful sentence to celebrate \"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"that I just starred the authsome credential broker.\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ),`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(answer[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"choices\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`]})})})}),_jsx(_components.p,{children:`Zero pip dependencies — just the standard library. Now pick how to give it credentials.`}),_jsx(Heading,{level:`4`,id:`run-behind-the-auth-proxy`,children:`Run behind the auth proxy`}),_jsx(_components.p,{children:`Best for production-style agents. Authsome starts a local HTTP proxy that intercepts outbound requests to known provider hosts and injects the auth headers. The child process never sees the raw secret.`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`authsome`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` run`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` --`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` python`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` my_agent.py`})]}),`\n`]})})}),_jsxs(_components.p,{children:[`Inside the child process, `,_jsx(_components.code,{children:`OPENAI_API_KEY`}),` is set to the placeholder `,_jsx(_components.code,{children:`authsome-proxy-managed`}),`. The real key is added to outbound requests at the proxy layer.`]}),_jsx(Note,{children:_jsxs(_components.p,{children:[`HTTPS interception requires the mitmproxy CA certificate to be trusted on your machine. See `,_jsx(_components.a,{href:`/troubleshooting/proxy-networking`,children:`Proxy networking`}),` if you see TLS errors.`]})})]}),_jsxs(Tab,{title:`Notion via MCP (zero setup)`,id:`notion-via-mcp-zero-setup`,\"data-child-heading-ids\":`[\"log-in\",\"use-the-connection\"]`,children:[_jsxs(_components.p,{children:[`Notion’s MCP endpoint at `,_jsx(_components.code,{children:`mcp.notion.com`}),` supports Dynamic Client Registration. You don’t need to create an OAuth app — authsome registers a client for you on first login.`]}),_jsx(Heading,{level:`3`,id:`log-in`,children:`Log in`}),_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`authsome`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` login`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` notion_dcr`})]}),`\n`]})})}),_jsx(_components.p,{children:`What happens:`}),_jsxs(Steps,{children:[_jsx(Step,{title:`Authsome registers a client`,children:_jsxs(_components.p,{children:[`Authsome POSTs to `,_jsx(_components.code,{children:`https://mcp.notion.com/register`}),` and Notion’s OIDC server issues a fresh `,_jsx(_components.code,{children:`client_id`}),` and `,_jsx(_components.code,{children:`client_secret`}),`. They are stored encrypted in your vault.`]})}),_jsx(Step,{title:`Approve access in the browser`,children:_jsxs(_components.p,{children:[`A browser window opens to `,_jsx(_components.code,{children:`https://mcp.notion.com/authorize`}),`. Click `,_jsx(_components.strong,{children:`Authorize`}),` to grant access to your Notion workspace. The callback lands on `,_jsx(_components.code,{children:`http://127.0.0.1:7998/auth/callback/oauth`}),` and the terminal prints `,_jsx(_components.code,{children:`Successfully logged in to notion_dcr (default).`})]})}),_jsxs(Step,{title:`Confirm the connection`,children:[_jsx(CodeBlock,{filename:``,numberOfLines:`1`,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:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`authsome`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` provider`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`]})})}),_jsxs(_components.p,{children:[_jsx(_components.code,{children:`notion_dcr`}),` should show as `,_jsx(_components.code,{children:`connected`}),`.`]})]})]}),_jsx(_components.p,{children:`That’s the entire setup. No OAuth app to create, no client credentials to paste.`}),_jsx(Heading,{level:`3`,id:`use-the-connection`,children:`Use the connection`}),_jsxs(_components.p,{children:[`The Notion DCR token authenticates requests to `,_jsx(_components.code,{children:`mcp.notion.com`}),`, which is an MCP (Model Context Protocol) endpoint, not a REST API. To put the connection to work, wire it into an MCP-aware agent:`]}),_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/integrations/agents/claude-code`,children:`Claude Code`}),` — add an MCP server entry wrapped in `,_jsx(_components.code,{children:`authsome run --`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/integrations/agents/cursor`,children:`Cursor`}),` — same pattern in Cursor’s MCP config.`]}),`\n`,_jsxs(_components.li,{children:[`See `,_jsx(_components.a,{href:`/integrations/oauth/notion-dcr`,children:`Notion (DCR)`}),` for the per-provider details.`]}),`\n`]}),_jsxs(_components.p,{children:[`For a runnable Python demo, switch to the `,_jsx(_components.strong,{children:`GitHub + OpenAI`}),` tab above. The MCP protocol requires a client library beyond the scope of the quickstart.`]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`when-things-go-wrong`,children:`When things go wrong`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`401 / 403 from a provider.`}),` See `,_jsx(_components.a,{href:`/troubleshooting/auth-errors`,children:`Authentication errors`}),` for the recovery decision tree.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Install or layout issues.`}),` Run `,_jsx(_components.code,{children:`authsome doctor`}),`, then check `,_jsx(_components.a,{href:`/troubleshooting/doctor`,children:`Diagnose with doctor`}),`.`]}),`\n`,_jsxs(_components.li,{children:[_jsxs(_components.strong,{children:[`TLS errors during `,_jsx(_components.code,{children:`authsome run`}),`.`]}),` See `,_jsx(_components.a,{href:`/troubleshooting/proxy-networking`,children:`Proxy networking`}),`.`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`next-steps`,children:`Next steps`}),`\n`,_jsxs(Columns,{cols:2,children:[_jsx(Card,{title:`Agent integrations`,icon:`robot`,href:`/integrations/agents/index`,children:_jsx(_components.p,{children:`Per-agent setup: Claude Code, Codex, Cursor, OpenCode, LangChain, and more.`})}),_jsx(Card,{title:`Login flows`,icon:`right-to-bracket`,href:`/guides/login-with-oauth`,children:_jsx(_components.p,{children:`Pick the right flow for each provider: PKCE, device code, DCR.`})}),_jsx(Card,{title:`Custom providers`,icon:`puzzle-piece`,href:`/guides/custom-providers`,children:_jsx(_components.p,{children:`Add any service that authsome doesn’t ship as a bundled provider.`})}),_jsx(Card,{title:`CLI reference`,icon:`terminal`,href:`/reference/cli`,children:_jsx(_components.p,{children:`Every command, every flag.`})})]})]})}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":"Quickstart","description":"Install authsome, then either drive it from an AI agent via the skill or use the CLI directly to log in and run agents with injected credentials.","href":"/quickstart"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Verify the install","slug":"verify-the-install","depth":2,"children":[]},{"title":"Path 1: Agent-driven (recommended)","slug":"path-1-agent-driven-recommended","depth":2,"children":[]},{"title":"Path 2: CLI-driven","slug":"path-2-cli-driven","depth":2,"children":[{"title":"Register the GitHub OAuth app (first-time setup)","slug":"register-the-github-oauth-app-first-time-setup","depth":3,"children":[],"tabId":"github-%2B-openai-full-walkthrough"},{"title":"Log in to a provider","slug":"log-in-to-a-provider","depth":3,"children":[],"tabId":"github-%2B-openai-full-walkthrough"},{"title":"Add an API-key provider","slug":"add-an-api-key-provider","depth":3,"children":[],"tabId":"github-%2B-openai-full-walkthrough"},{"title":"Run an agent with injected credentials","slug":"run-an-agent-with-injected-credentials","depth":3,"children":[],"tabId":"github-%2B-openai-full-walkthrough"},{"title":"Run behind the auth proxy","slug":"run-behind-the-auth-proxy","depth":4,"children":[],"tabId":"github-%2B-openai-full-walkthrough"},{"title":"Log in","slug":"log-in","depth":3,"children":[],"tabId":"notion-via-mcp-zero-setup"},{"title":"Use the connection","slug":"use-the-connection","depth":3,"children":[],"tabId":"notion-via-mcp-zero-setup"}]},{"title":"When things go wrong","slug":"when-things-go-wrong","depth":2,"children":[]},{"title":"Next steps","slug":"next-steps","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"agentr","siteName":"Authsome","title":"Quickstart - Authsome","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-06-16T21:40:17.382Z","originalFileLocation":"quickstart.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;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=\"dark\"}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=\"Install authsome, then either drive it from an AI agent via the skill or use the CLI directly to log in and run agents with injected credentials.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Authsome\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_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=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Quickstart - Authsome\">\u003cmeta data-mint-head property=\"og:description\" content=\"Local credential broker for AI agents. Log in once via OAuth2 or API key. Authsome keeps tokens fresh and injects them at runtime.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Authsome Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://authsome.ai/docs/quickstart\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://agentr.mintlify.site/docs/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Quickstart\u0026amp;description=Install+authsome%2C+then+either+drive+it+from+an+AI+agent+via+the+skill+or+use+the+CLI+directly+to+log+in+and+run+agents+with+injected+credentials.\u0026amp;theme=6116544e01c3d96e58dae46e\u0026amp;signature=1fccfdf1ed798ce17fa223fdd2b0511f5ecd2fab4b3370878353361d22652fec\">\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=\"Quickstart - Authsome\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Local credential broker for AI agents. Log in once via OAuth2 or API key. Authsome keeps tokens fresh and injects them at runtime.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://agentr.mintlify.site/docs/_mintlify/api/og/v2?division=Get+started\u0026amp;title=Quickstart\u0026amp;description=Install+authsome%2C+then+either+drive+it+from+an+AI+agent+via+the+skill+or+use+the+CLI+directly+to+log+in+and+run+agents+with+injected+credentials.\u0026amp;theme=6116544e01c3d96e58dae46e\u0026amp;signature=1fccfdf1ed798ce17fa223fdd2b0511f5ecd2fab4b3370878353361d22652fec\">\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=\"/docs/mintlify-assets/_mintlify/favicons/agentr/4x6e4A5IWrJAuFr2/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Authsome\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#10B981\">\u003cmeta data-mint-head name=\"og:locale\" content=\"en_US\">\u003cmeta data-mint-head name=\"title-template\" content=\"%s · Authsome\">\u003cmeta data-mint-head name=\"twitter:creator\" content=\"@agentrhq\">\u003clink data-mint-head rel=\"canonical\" href=\"https://authsome.ai/docs/quickstart\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/quickstart.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://authsome.ai/#organization\",\"name\":\"Authsome\",\"url\":\"https://authsome.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/agentr/_F0MkdgJfdcL4uN6/logo/light.svg?fit=max\u0026auto=format\u0026n=_F0MkdgJfdcL4uN6\u0026q=85\u0026s=12677ee405e1ce7b9f26dca217f5cc01\"}},{\"@type\":\"WebSite\",\"@id\":\"https://authsome.ai/docs#website\",\"name\":\"Authsome\",\"url\":\"https://authsome.ai/docs\",\"publisher\":{\"@id\":\"https://authsome.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://authsome.ai/docs/quickstart#webpage\",\"url\":\"https://authsome.ai/docs/quickstart\",\"name\":\"Quickstart\",\"description\":\"Install authsome, then either drive it from an AI agent via the skill or use the CLI directly to log in and run agents with injected credentials.\",\"dateModified\":\"2026-06-16T21:40:17.382Z\",\"isPartOf\":{\"@id\":\"https://authsome.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://authsome.ai/docs/quickstart#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://authsome.ai/docs/quickstart#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Get started\",\"item\":\"https://authsome.ai/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Quickstart\",\"item\":\"https://authsome.ai/docs/quickstart\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://authsome.ai/docs/quickstart#article\",\"headline\":\"Quickstart\",\"name\":\"Quickstart\",\"description\":\"Install authsome, then either drive it from an AI agent via the skill or use the CLI directly to log in and run agents with injected credentials.\",\"url\":\"https://authsome.ai/docs/quickstart\",\"mainEntityOfPage\":{\"@id\":\"https://authsome.ai/docs/quickstart#webpage\"},\"dateModified\":\"2026-06-16T21:40:17.382Z\",\"publisher\":{\"@id\":\"https://authsome.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://authsome.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Authsome\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Authsome\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/quickstart.md","siteName":"Authsome","nav":{"global":null,"tabs":[{"tab":"Documentation","icon":"book-open","groups":[{"group":"Get started","icon":"rocket","pages":[{"title":"Introduction","href":""},{"title":"Installation","sidebarTitle":"Installation","description":"Install authsome with uv, pip, or run it one-off with uvx. No build step, no system dependencies beyond Python 3.13.","icon":"download","href":"/installation"},{"title":"Quickstart","href":"/quickstart"}]},{"group":"Concepts","icon":"lightbulb","pages":[{"title":"Architecture","description":"How Authsome separates identity, storage, and authentication.","href":"/concepts/architecture"},{"title":"Credential storage","href":"/concepts/credential-storage"},{"title":"Proxy injection","href":"/concepts/proxy-injection"},{"title":"Provider registry","href":"/concepts/provider-registry"},{"title":"Principal, Vault, and Identity","sidebarTitle":"Principal, Vault, \u0026 Identity","icon":"users","href":"/concepts/principal-vault-identity"},{"title":"The local daemon","sidebarTitle":"The local daemon","icon":"server","href":"/concepts/the-daemon"}]},{"group":"Security","icon":"shield-halved","pages":[{"title":"Threat model","sidebarTitle":"Threat model","icon":"shield-halved","href":"/security/threat-model"},{"title":"Encryption at rest","sidebarTitle":"Encryption at rest","icon":"lock","href":"/security/encryption"},{"title":"Daemon trust boundary","sidebarTitle":"Daemon trust boundary","icon":"shield","href":"/security/daemon-trust-boundary"},{"title":"Responsible disclosure","sidebarTitle":"Disclosure","icon":"envelope","href":"/security/disclosure"}]},{"group":"Project","icon":"compass","pages":[{"title":"Roadmap","sidebarTitle":"Roadmap","icon":"map","href":"/roadmap"},{"title":"Changelog","sidebarTitle":"Changelog","icon":"clock-rotate-left","href":"/changelog"},{"title":"Compared to alternatives","sidebarTitle":"Compared to alternatives","icon":"scale-balanced","href":"/compared"}]}]},{"tab":"Guides","icon":"book","pages":[{"title":"Guides","href":"/guides/login-with-oauth"}]},{"tab":"Reference","icon":"code","pages":[{"title":"Reference","href":"/reference/cli"}]},{"tab":"Integrations","icon":"plug","pages":[{"title":"Integrations","href":"/integrations/agents"}]}]},"basePath":"","title":"Quickstart - Authsome","deploymentId":"dpl_DPZjiNpvAcGiwobuijLfKPtJL4Ux","buildId":"dpl_DPZjiNpvAcGiwobuijLfKPtJL4Ux","dynamics":["10e4515597","07c022d89b","a74be98ba7"],"chunks":["BannerMarkdown-DH1hV6MN.js","dist-CnoXsf9u.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js","Frame-C7Jix0Cd.js","DynamicMarkdown-Ch7bkVSN.js","zoom-image-lightbox--vtrM0yu.js","lightbox-handle-r17bVUz3.js"]}