If an AI agent runs on a schedule or on a server, run it as its own machine identity instead of as a person. Infisical then attributes the agent’s sessions and access requests to the identity, and the identity’s roles decide which accounts the agent can reach.Running as a machine identity is also the safest way to run an agent you don’t fully trust, even when you’re watching it. No person’s credentials are part of the run, so the agent can never reach more than the identity can.
Go to Privileged Access Management > Access Control, open the Identities tab, and select Add Identity.
2
Create a new machine identity, or assign one that already exists in your organization. Give the identity the Member role.
3
Open the identity and create a client secret, then copy the Client ID and the Client Secret.
A new identity has Universal Auth attached. If the agent’s host can authenticate through Kubernetes, AWS, GCP, Azure, OIDC, JWT, or LDAP, attach that auth method instead.
The CLI renews the identity’s token for the whole run, and removes these variables from the agent’s environment before it starts the agent.
Pass the credentials as environment variables, not as flags such as --client-secret. A secret on the command line is saved in your shell history, and any process that can list processes can read it.
For the variables that other auth methods use, see the CLI reference.
For a sensitive task, we recommend running the agent on a dedicated host or container that has no other credentials. This way, if the agent gets past the sandbox, the only access it can find is the machine identity’s, which is limited by role, duration, and approval.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Infisical","colors":{"primary":"#26272b","light":"#dbf530","dark":"#A1B659"},"logo":{"light":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/logo/light.svg","dark":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/logo/dark.svg","href":"/"},"favicon":"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico","api":{"openapi":"https://app.infisical.com/api/docs/json","mdx":{"server":["https://app.infisical.com"]}},"appearance":{"default":"light"},"background":{"color":{"light":"#ffffff","dark":"#08090b"}},"navbar":{"links":[{"href":"https://app.infisical.com/login","label":"Log In"}],"primary":{"type":"button","label":"Start for Free","href":"https://app.infisical.com/signup"}},"footer":{"socials":{"x":"https://www.twitter.com/infisical","linkedin":"https://www.linkedin.com/company/infisical","github":"https://github.com/Infisical/infisical-cli","website":"https://community.infisical.com"},"links":[{"header":"PRODUCT","items":[{"label":"Secrets Management","href":"https://infisical.com/platform/secrets-management"},{"label":"Certificate Management","href":"https://infisical.com/platform/certificate-management"},{"label":"Privileged Access Management (PAM)","href":"https://infisical.com/platform/pam"},{"label":"Agent Vault","href":"https://infisical.com/platform/agent-vault"},{"label":"Key Management Service (KMS)","href":"https://infisical.com/docs/documentation/platform/kms/overview"},{"label":"Secret Scanning","href":"https://infisical.com/radar"},{"label":"Share Secrets","href":"https://app.infisical.com/share-secret"},{"label":"Pricing","href":"https://infisical.com/pricing"},{"label":"Security","href":"https://infisical.com/docs/internals/security"},{"label":"Blog","href":"https://infisical.com/blog"},{"label":"Infisical vs Vault","href":"https://infisical.com/infisical-vs-hashicorp-vault"},{"label":"Community","href":"https://community.infisical.com/"}]},{"header":"USE CASES","items":[{"label":"Infisical Agent","href":"https://infisical.com/docs/documentation/getting-started/introduction"},{"label":"Infisical Proxy","href":"https://infisical.com/docs/integrations/platforms/infisical-proxy"},{"label":"Kubernetes","href":"https://infisical.com/docs/integrations/platforms/kubernetes"},{"label":"Dynamic Secrets","href":"https://infisical.com/docs/documentation/platform/dynamic-secrets/overview"},{"label":"Terraform","href":"https://registry.terraform.io/providers/Infisical/infisical/latest/docs"},{"label":"Ansible","href":"https://infisical.com/docs/integrations/platforms/ansible"},{"label":"Jenkins","href":"https://infisical.com/docs/integrations/cicd/jenkins"},{"label":"Docker","href":"https://infisical.com/docs/integrations/platforms/docker"},{"label":"AWS ECS","href":"https://infisical.com/docs/integrations/platforms/ecs-with-agent"},{"label":"GitLab","href":"https://infisical.com/docs/integrations/cicd/gitlab"},{"label":"GitHub","href":"https://infisical.com/docs/integrations/cicd/githubactions"},{"label":"SDK","href":"https://infisical.com/docs/sdks/overview"}]},{"header":"DEVELOPERS","items":[{"label":"Changelog","href":"https://github.com/Infisical/infisical/releases"},{"label":"Status","href":"https://status.infisical.com/"},{"label":"Feedback \u0026 Requests","href":"https://github.com/Infisical/infisical/issues"},{"label":"Trust of Center","href":"https://app.vanta.com/infisical.com/trust/hoop8cr78cuarxo9sztvs"},{"label":"Open Source Friends","href":"https://infisical.com/infisical-friends"},{"label":"How to contribute","href":"https://www.infisical.com/infisical-heroes"}]},{"header":"OTHERS","items":[{"label":"Customers","href":"https://infisical.com/customers/traba"},{"label":"Company Handbook","href":"https://infisical.com/wiki/handbook/overview"},{"label":"Careers","href":"https://infisical.com/careers"},{"label":"Terms of Service","href":"https://infisical.com/terms"},{"label":"Privacy Policy","href":"https://infisical.com/privacy"},{"label":"Subprocessors","href":"https://infisical.com/subprocessors"},{"label":"SLA","href":"https://infisical.com/sla"},{"label":"Support Email","href":"mailto:support@infisical.com"},{"label":"Sales","href":"mailto:sales@infisical.com"},{"label":"Support","href":"https://community.infisical.com"}]}]},"fonts":{"heading":{"family":"Alliance","weight":400,"source":"https://infisical.com/docs/fonts/AllianceNo2-Regular.woff2","format":"woff2"}},"icons":{"library":"lucide"},"styling":{"eyebrows":"breadcrumbs","codeblocks":"dark","latex":false},"integrations":{"posthog":{"apiKey":"phc_Q0xfB3LeOqo7ySk4DE6zLNwDzHFesKcmigknCy4fTdV","apiHost":"https://p.infisical.com"},"koala":{"publicApiKey":"pk_b50d7184e0e39ddd5cdb43cf6abeadd9b97d"},"gtm":{"tagId":"GTM-WL5C7MWT"}},"contextual":{"options":["assistant","copy","view","chatgpt","claude","mcp"],"display":"header"},"thumbnails":{"appearance":"light"},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"infisical","hasAudioNarration":false,"actualSubdomain":"infisical","customDomains":["infisical.com"],"gitSource":{"type":"github","owner":"infisical","repo":"infisical","deployBranch":"main","contentDirectory":"docs","mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae3ee0f21dcd4885450f2e7","collectionId":"25dc9405-8747-4b15-808a-852d355f64db","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae3ee0f21dcd4885450f2e7"},"feedback":{"thumbs":true,"edits":true,"issues":true},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6ae4002cca852ef32bf22af6","clientVersion":"0.0.4021","searchFilterCounts":[{"language":"default","tag":"Reference","count":1864},{"language":"default","tag":"API","count":1821},{"language":"default","tag":"Secrets Management","count":910},{"language":"default","tag":"App connections","count":653},{"language":"default","tag":"Shared","count":564},{"language":"default","tag":"Secret syncs","count":420},{"language":"default","tag":"Products","count":374},{"language":"default","tag":"Certificate Management","count":317},{"language":"default","tag":"Platform","count":247},{"language":"default","tag":"Secret rotations","count":213}]},"assistantConfig":{"enableAskAiButton":true,"enableAskAiSearchBar":false},"basePath":"/docs","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"selectively-prewarm","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":"instinct-self-updating-docs","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":"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":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","href":"/docs/_mintlify/custom/infisical/3172a334a2a87deb/style.css"}],"page":{"pagePath":"documentation/platform/pam/ai-agents/unattended","slug":"/documentation/platform/pam/ai-agents/unattended","pageMetadata":{"title":"Run an AI agent unattended","sidebarTitle":"Run unattended","description":"Run an AI agent as its own machine identity.","href":"/documentation/platform/pam/ai-agents/unattended"},"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: \"Run an AI agent as its own machine identity.\"\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`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Step,Steps,Tip}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Step)_missingMdxReference(`Step`,true);if(!Steps)_missingMdxReference(`Steps`,true);if(!Tip)_missingMdxReference(`Tip`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`If an AI agent runs on a schedule or on a server, run it as its own `,_jsx(_components.a,{href:`/documentation/platform/identities/machine-identities`,children:`machine identity`}),` instead of as a person. Infisical then attributes the agent’s sessions and access requests to the identity, and the identity’s roles decide which accounts the agent can reach.`]}),`\n`,_jsx(_components.p,{children:`Running as a machine identity is also the safest way to run an agent you don’t fully trust, even when you’re watching it. No person’s credentials are part of the run, so the agent can never reach more than the identity can.`}),`\n`,_jsx(Heading,{level:`2`,id:`prerequisites`,children:`Prerequisites`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`The `,_jsx(_components.a,{href:`/cli/install`,children:`Infisical CLI`}),` on the machine that runs the agent`]}),`\n`,_jsxs(_components.li,{children:[`The Product Admin `,_jsx(_components.a,{href:`/documentation/platform/pam/concepts/access-control#product-membership`,children:`role`}),` in PAM, to add the machine identity`]}),`\n`,_jsx(_components.li,{children:`The Admin role on the folders or accounts the agent needs, to give the identity a role on them`}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-1-add-a-machine-identity-to-pam`,children:`Step 1: Add a machine identity to PAM`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{children:_jsxs(_components.p,{children:[`Go to `,_jsx(_components.strong,{children:`Privileged Access Management`}),` > `,_jsx(_components.strong,{children:`Access Control`}),`, open the `,_jsx(_components.strong,{children:`Identities`}),` tab, and select `,_jsx(_components.strong,{children:`Add Identity`}),`.`]})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`Create a new machine identity, or assign one that already exists in your organization. Give the identity the `,_jsx(_components.strong,{children:`Member`}),` role.`]})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`Open the identity and create a client secret, then copy the `,_jsx(_components.strong,{children:`Client ID`}),` and the `,_jsx(_components.strong,{children:`Client Secret`}),`.`]})})]}),`\n`,_jsxs(_components.p,{children:[`A new identity has `,_jsx(_components.a,{href:`/documentation/platform/identities/universal-auth`,children:`Universal Auth`}),` attached. If the agent’s host can authenticate through Kubernetes, AWS, GCP, Azure, OIDC, JWT, or LDAP, attach that `,_jsx(_components.a,{href:`/documentation/platform/identities/machine-identities#authentication-methods`,children:`auth method`}),` instead.`]}),`\n`,_jsx(Heading,{level:`2`,id:`step-2-give-the-identity-access-to-accounts`,children:`Step 2: Give the identity access to accounts`}),`\n`,_jsxs(Steps,{children:[_jsx(Step,{children:_jsxs(_components.p,{children:[`Open the `,_jsx(_components.a,{href:`/documentation/platform/pam/folders/overview`,children:`folder`}),` or account that the agent needs, go to `,_jsx(_components.strong,{children:`Permissions`}),`, and select `,_jsx(_components.strong,{children:`Assign Access`}),`.`]})}),_jsx(Step,{children:_jsxs(_components.p,{children:[`Select the identity and give it the `,_jsx(_components.strong,{children:`Connector`}),` role. If the access is temporary, set an expiration.`]})})]}),`\n`,_jsx(_components.p,{children:`Give the identity a role only on the accounts its task needs.`}),`\n`,_jsx(Heading,{level:`2`,id:`step-3-run-the-agent-as-the-identity`,children:`Step 3: Run the agent as the identity`}),`\n`,_jsx(_components.p,{children:`Set the identity’s credentials as environment variables, then start the agent:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes dark-plus dark-plus`,style:{backgroundColor:`#0B0C0E`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` INFISICAL_AUTH_METHOD`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`universal-auth`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` INFISICAL_UNIVERSAL_AUTH_CLIENT_ID`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`client-id`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:`export`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:` INFISICAL_UNIVERSAL_AUTH_CLIENT_SECRET`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`=\u003c`}),_jsx(_components.span,{style:{color:`#9CDCFE`,\"--shiki-dark\":`#9CDCFE`},children:`client-secret`}),_jsx(_components.span,{style:{color:`#D4D4D4`,\"--shiki-dark\":`#D4D4D4`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#DCDCAA`,\"--shiki-dark\":`#DCDCAA`},children:`infisical`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` pam`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` agentic`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` access`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --reason`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` \"nightly triage agent\"`}),_jsx(_components.span,{style:{color:`#569CD6`,\"--shiki-dark\":`#569CD6`},children:` --`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` python`}),_jsx(_components.span,{style:{color:`#CE9178`,\"--shiki-dark\":`#CE9178`},children:` triage_agent.py`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The CLI renews the identity’s token for the whole run, and removes these variables from the agent’s environment before it starts the agent.`}),`\n`,_jsx(Tip,{children:_jsxs(_components.p,{children:[`Pass the credentials as environment variables, not as flags such as `,_jsx(_components.code,{children:`--client-secret`}),`. A secret on the command line is saved in your shell history, and any process that can list processes can read it.`]})}),`\n`,_jsxs(_components.p,{children:[`For the variables that other auth methods use, see the `,_jsx(_components.a,{href:`/cli/reference#pam-agentic-access`,children:`CLI reference`}),`.`]}),`\n`,_jsx(Heading,{level:`2`,id:`use-a-dedicated-machine`,children:`Use a dedicated machine`}),`\n`,_jsxs(_components.p,{children:[`For a sensitive task, we recommend running the agent on a dedicated host or container that has no other credentials. This way, if the agent gets past the `,_jsx(_components.a,{href:`/documentation/platform/pam/ai-agents/run#sandbox`,children:`sandbox`}),`, the only access it can find is the machine identity’s, which is limited by role, duration, and `,_jsx(_components.a,{href:`/documentation/platform/pam/access-requests/overview`,children:`approval`}),`.`]})]})}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":{"codeStyling":"dark","config":{},"pageMetadata":{"title":"Run an AI agent unattended","sidebarTitle":"Run unattended","description":"Run an AI agent as its own machine identity.","href":"/documentation/platform/pam/ai-agents/unattended"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Prerequisites","slug":"prerequisites","depth":2,"children":[]},{"title":"Step 1: Add a machine identity to PAM","slug":"step-1-add-a-machine-identity-to-pam","depth":2,"children":[]},{"title":"Step 2: Give the identity access to accounts","slug":"step-2-give-the-identity-access-to-accounts","depth":2,"children":[]},{"title":"Step 3: Run the agent as the identity","slug":"step-3-run-the-agent-as-the-identity","depth":2,"children":[]},{"title":"Use a dedicated machine","slug":"use-a-dedicated-machine","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/infisical/b13a5df316344f52/unify.js","/docs/_mintlify/custom/infisical/bc9046d1d11b5448/field-name-copy.js","/docs/_mintlify/custom/infisical/fdfdc80c034be768/cli-reference-nav.js"],"subdomain":"infisical","siteName":"Infisical","title":"Run an AI agent unattended - Infisical","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-23T19:27:41.567Z","originalFileLocation":"documentation/platform/pam/ai-agents/unattended.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=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Run an AI agent as its own machine identity.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Infisical\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/x-icon\" sizes=\"180x180\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"32x32\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico\">\u003clink data-mint-head rel=\"icon\" type=\"image/x-icon\" sizes=\"16x16\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/favicon.ico\">\u003cmeta data-mint-head property=\"og:title\" content=\"Run an AI agent unattended - Infisical\">\u003cmeta data-mint-head property=\"og:description\" content=\"Run an AI agent as its own machine identity.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Infisical\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://infisical.mintlify.app/_mintlify/api/og/v2?division=AI+agents\u0026amp;title=Run+an+AI+agent+unattended\u0026amp;description=Run+an+AI+agent+as+its+own+machine+identity.\u0026amp;theme=48a50df3ba2e68203e367e83\u0026amp;signature=be4a0b51408b81e92208d4534e7cb1f850081e4ea0f7eb66747d6d22974db43f\">\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=\"Run an AI agent unattended - Infisical\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Run an AI agent as its own machine identity.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://infisical.mintlify.app/_mintlify/api/og/v2?division=AI+agents\u0026amp;title=Run+an+AI+agent+unattended\u0026amp;description=Run+an+AI+agent+as+its+own+machine+identity.\u0026amp;theme=48a50df3ba2e68203e367e83\u0026amp;signature=be4a0b51408b81e92208d4534e7cb1f850081e4ea0f7eb66747d6d22974db43f\">\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=\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/_generated/favicon/browserconfig.xml?v=3\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Infisical\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#26272b\">\u003clink data-mint-head rel=\"canonical\" href=\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/documentation/platform/pam/ai-agents/unattended.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://infisical.com/#organization\",\"name\":\"Infisical\",\"url\":\"https://infisical.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintlify.s3.us-west-1.amazonaws.com/infisical/logo/light.svg\"}},{\"@type\":\"WebSite\",\"@id\":\"https://infisical.com/docs#website\",\"name\":\"Infisical\",\"url\":\"https://infisical.com/docs\",\"publisher\":{\"@id\":\"https://infisical.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended#webpage\",\"url\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended\",\"name\":\"Run an AI agent unattended\",\"description\":\"Run an AI agent as its own machine identity.\",\"dateModified\":\"2026-10-23T19:27:41.567Z\",\"isPartOf\":{\"@id\":\"https://infisical.com/docs#website\"},\"breadcrumb\":{\"@id\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"AI agents\",\"item\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Run an AI agent unattended\",\"item\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended#article\",\"headline\":\"Run an AI agent unattended\",\"name\":\"Run an AI agent unattended\",\"description\":\"Run an AI agent as its own machine identity.\",\"url\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended\",\"mainEntityOfPage\":{\"@id\":\"https://infisical.com/docs/documentation/platform/pam/ai-agents/unattended#webpage\"},\"dateModified\":\"2026-10-23T19:27:41.567Z\",\"publisher\":{\"@id\":\"https://infisical.com/#organization\"},\"isPartOf\":{\"@id\":\"https://infisical.com/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Infisical\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Infisical","nav":{"global":null,"tabs":[{"tab":"Get started","pages":[{"title":"Get started","href":"/documentation/getting-started/overview"}]},{"tab":"Products","menu":[{"item":"Secrets Management","icon":"key","pages":[{"title":"Secrets Management","href":"/documentation/platform/secrets-mgmt/overview"}]},{"item":"Certificate Management","icon":"file-key","pages":[{"title":"Certificate Management","href":"/documentation/platform/pki/overview"}]},{"item":"Privileged Access Management (PAM)","icon":"users","pages":[{"title":"Privileged Access Management (PAM)","sidebarTitle":"Privileged Access Management (PAM)","icon":"users","href":"/documentation/platform/pam/overview"},{"group":"Get started","pages":[{"title":"Launch your first PAM session","sidebarTitle":"Quickstart","href":"/documentation/platform/pam/quick-starts/launch-first-session"},{"title":"Privileged access management","sidebarTitle":"Concepts","href":"/documentation/platform/pam/concepts/overview"},{"title":"PAM session lifecycle","sidebarTitle":"Session lifecycle","href":"/documentation/platform/pam/concepts/session-lifecycle"},{"title":"PAM architecture","sidebarTitle":"Architecture","href":"/documentation/platform/pam/architecture"}]},{"group":"Accounts","pages":[{"title":"PAM accounts","sidebarTitle":"Overview","href":"/documentation/platform/pam/accounts/overview"},{"title":"Add an account","sidebarTitle":"Add an account","href":"/documentation/platform/pam/accounts/add"},{"title":"Connect to an account","sidebarTitle":"Connect to an account","href":"/documentation/platform/pam/accounts/connect"},{"title":"View an account's credentials","sidebarTitle":"View credentials","href":"/documentation/platform/pam/accounts/view-credentials"},{"title":"Manage an account","sidebarTitle":"Manage an account","href":"/documentation/platform/pam/accounts/manage"},{"group":"Account types","root":{"title":"Account types","sidebarTitle":"Account types","href":"/documentation/platform/pam/accounts/account-types"},"pages":[{"title":"PostgreSQL accounts","sidebarTitle":"PostgreSQL","href":"/documentation/platform/pam/accounts/postgresql"},{"title":"MySQL accounts","sidebarTitle":"MySQL","href":"/documentation/platform/pam/accounts/mysql"},{"title":"Microsoft SQL Server accounts","sidebarTitle":"Microsoft SQL Server","href":"/documentation/platform/pam/accounts/mssql"},{"title":"Oracle accounts","sidebarTitle":"Oracle","href":"/documentation/platform/pam/accounts/oracledb"},{"title":"MongoDB accounts","sidebarTitle":"MongoDB","href":"/documentation/platform/pam/accounts/mongodb"},{"title":"Redis accounts","sidebarTitle":"Redis","href":"/documentation/platform/pam/accounts/redis"},{"title":"Snowflake accounts","sidebarTitle":"Snowflake","href":"/documentation/platform/pam/accounts/snowflake"},{"title":"ClickHouse accounts","sidebarTitle":"ClickHouse","href":"/documentation/platform/pam/accounts/clickhouse"},{"group":"SSH","root":{"title":"SSH accounts","sidebarTitle":"SSH","href":"/documentation/platform/pam/accounts/ssh"},"pages":[{"title":"Set up SSH certificate authentication","sidebarTitle":"SSH certificate auth","href":"/documentation/platform/pam/guides/ssh-certificate-auth"}]},{"title":"Kubernetes accounts","sidebarTitle":"Kubernetes","href":"/documentation/platform/pam/accounts/kubernetes"},{"title":"AWS IAM accounts","sidebarTitle":"AWS IAM","href":"/documentation/platform/pam/accounts/aws-iam"},{"title":"GCP service accounts","sidebarTitle":"GCP service account","href":"/documentation/platform/pam/accounts/gcp-service-account"},{"title":"Azure CLI accounts","sidebarTitle":"Azure CLI","href":"/documentation/platform/pam/accounts/azure-cli"},{"title":"Windows accounts","sidebarTitle":"Windows","href":"/documentation/platform/pam/accounts/windows"},{"title":"Windows Active Directory accounts","sidebarTitle":"Windows AD","href":"/documentation/platform/pam/accounts/windows-ad"}]}]},{"group":"Access control","pages":[{"title":"Access control","sidebarTitle":"Overview","href":"/documentation/platform/pam/concepts/access-control"},{"title":"Folders","sidebarTitle":"Folders","href":"/documentation/platform/pam/folders/overview"},{"title":"PAM account templates","sidebarTitle":"Account templates","href":"/documentation/platform/pam/templates/overview"},{"title":"Access requests","sidebarTitle":"Access requests","href":"/documentation/platform/pam/access-requests/overview"},{"title":"Auto-approval","sidebarTitle":"Auto-approval","href":"/documentation/platform/pam/access-requests/auto-approval"},{"title":"Break-glass access","sidebarTitle":"Break-glass access","href":"/documentation/platform/pam/access-requests/break-glass"}]},{"group":"AI agents","pages":[{"title":"PAM for AI agents","sidebarTitle":"Overview","href":"/documentation/platform/pam/ai-agents/overview"},{"title":"Run an AI agent","sidebarTitle":"Run an agent","href":"/documentation/platform/pam/ai-agents/run"},{"title":"Agent instructions","sidebarTitle":"Agent instructions","description":"Tell an AI agent which PAM accounts it can use and how to reach them.","href":"/documentation/platform/pam/ai-agents/instructions"},{"title":"Run an AI agent unattended","sidebarTitle":"Run unattended","href":"/documentation/platform/pam/ai-agents/unattended"},{"title":"Review and stop an AI agent","sidebarTitle":"Review and stop an agent","description":"Check what an AI agent did with your accounts and remove its access.","href":"/documentation/platform/pam/ai-agents/review"}]},{"group":"Credential rotation","pages":[{"title":"PAM credential rotation","sidebarTitle":"Overview","href":"/documentation/platform/pam/credential-rotation/overview"},{"title":"PostgreSQL credential rotation for PAM","sidebarTitle":"PostgreSQL","href":"/documentation/platform/pam/credential-rotation/postgresql"},{"title":"MySQL credential rotation for PAM","sidebarTitle":"MySQL","href":"/documentation/platform/pam/credential-rotation/mysql"},{"title":"Microsoft SQL Server credential rotation for PAM","sidebarTitle":"Microsoft SQL Server","href":"/documentation/platform/pam/credential-rotation/mssql"},{"title":"Oracle credential rotation for PAM","sidebarTitle":"Oracle","href":"/documentation/platform/pam/credential-rotation/oracledb"},{"title":"Windows credential rotation for PAM","sidebarTitle":"Windows","href":"/documentation/platform/pam/credential-rotation/windows"}]},{"group":"Monitoring","pages":[{"group":"Sessions","root":{"title":"PAM sessions","sidebarTitle":"Sessions","href":"/documentation/platform/pam/sessions/overview"},"pages":[{"title":"PAM session recording","sidebarTitle":"Session recording","href":"/documentation/platform/pam/sessions/session-recording"},{"title":"Store PAM session recordings externally","sidebarTitle":"External storage","href":"/documentation/platform/pam/sessions/external-storage"}]},{"title":"Auditing","sidebarTitle":"Auditing","href":"/documentation/platform/pam/auditing"},{"title":"PAM credential health","sidebarTitle":"Credential health","href":"/documentation/platform/pam/credential-health/overview"},{"group":"Discovery","root":{"title":"PAM account discovery","sidebarTitle":"Overview","href":"/documentation/platform/pam/discovery/overview"},"pages":[{"title":"Active Directory discovery","sidebarTitle":"Active Directory","href":"/documentation/platform/pam/discovery/active-directory"},{"title":"Linux/Unix discovery","sidebarTitle":"Linux/Unix","href":"/documentation/platform/pam/discovery/unix"},{"title":"PostgreSQL discovery","sidebarTitle":"PostgreSQL","href":"/documentation/platform/pam/discovery/postgres"},{"title":"Microsoft SQL Server discovery","sidebarTitle":"Microsoft SQL Server","href":"/documentation/platform/pam/discovery/mssql"}]}]}]},{"item":"Agent Vault","icon":"vault","pages":[{"title":"Agent Vault","href":"/documentation/platform/agent-vault/overview"}]},{"item":"Key Management Service (KMS)","icon":"lock","pages":[{"title":"Key Management Service (KMS)","href":"/documentation/platform/kms/overview"}]},{"item":"Secret Scanning","icon":"radar","pages":[{"title":"Secret Scanning","href":"/documentation/platform/secret-scanning/overview"}]}]},{"tab":"Platform","menu":[{"item":"Organizations","icon":"building","pages":[{"title":"Organizations","href":"/documentation/platform/organization"}]},{"item":"Identity and access","icon":"id-card","pages":[{"title":"Identity and access","href":"/documentation/platform/identities/overview"}]},{"item":"App connections","icon":"plug","pages":[{"title":"App connections","href":"/integrations/app-connections/overview"}]},{"item":"Networking","icon":"network","pages":[{"title":"Networking","href":"/documentation/platform/gateways/overview"}]},{"item":"Self-hosting","icon":"server","pages":[{"title":"Self-hosting","href":"/self-hosting/overview"}]},{"item":"Internals","icon":"workflow","pages":[{"title":"Internals","href":"/internals/overview"}]},{"item":"Contributing","icon":"git-pull-request","pages":[{"title":"Contributing","href":"/contributing/getting-started/overview"}]}],"pages":[{"title":"Platform","href":"/documentation/platform/organization"}]},{"tab":"Reference","icon":{"name":"code","library":"lucide"},"menu":[{"item":"CLI","icon":"terminal","pages":[{"title":"CLI","href":"/cli/overview"}]},{"item":"API","icon":"book-open","pages":[{"title":"API","href":"/api-reference/overview/introduction"}]},{"item":"SDKs","icon":"boxes","pages":[{"title":"SDKs","href":"/sdks/overview"}]}],"pages":[{"title":"Reference","href":"/cli/overview"}]}]},"title":"Run an AI agent unattended - Infisical","buildId":"dpl_DGmhKsAzJdVqypJzon18vViniWRY","deploymentId":"dpl_DGmhKsAzJdVqypJzon18vViniWRY","dynamics":[],"chunks":[]}