Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.
Preset agents can reference secrets and variables using Tracecat expression syntax.
Include ${{ SECRETS.<name>.<key> }} or ${{ VARS.<name>.<key> }} in a preset agent’s saved instructions so the agent passes them as tool arguments at runtime.
Preset agent tool calls go through a secure server-side proxy.
The LLM only sees the raw expression placeholder (e.g. ${{ SECRETS.threatintel.API_KEY }}). The actual secret values are injected server-side at the tool execution layer after the model responds, so the LLM never has access to your credentials.
Do not use SECRETS expressions — or any expression that resolves to a value you would not send to your LLM provider — in ai.action or ai.agent inputs. Use ai.preset_agent for secure secrets injection.
Use ${{ SECRETS.<secret_name>.<key> }} to reference a secret stored in your workspace credentials.In a workflow action this looks like:
- ref: triage_alert action: ai.preset_agent args: preset: security-triage user_prompt: | Look up the reputation of this IP address: ${{ TRIGGER.source_ip }}
Where the security-triage preset instructions contain:
You are a security triage agent.When you make HTTP requests to the threat intel API, pass`${{ SECRETS.threatintel.API_KEY }}` in the Authorization headeras a Bearer token.Do not print or return secret values in your final answer.
Use ${{ VARS.<variable_name>.<key> }} for non-sensitive configuration such as base URLs, project IDs, or channel names.In a workflow action:
- ref: triage_alert action: ai.preset_agent args: preset: security-triage user_prompt: | Investigate this alert and file a ticket with your findings: ${{ TRIGGER.alert }}
Where the security-triage preset instructions contain:
You are a security triage agent.When you call the threat intel API, use `${{ VARS.threatintel.base_url }}`as the base URL.When you file tickets, use `${{ VARS.ticketing.project_id }}` as theproject ID and `${{ VARS.ticketing.base_url }}` as the base URL.
Where the security-triage preset instructions contain:
You are a security triage agent. Investigate the alert, enrich it,and file a ticket.Credentials:- Threat intel API key: `${{ SECRETS.threatintel.API_KEY }}`- Ticketing API key: `${{ SECRETS.ticketing.API_KEY }}`Configuration:- Threat intel base URL: `${{ VARS.threatintel.base_url }}`- Ticketing base URL: `${{ VARS.ticketing.base_url }}`- Ticketing project ID: `${{ VARS.ticketing.project_id }}`Steps:1. Look up the source IP using the threat intel API.2. File a ticket with your findings in the ticketing system.Do not print or return secret values in your final answer.
OAuth tokens follow a different naming convention. The secret name is <provider_id>_oauth and the key is the provider ID in uppercase plus _USER_TOKEN or _SERVICE_TOKEN.
# authorization_code grant (delegated user access)${{ SECRETS.<provider_id>_oauth.<PROVIDER_ID_UPPER>_USER_TOKEN }}# client_credentials grant (service-to-service)${{ SECRETS.<provider_id>_oauth.<PROVIDER_ID_UPPER>_SERVICE_TOKEN }}
In a workflow action:
- ref: query_sentinel action: ai.preset_agent args: preset: sentinel-analyst user_prompt: | Query Microsoft Sentinel for recent incidents related to this IP: ${{ TRIGGER.source_ip }}
Where the sentinel-analyst preset instructions contain:
You are a security triage agent.When you make HTTP requests to the Microsoft Sentinel API, pass`${{ SECRETS.microsoft_sentinel_oauth.MICROSOFT_SENTINEL_USER_TOKEN }}`in the Authorization header as a Bearer token.Do not print or return secret values in your final answer.
See OAuth integrations for setup and the full list of built-in providers.
{"docsConfig":{"theme":"aspen","$schema":"https://mintlify.com/docs.json","name":"Tracecat Docs","colors":{"primary":"#6E7ED8","light":"#8E9BE1","dark":"#465ACE"},"logo":{"light":"https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/logos/light.svg?fit=max\u0026auto=format\u0026n=9IEnC4OWdnuB3EvN\u0026q=85\u0026s=3d2dbc720cbb79deb7f22d4e8d710696","dark":"https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/logos/dark.svg?fit=max\u0026auto=format\u0026n=9IEnC4OWdnuB3EvN\u0026q=85\u0026s=c6434257b4852a7282f1942da4f3d965","href":"/overview/introduction"},"favicon":"https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/logos/light.svg?fit=max\u0026auto=format\u0026n=9IEnC4OWdnuB3EvN\u0026q=85\u0026s=3d2dbc720cbb79deb7f22d4e8d710696","navbar":{"links":[{"href":"https://discord.com/invite/H4XZwsYzY4","label":"Discord"}],"primary":{"type":"button","label":"Talk to us","href":"https://tracecat.com/contact"}},"footer":{"socials":{"github":"https://github.com/TracecatHQ/tracecat"}},"fonts":{"family":"Instrument Sans"},"icons":{"library":"lucide"},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"tracecat","hasAudioNarration":false,"actualSubdomain":"tracecat","customDomains":["docs.tracecat.com"],"gitSource":{"type":"github","owner":"tracecathq","repo":"tracecat","deployBranch":"main","contentDirectory":"docs","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"issues":false,"edits":false},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6af5385303d5c25e96725789","clientVersion":"0.0.4111","searchFilterCounts":[{"language":"default","tag":"API Reference","count":672},{"language":"default","tag":"Endpoints","count":653},{"language":"default","tag":"Integrations","count":243},{"language":"default","tag":"admin","count":60},{"language":"default","tag":"cases","count":44},{"language":"default","tag":"Automations","count":38},{"language":"default","tag":"workflows","count":32},{"language":"default","tag":"Platform","count":31},{"language":"default","tag":"rbac","count":27},{"language":"default","tag":"scim","count":26}]},"assistantConfig":{"enableStarterQuestions":false,"deflection":{"enabled":false,"email":"chris@tracecat.com","showHelpButton":true}},"basePath":"","hasChatPermissions":true,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"agents/secrets-variables","slug":"/agents/secrets-variables","pageMetadata":{"title":"Secrets and variables","description":"Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.","href":"/agents/secrets-variables"},"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: \"Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.\"\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`,ul:`ul`,..._provideComponents(),...props.components},{Badge,CodeBlock,Heading,Warning}=_components;if(!Badge)_missingMdxReference(`Badge`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsx(Badge,{icon:`github`,color:`gray`,size:`lg`,shape:`pill`,children:`Open source`}),`\n`,_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`Preset agents can reference secrets and variables using Tracecat expression syntax.\nInclude `,_jsx(_components.code,{children:\"${{ SECRETS.\u003cname>.\u003ckey> }}\"}),` or `,_jsx(_components.code,{children:\"${{ VARS.\u003cname>.\u003ckey> }}\"}),` in a preset agent’s saved instructions so the agent passes them as tool arguments at runtime.`]}),`\n`,_jsx(Heading,{level:`2`,id:`security`,children:`Security`}),`\n`,_jsxs(_components.p,{children:[`Preset agent tool calls go through a secure server-side proxy.\nThe LLM only sees the raw expression placeholder (e.g. `,_jsx(_components.code,{children:\"${{ SECRETS.threatintel.API_KEY }}\"}),`). The actual secret values are injected server-side at the tool execution layer after the model responds, so the LLM never has access to your credentials.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Do not use `,_jsx(_components.code,{children:`SECRETS`}),` expressions — or any expression that resolves to a value you would not send to your LLM provider — in `,_jsx(_components.code,{children:`ai.action`}),` or `,_jsx(_components.code,{children:`ai.agent`}),` inputs. Use `,_jsx(_components.code,{children:`ai.preset_agent`}),` for secure secrets injection.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`secrets`,children:`Secrets`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:\"${{ SECRETS.\u003csecret_name>.\u003ckey> }}\"}),` to reference a secret stored in your workspace credentials.`]}),`\n`,_jsx(_components.p,{children:`In a workflow action this looks like:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`ref`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`triage_alert`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` action`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`ai.preset_agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` preset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`security-triage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` user_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Look up the reputation of this IP address:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" ${{ TRIGGER.source_ip }}\"})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Where the `,_jsx(_components.code,{children:`security-triage`}),` preset instructions contain:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`You are a security triage agent.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`When you make HTTP requests to the threat intel API, pass`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"`${{ SECRETS.threatintel.API_KEY }}` in the Authorization header\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`as a Bearer token.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Do not print or return secret values in your final answer.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`variables`,children:`Variables`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.code,{children:\"${{ VARS.\u003cvariable_name>.\u003ckey> }}\"}),` for non-sensitive configuration such as base URLs, project IDs, or channel names.`]}),`\n`,_jsx(_components.p,{children:`In a workflow action:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`ref`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`triage_alert`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` action`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`ai.preset_agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` preset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`security-triage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` user_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Investigate this alert and file a ticket with your findings:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" ${{ TRIGGER.alert }}\"})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Where the `,_jsx(_components.code,{children:`security-triage`}),` preset instructions contain:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,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:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`You are a security triage agent.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"When you call the threat intel API, use `${{ VARS.threatintel.base_url }}`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`as the base URL.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"When you file tickets, use `${{ VARS.ticketing.project_id }}` as the\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"project ID and `${{ VARS.ticketing.base_url }}` as the base URL.\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`secrets-and-variables`,children:`Secrets and variables`}),`\n`,_jsx(_components.p,{children:`Use secrets for credentials and variables for everything else.`}),`\n`,_jsx(_components.p,{children:`Full workflow example:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`ref`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`investigate_and_respond`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` action`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`ai.preset_agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` preset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`security-triage`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` user_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Investigate this alert:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" ${{ TRIGGER.alert }}\"})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` max_tool_calls`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`10`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Where the `,_jsx(_components.code,{children:`security-triage`}),` preset instructions contain:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`18`,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:`18`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`You are a security triage agent. Investigate the alert, enrich it,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`and file a ticket.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Credentials:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"- Threat intel API key: `${{ SECRETS.threatintel.API_KEY }}`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"- Ticketing API key: `${{ SECRETS.ticketing.API_KEY }}`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Configuration:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"- Threat intel base URL: `${{ VARS.threatintel.base_url }}`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"- Ticketing base URL: `${{ VARS.ticketing.base_url }}`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"- Ticketing project ID: `${{ VARS.ticketing.project_id }}`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Steps:`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`1. Look up the source IP using the threat intel API.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`2. File a ticket with your findings in the ticketing system.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Do not print or return secret values in your final answer.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`oauth-secrets`,children:`OAuth secrets`}),`\n`,_jsxs(_components.p,{children:[`OAuth tokens follow a different naming convention. The secret name is `,_jsx(_components.code,{children:`\u003cprovider_id>_oauth`}),` and the key is the provider ID in uppercase plus `,_jsx(_components.code,{children:`_USER_TOKEN`}),` or `,_jsx(_components.code,{children:`_SERVICE_TOKEN`}),`.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`5`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# authorization_code grant (delegated user access)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"${{ SECRETS.\u003cprovider_id>_oauth.\u003cPROVIDER_ID_UPPER>_USER_TOKEN }}\"})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# client_credentials grant (service-to-service)`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\"${{ SECRETS.\u003cprovider_id>_oauth.\u003cPROVIDER_ID_UPPER>_SERVICE_TOKEN }}\"})}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`In a workflow action:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`yaml`,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:`yaml`,children:_jsxs(_components.code,{language:`yaml`,numberOfLines:`8`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`- `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`ref`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`query_sentinel`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` action`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`ai.preset_agent`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` preset`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`sentinel-analyst`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:` user_prompt`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`|`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` Query Microsoft Sentinel for recent incidents related to this IP:`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:\" ${{ TRIGGER.source_ip }}\"})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Where the `,_jsx(_components.code,{children:`sentinel-analyst`}),` preset instructions contain:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,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:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`You are a security triage agent.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`When you make HTTP requests to the Microsoft Sentinel API, pass`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:\"`${{ SECRETS.microsoft_sentinel_oauth.MICROSOFT_SENTINEL_USER_TOKEN }}`\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`in the Authorization header as a Bearer token.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`Do not print or return secret values in your final answer.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsxs(_components.p,{children:[`See `,_jsx(_components.a,{href:`/automations/integrations/oauth-integrations`,children:`OAuth integrations`}),` for setup and the full list of built-in providers.`]}),`\n`,_jsx(Heading,{level:`2`,id:`related-pages`,children:`Related pages`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/automations/core-concepts/secrets`,children:`Secrets`}),` — create and manage workspace secrets`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/automations/core-concepts/variables`,children:`Variables`}),` — create and manage workspace variables`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/automations/core-concepts/expressions`,children:`Expressions`}),` — full expression syntax reference`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/agents/ai-agent`,children:`AI agent`}),` — `,_jsx(_components.code,{children:`ai.agent`}),` and `,_jsx(_components.code,{children:`ai.preset_agent`}),` reference`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/automations/integrations/oauth-integrations`,children:`OAuth integrations`}),` — OAuth setup and providers`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Secrets and variables","description":"Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.","href":"/agents/secrets-variables"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Security","slug":"security","depth":2,"children":[]},{"title":"Secrets","slug":"secrets","depth":2,"children":[]},{"title":"Variables","slug":"variables","depth":2,"children":[]},{"title":"Secrets and variables","slug":"secrets-and-variables","depth":2,"children":[]},{"title":"OAuth secrets","slug":"oauth-secrets","depth":2,"children":[]},{"title":"Related pages","slug":"related-pages","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/tracecat/d167008863fd858a/reo.js"],"subdomain":"tracecat","siteName":"Tracecat Docs","title":"Secrets and variables - Tracecat Docs","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-13T14:51:13.019Z","originalFileLocation":"agents/secrets-variables.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=\"Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Tracecat Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/tracecat/Aw5ZFyf7uzEXliTH/_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/tracecat/Aw5ZFyf7uzEXliTH/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/tracecat/Aw5ZFyf7uzEXliTH/_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/tracecat/Aw5ZFyf7uzEXliTH/_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/tracecat/Aw5ZFyf7uzEXliTH/_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/tracecat/Aw5ZFyf7uzEXliTH/_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/tracecat/Aw5ZFyf7uzEXliTH/_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/tracecat/Aw5ZFyf7uzEXliTH/_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/tracecat/Aw5ZFyf7uzEXliTH/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Secrets and variables - Tracecat Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Tracecat Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.tracecat.com/agents/secrets-variables\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://tracecat.mintlify.site/_mintlify/api/og/v2?division=Building+agents\u0026amp;title=Secrets+and+variables\u0026amp;description=Pass+Tracecat+secrets+and+workspace+variables+to+preset+agent+tool+calls+securely%3A+scope+credentials+per+agent+run+and+inject+values+without+exposing+them+to+th\u0026amp;theme=25a8df60f5ebf8cdc5155556\u0026amp;signature=9c8b1e7341aed43ba14c1004e68eda3ca63b5184108ccad18473f60146163262\">\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 and variables - Tracecat Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://tracecat.mintlify.site/_mintlify/api/og/v2?division=Building+agents\u0026amp;title=Secrets+and+variables\u0026amp;description=Pass+Tracecat+secrets+and+workspace+variables+to+preset+agent+tool+calls+securely%3A+scope+credentials+per+agent+run+and+inject+values+without+exposing+them+to+th\u0026amp;theme=25a8df60f5ebf8cdc5155556\u0026amp;signature=9c8b1e7341aed43ba14c1004e68eda3ca63b5184108ccad18473f60146163262\">\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/tracecat/Aw5ZFyf7uzEXliTH/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Tracecat Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#6E7ED8\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.tracecat.com/agents/secrets-variables\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/agents/secrets-variables.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.tracecat.com/#organization\",\"name\":\"Tracecat Docs\",\"url\":\"https://docs.tracecat.com\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/tracecat/9IEnC4OWdnuB3EvN/img/logos/light.svg?fit=max\u0026auto=format\u0026n=9IEnC4OWdnuB3EvN\u0026q=85\u0026s=3d2dbc720cbb79deb7f22d4e8d710696\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.tracecat.com#website\",\"name\":\"Tracecat Docs\",\"url\":\"https://docs.tracecat.com\",\"publisher\":{\"@id\":\"https://docs.tracecat.com/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.tracecat.com/agents/secrets-variables#webpage\",\"url\":\"https://docs.tracecat.com/agents/secrets-variables\",\"name\":\"Secrets and variables\",\"description\":\"Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.\",\"dateModified\":\"2026-09-13T14:51:13.019Z\",\"isPartOf\":{\"@id\":\"https://docs.tracecat.com#website\"},\"breadcrumb\":{\"@id\":\"https://docs.tracecat.com/agents/secrets-variables#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.tracecat.com/agents/secrets-variables#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Building agents\",\"item\":\"https://docs.tracecat.com/agents/workspace-chat\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Secrets and variables\",\"item\":\"https://docs.tracecat.com/agents/secrets-variables\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.tracecat.com/agents/secrets-variables#article\",\"headline\":\"Secrets and variables\",\"name\":\"Secrets and variables\",\"description\":\"Pass Tracecat secrets and workspace variables to preset agent tool calls securely: scope credentials per agent run and inject values without exposing them to the model.\",\"url\":\"https://docs.tracecat.com/agents/secrets-variables\",\"mainEntityOfPage\":{\"@id\":\"https://docs.tracecat.com/agents/secrets-variables#webpage\"},\"dateModified\":\"2026-09-13T14:51:13.019Z\",\"publisher\":{\"@id\":\"https://docs.tracecat.com/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.tracecat.com#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Tracecat Docs\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Tracecat Docs\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/agents/secrets-variables.md","siteName":"Tracecat Docs","nav":{"global":null,"tabs":[{"tab":"Automations","groups":[{"group":"Overview","icon":"flag","pages":[{"title":"Welcome to Tracecat","href":"/overview/introduction"},{"title":"Getting started","href":"/overview/getting-started"}]},{"group":"Building automations","icon":"workflow","pages":[{"title":"Tracecat MCP","href":"/automations/tracecat-mcp"},{"group":"Core concepts","pages":[{"title":"Workflows","href":"/automations/workflows"},{"title":"Actions","href":"/automations/actions"},{"title":"Tables","href":"/automations/tables"},{"title":"Expressions","href":"/automations/core-concepts/expressions"},{"title":"Secrets","href":"/automations/core-concepts/secrets"},{"title":"External secret stores","href":"/automations/core-concepts/external-secret-stores"},{"title":"Variables","href":"/automations/core-concepts/variables"},{"title":"Workflow metadata","href":"/automations/core-concepts/workflow-metadata"},{"title":"Functions","href":"/automations/core-concepts/functions"},{"title":"JSONPath","href":"/automations/core-concepts/jsonpath"},{"title":"Workflow definition","href":"/automations/core-concepts/workflow-definition"}]},{"group":"Triggers","pages":[{"title":"Webhooks","href":"/automations/triggers/webhooks"},{"title":"Schedules","href":"/automations/triggers/schedules"},{"title":"Workflows-as-APIs","href":"/automations/triggers/workflows-as-apis"},{"title":"Error workflows","href":"/automations/triggers/error-workflows"},{"title":"Case triggers","icon":"lock","href":"/automations/triggers/case-triggers"},{"title":"Task triggers","icon":"lock","href":"/automations/triggers/task-triggers"},{"title":"Comment triggers","icon":"lock","href":"/automations/triggers/comment-triggers"},{"title":"Forms","icon":"lock","href":"/automations/triggers/forms"}]},{"group":"Integrations","pages":[{"title":"Prebuilt credentials","href":"/automations/integrations/prebuilt-credentials"},{"title":"OAuth","href":"/automations/integrations/oauth-integrations"},{"title":"MCP servers","href":"/automations/integrations/mcp-integrations"}]}]},{"group":"Building agents","icon":"sparkles","pages":[{"title":"Workspace chat","href":"/agents/workspace-chat"},{"title":"AI action","href":"/agents/ai-action"},{"title":"AI agent","href":"/agents/ai-agent"},{"title":"AI preset agent","href":"/agents/ai-preset-agent"},{"title":"LLM providers","href":"/agents/llm-providers"},{"title":"Custom LLM providers","href":"/agents/custom-llm-providers"},{"title":"Skills","description":"Create, publish, and attach Tracecat skills to preset agents so reusable instructions and files are available during agent runs.","href":"/agents/skills"},{"title":"Secrets and variables","href":"/agents/secrets-variables"},{"title":"Human-in-the-loop","description":"`tool_approvals` and the agent inbox to review tool calls before they run.","href":"/agents/human-in-the-loop"},{"title":"Timeouts","href":"/agents/timeouts"},{"title":"Channels","icon":"lock","href":"/agents/channels"}]},{"group":"Building custom integrations","icon":"blocks","pages":[{"title":"Custom registry","href":"/custom-actions/custom-registry"},{"title":"Python UDFs","href":"/custom-actions/python-udf"},{"title":"YAML templates","href":"/custom-actions/yaml-template"},{"title":"Local development","href":"/custom-actions/local-development"}]}]},{"tab":"Cases","pages":[{"title":"Cases","href":"/automations/cases"}]},{"tab":"Core Actions","pages":[{"title":"Core Actions","href":"/automations/core-actions/request-actions/http"}]},{"tab":"Integrations","pages":[{"title":"Integrations","href":"/integrations/overview"}]},{"tab":"Cheatsheets","pages":[{"title":"Cheatsheets","href":"/cheatsheets/functions"}]},{"tab":"Platform","pages":[{"title":"Platform","href":"/self-hosting/docker-compose"}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/authentication"}]}]},"basePath":"","title":"Secrets and variables - Tracecat Docs","buildId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","deploymentId":"dpl_DqYu5MPb49gWBBbUGgpHQUmCHY3P","dynamics":[],"chunks":[]}