Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.
Agents that run in your hosted workspace, the ones you start from the console, need their model provider’s key. Running your own agent in the workspace is in private beta; see Hosted workspace. You set the key from a shell where it is exported. It never goes through a form or a command argument.
export OPENAI_API_KEY=... # already in your shellancha secrets set OPENAI_API_KEY # or ANTHROPIC_API_KEY, OPENROUTER_API_KEYancha secrets list
The value is stored on your workspace’s disk and given to attempts of agents that declare that provider when you connect them. Setting or removing a variable restarts the workspace’s processes; give it a few seconds.
Command
Does
ancha secrets set NAME...
Copies each named variable from your shell into the workspace.
ancha secrets list
Prints the names, never the values.
ancha secrets unset NAME
Removes one variable.
Names are upper snake case, up to 64 characters. You must be signed in with ancha login, or have ANCHA_SERVER_URL and ANCHA_API_KEY set. See ancha secrets.
Workspace secrets, for agents that declare that provider.
ancha run on your computer, even when signed in
The names you list in agent.pass_env or --pass-env, taken from your own shell. Workspace secrets are not used.
ancha run in CI
The names you pass from the CI job’s environment. See CI.
Model calls are billed by your provider.
Was this page helpful?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Ancha","description":"Ancha runs your AI agent against stateful replicas of Slack, GitHub, Datadog and 35 other tools, grades each attempt with checks, and shows why it failed.","colors":{"primary":"#D97757","light":"#E4A089","dark":"#BF5F3E"},"logo":{"light":"https://mintcdn.com/ancha/ZjGIZQH_u9HX5PNO/logo/light.svg?fit=max\u0026auto=format\u0026n=ZjGIZQH_u9HX5PNO\u0026q=85\u0026s=6c9f535dd10609a27c36a19f4f940fa0","dark":"https://mintcdn.com/ancha/ZjGIZQH_u9HX5PNO/logo/dark.svg?fit=max\u0026auto=format\u0026n=ZjGIZQH_u9HX5PNO\u0026q=85\u0026s=02796be1ceddb3986a2b1c6daee56037"},"favicon":"https://mintcdn.com/ancha/ZjGIZQH_u9HX5PNO/favicon.svg?fit=max\u0026auto=format\u0026n=ZjGIZQH_u9HX5PNO\u0026q=85\u0026s=cf64640c525c28dc49200f844b5c871d","background":{"color":{"light":"#FAF9F5","dark":"#1F1E1D"}},"navbar":{"links":[{"href":"https://app.ancha.io/login","label":"Sign in"}],"primary":{"type":"button","label":"Book a demo","href":"https://cal.com/patrick-liu-me8bzn/30min"}},"footer":{"links":[{"header":"Ancha","items":[{"label":"ancha.io","href":"https://ancha.io"}]}]},"seo":{"metatags":{"canonical":"https://docs.ancha.io"}},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"markdown":{"instructions":"These docs describe the Ancha CLI, npm package @ancha-labs/cli version 0.1.4, and the hosted workspace at app.ancha.io. Coding agents should start at https://docs.ancha.io/coding-agents. Run the CLI as `ancha` after `npm install -g @ancha-labs/cli`, or as `npx -y @ancha-labs/cli@0.1.4` without installing. Pass --json for machine-readable output, or set ANCHA_JSON=1. Every command ends with a `next:` line naming the next command. Exit codes: 0 pass, 1 a check failed or a comparison regressed, 2 usage, config or authentication error, 3 infrastructure error, 4 unimplemented endpoint with --strict."},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"ancha","hasAudioNarration":false,"actualSubdomain":"ancha","customDomains":["docs.ancha.io"],"gitSource":{"type":"github","owner":"liup6424","repo":"ancha_docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":"","_id":"6ae51618e1815328ced9e523"},"chroma":{"latestBuiltDeploymentHistoryId":"6ae7defcb26903148c761ef1","collectionId":"5f99c854-e4e7-4fc1-a535-9ef471a69a63","liveDeploymentHistoryId":"6ae7defcb26903148c761ef1","schemaVersion":"v3"},"feedback":{"thumbs":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae7e0dd462364bde4912993","clientVersion":"0.0.4044","searchFilterCounts":[{"language":"default","tag":"CLI","count":33},{"language":"default","tag":"Tools","count":31},{"language":"default","tag":"Test loop","count":10},{"language":"default","tag":"Engineering and operations","count":9},{"language":"default","tag":"Revenue and commerce","count":8},{"language":"default","tag":"Communication and documents","count":7},{"language":"default","tag":"Servers and sandboxes","count":5},{"language":"default","tag":"Cloud","count":5},{"language":"default","tag":"Concepts","count":5},{"language":"default","tag":"Reference","count":5}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableContextualStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"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":"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":"llms-txt-v2","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":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[],"page":{"pagePath":"cloud/secrets","slug":"/cloud/secrets","pageMetadata":{"title":"Secrets","description":"Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.","icon":"lock","href":"/cloud/secrets"},"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: \"Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,..._provideComponents(),...props.components},{CodeBlock,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`Agents that run in your hosted workspace, the ones you start from the console, need their model provider’s key. Running your own agent in the workspace is in private beta; see `,_jsx(_components.a,{href:`/cloud/overview`,children:`Hosted workspace`}),`. You set the key from a shell where it is exported. It never goes through a form or a command argument.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`3`,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:`3`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OPENAI_API_KEY`}),_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:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# already in your shell`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ancha`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secrets`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` set`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` OPENAI_API_KEY`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # or ANTHROPIC_API_KEY, OPENROUTER_API_KEY`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`ancha`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` secrets`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` list`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The value is stored on your workspace’s disk and given to attempts of agents that declare that provider when you connect them. Setting or removing a variable restarts the workspace’s processes; give it a few seconds.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Command`}),_jsx(_components.th,{children:`Does`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ancha secrets set NAME...`})}),_jsx(_components.td,{children:`Copies each named variable from your shell into the workspace.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ancha secrets list`})}),_jsx(_components.td,{children:`Prints the names, never the values.`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ancha secrets unset NAME`})}),_jsx(_components.td,{children:`Removes one variable.`})]})]})]}),`\n`,_jsxs(_components.p,{children:[`Names are upper snake case, up to 64 characters. You must be signed in with `,_jsx(_components.code,{children:`ancha login`}),`, or have `,_jsx(_components.code,{children:`ANCHA_SERVER_URL`}),` and `,_jsx(_components.code,{children:`ANCHA_API_KEY`}),` set. See `,_jsx(_components.a,{href:`/cli/secrets`,children:_jsx(_components.code,{children:`ancha secrets`})}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`which-runs-use-them`,children:`Which runs use them`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Run`}),_jsx(_components.th,{children:`Where the agent gets keys`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.strong,{children:`Run tasks`}),` in the console`]}),_jsx(_components.td,{children:`Workspace secrets, for agents that declare that provider.`})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ancha run`}),` on your computer, even when signed in`]}),_jsxs(_components.td,{children:[`The names you list in `,_jsx(_components.code,{children:`agent.pass_env`}),` or `,_jsx(_components.code,{children:`--pass-env`}),`, taken from your own shell. Workspace secrets are not used.`]})]}),_jsxs(_components.tr,{children:[_jsxs(_components.td,{children:[_jsx(_components.code,{children:`ancha run`}),` in CI`]}),_jsxs(_components.td,{children:[`The names you pass from the CI job’s environment. See `,_jsx(_components.a,{href:`/cloud/ci`,children:`CI`}),`.`]})]})]})]}),`\n`,_jsx(_components.p,{children:`Model calls are billed by your provider.`})]})}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":"Secrets","description":"Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.","icon":"lock","href":"/cloud/secrets"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Which runs use them","slug":"which-runs-use-them","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"ancha","siteName":"Ancha","title":"Secrets - Ancha","relatedPagesConfig":{"enabled":true,"limit":5,"mode":"automatic"},"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-31T23:03:45.662Z","originalFileLocation":"cloud/secrets.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=\"system\"}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=\"Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Ancha\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/ancha/7dKsVRky4BVXz6Qv/_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/ancha/7dKsVRky4BVXz6Qv/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/ancha/7dKsVRky4BVXz6Qv/_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/ancha/7dKsVRky4BVXz6Qv/_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/ancha/7dKsVRky4BVXz6Qv/_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/ancha/7dKsVRky4BVXz6Qv/_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/ancha/7dKsVRky4BVXz6Qv/_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/ancha/7dKsVRky4BVXz6Qv/_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/ancha/7dKsVRky4BVXz6Qv/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Secrets - Ancha\">\u003cmeta data-mint-head property=\"og:description\" content=\"Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Ancha\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.ancha.io/cloud/secrets\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://ancha.mintlify.app/_mintlify/api/og/v2?division=Cloud\u0026amp;title=Secrets\u0026amp;description=Give+agents+that+run+in+your+hosted+workspace+the+model+provider+keys+they+need%2C+from+your+shell+with+ancha+secrets%2C+without+pasting+keys+into+a+form+or+a+file.\u0026amp;theme=e8f7d3e2681ad873bff32e0b\u0026amp;signature=654f9a25edfe165c3b67ea3e4fbeac9fcb5ac6be6323b2a7da1296ee61840351\">\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=\"Secrets - Ancha\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://ancha.mintlify.app/_mintlify/api/og/v2?division=Cloud\u0026amp;title=Secrets\u0026amp;description=Give+agents+that+run+in+your+hosted+workspace+the+model+provider+keys+they+need%2C+from+your+shell+with+ancha+secrets%2C+without+pasting+keys+into+a+form+or+a+file.\u0026amp;theme=e8f7d3e2681ad873bff32e0b\u0026amp;signature=654f9a25edfe165c3b67ea3e4fbeac9fcb5ac6be6323b2a7da1296ee61840351\">\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/ancha/7dKsVRky4BVXz6Qv/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Ancha\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#D97757\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.ancha.io/cloud/secrets\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/cloud/secrets.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.ancha.io/#organization\",\"name\":\"Ancha\",\"url\":\"https://docs.ancha.io\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/ancha/ZjGIZQH_u9HX5PNO/logo/light.svg?fit=max\u0026auto=format\u0026n=ZjGIZQH_u9HX5PNO\u0026q=85\u0026s=6c9f535dd10609a27c36a19f4f940fa0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.ancha.io#website\",\"name\":\"Ancha\",\"url\":\"https://docs.ancha.io\",\"publisher\":{\"@id\":\"https://docs.ancha.io/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.ancha.io/cloud/secrets#webpage\",\"url\":\"https://docs.ancha.io/cloud/secrets\",\"name\":\"Secrets\",\"description\":\"Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.\",\"dateModified\":\"2026-10-31T23:03:45.662Z\",\"isPartOf\":{\"@id\":\"https://docs.ancha.io#website\"},\"breadcrumb\":{\"@id\":\"https://docs.ancha.io/cloud/secrets#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.ancha.io/cloud/secrets#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Cloud\",\"item\":\"https://docs.ancha.io/cloud/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Secrets\",\"item\":\"https://docs.ancha.io/cloud/secrets\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.ancha.io/cloud/secrets#article\",\"headline\":\"Secrets\",\"name\":\"Secrets\",\"description\":\"Give agents that run in your hosted workspace the model provider keys they need, from your shell with ancha secrets, without pasting keys into a form or a file.\",\"url\":\"https://docs.ancha.io/cloud/secrets\",\"mainEntityOfPage\":{\"@id\":\"https://docs.ancha.io/cloud/secrets#webpage\"},\"dateModified\":\"2026-10-31T23:03:45.662Z\",\"publisher\":{\"@id\":\"https://docs.ancha.io/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.ancha.io#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Ancha\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Ancha","nav":{"global":null,"groups":[{"group":"Get started","pages":[{"title":"Introduction","icon":"house","href":"/index"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"},{"title":"For coding agents","icon":"robot","href":"/coding-agents"}]},{"group":"Guides","pages":[{"title":"Test a Slack bot","icon":"slack","href":"/guides/test-a-slack-bot"}]},{"group":"Concepts","pages":[{"title":"How Ancha works","sidebarTitle":"Overview","icon":"shapes","href":"/concepts/overview"},{"title":"Worlds","icon":"globe","href":"/concepts/worlds"},{"title":"Tests","icon":"flask","href":"/concepts/tests"},{"title":"Attempts and runs","icon":"repeat","href":"/concepts/attempts-and-runs"},{"title":"Checks","icon":"list-check","href":"/concepts/checks"}]},{"group":"Tools","pages":[{"title":"Tools","sidebarTitle":"Overview","icon":"toolbox","href":"/tools/overview"},{"group":"Communication and documents","pages":[{"title":"Slack","icon":"slack","href":"/tools/slack"},{"title":"Gmail","icon":"envelope","href":"/tools/gmail"},{"title":"Google Drive","icon":"google-drive","href":"/tools/google-drive"},{"title":"Microsoft Word","icon":"file-word","href":"/tools/microsoft-word"},{"title":"Notion","icon":"book","href":"/tools/notion"},{"title":"Dropbox","icon":"dropbox","href":"/tools/dropbox"},{"title":"Resend","icon":"paper-plane","href":"/tools/resend"}]},{"group":"Engineering and operations","pages":[{"title":"GitHub","icon":"github","href":"/tools/github"},{"title":"Datadog","icon":"dog","href":"/tools/datadog"},{"title":"PagerDuty","icon":"bell","href":"/tools/pagerduty"},{"title":"Better Stack","icon":"heart-pulse","href":"/tools/better-stack"},{"title":"Linear","icon":"bars-progress","href":"/tools/linear"},{"title":"Jira","icon":"jira","href":"/tools/jira"},{"title":"Okta","icon":"id-badge","href":"/tools/okta"},{"title":"Amazon S3","icon":"aws","href":"/tools/amazon-s3"},{"title":"Clerk","icon":"user-shield","href":"/tools/clerk"}]},{"group":"Revenue and commerce","pages":[{"title":"HubSpot","icon":"hubspot","href":"/tools/hubspot"},{"title":"Salesforce","icon":"salesforce","href":"/tools/salesforce"},{"title":"Attio","icon":"address-book","href":"/tools/attio"},{"title":"Gong","icon":"phone","href":"/tools/gong"},{"title":"Stripe","icon":"stripe","href":"/tools/stripe"},{"title":"PayPal","icon":"paypal","href":"/tools/paypal"},{"title":"Shopify","icon":"shopify","href":"/tools/shopify"},{"title":"Lob","icon":"envelopes-bulk","href":"/tools/lob"}]},{"group":"Marketing and analytics","pages":[{"title":"Google Analytics","icon":"chart-line","href":"/tools/google-analytics"},{"title":"Google Ads","icon":"google","href":"/tools/google-ads"},{"title":"LinkedIn Ads","icon":"linkedin","href":"/tools/linkedin-ads"},{"title":"ChatGPT Ads","icon":"message","href":"/tools/chatgpt-ads"}]},{"group":"Other","pages":[{"title":"Open-Meteo","icon":"cloud-sun","href":"/tools/open-meteo"},{"title":"Kalshi","icon":"chart-line","href":"/tools/kalshi"}]}]},{"group":"CLI","pages":[{"title":"CLI overview","sidebarTitle":"Overview","icon":"terminal","href":"/cli/overview"},{"group":"Test loop","expanded":true,"pages":[{"title":"ancha init","href":"/cli/init"},{"title":"ancha doctor","href":"/cli/doctor"},{"title":"ancha run","href":"/cli/run"},{"title":"ancha explain","href":"/cli/explain"},{"title":"ancha report","href":"/cli/report"},{"title":"ancha baseline","href":"/cli/baseline"},{"title":"ancha status","href":"/cli/status"},{"title":"ancha wait","href":"/cli/wait"},{"title":"ancha logs","href":"/cli/logs"},{"title":"ancha runs","href":"/cli/runs"}]},{"group":"Tools and scenes","pages":[{"title":"ancha twins","href":"/cli/twins"},{"title":"ancha connect","href":"/cli/connect"},{"title":"ancha scene","href":"/cli/scene"},{"title":"ancha docs","href":"/cli/docs"}]},{"group":"Automation","pages":[{"title":"ancha schema","href":"/cli/schema"},{"title":"ancha completion","href":"/cli/completion"}]},{"group":"Worlds","pages":[{"title":"World lifecycle","sidebarTitle":"world up, check, down","href":"/cli/world-lifecycle"},{"title":"ancha world gen","href":"/cli/world-gen"},{"title":"ancha world","href":"/cli/world"}]},{"group":"Servers and sandboxes","pages":[{"title":"ancha serve","href":"/cli/serve"},{"title":"ancha env","href":"/cli/env"},{"title":"ancha sandbox","href":"/cli/sandbox"},{"title":"ancha mcp","href":"/cli/mcp"},{"title":"ancha ui","href":"/cli/ui"}]},{"group":"Hosted workspace","pages":[{"title":"ancha login","href":"/cli/login"},{"title":"ancha logout","href":"/cli/logout"},{"title":"ancha whoami","href":"/cli/whoami"},{"title":"ancha secrets","href":"/cli/secrets"}]},{"group":"Agents and playgrounds","pages":[{"title":"ancha agent","href":"/cli/agent"},{"title":"ancha playground","href":"/cli/playground"},{"title":"ancha test","href":"/cli/test"},{"title":"ancha execution","href":"/cli/execution"}]}]},{"group":"Reference","pages":[{"title":"ancha.yaml","icon":"file-lines","href":"/reference/ancha-yaml"},{"title":"Test file (scene.yaml)","sidebarTitle":"Test file","icon":"file-code","href":"/reference/test-file"},{"title":"Checks reference","sidebarTitle":"Checks","icon":"list-check","href":"/reference/checks"},{"title":"Environment variables","icon":"key","href":"/reference/environment-variables"},{"title":"Errors and exit codes","sidebarTitle":"Errors","icon":"triangle-exclamation","href":"/reference/errors"}]},{"group":"Cloud","pages":[{"title":"Hosted workspace","sidebarTitle":"Overview","icon":"cloud","href":"/cloud/overview"},{"title":"Login and API keys","icon":"key","href":"/cloud/login-and-api-keys"},{"title":"Results in your workspace","sidebarTitle":"Results","icon":"cloud-arrow-up","href":"/cloud/results"},{"title":"CI","description":"Run your agent's Ancha tests in CI, fully local with no account or with the results sent to your hosted workspace with two secrets, and gate merges on the exit code.","icon":"code-branch","href":"/cloud/ci"},{"title":"Secrets","icon":"lock","href":"/cloud/secrets"}]},{"group":"Help","pages":[{"title":"Troubleshooting","description":"Fixes for common problems with Ancha 0.1.4: installing, connecting an agent to the tools, variables the agent did not get, checks that fail unexpectedly, timeouts, coverage gaps, comparisons, the hosted workspace, live worlds and playgrounds.","icon":"life-ring","href":"/troubleshooting"},{"title":"Changelog","icon":"clock-rotate-left","href":"/changelog"}]}]},"basePath":"","title":"Secrets - Ancha","buildId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","deploymentId":"dpl_DeHjVRGfFnhYQwHnfC2pjeXXv8h9","dynamics":[],"chunks":[]}