import tempfilefrom gaia.security import PathValidator# No scope supplied: the CWD, plus anything the interactive CLI persisted.validator = PathValidator()# An explicit scope stands alone — persisted grants are NOT unioned in.# Grant the files a session actually attached, not the folders holding them.session = PathValidator(allowed_paths=["/home/user/documents/report.pdf"])# Reads: scope AND secrets. `.env`, id_rsa, *.pem, ~/.ssh/* are refused even# when they sit inside an allowed directory.is_allowed, reason = session.validate_read("/home/user/documents/report.pdf")# Writes: additionally refuses blocked directories and files that execute on# their own (.bashrc, PowerShell profiles, autostart entries, .git/**).is_allowed, reason = session.validate_write("/home/user/documents/out.md")# A scratch directory for throwaway files. Only this directory is granted — the# rest of the system temp dir stays denied, and those denials name the scratch# directory. Secret and blocked-file checks still apply inside it.session.set_scratch_dir(tempfile.mkdtemp(prefix="gaia-scratch-"))
Every agent tool that takes a path checks it with validate_read or
validate_write: reading, listing a folder, searching inside one, indexing it,
watching it, and the files a tool saves (screenshots, transcripts, speech,
exports). Out-of-scope paths go through the same approval prompt as read_file.
The validator expands ~ and resolves .. and symlinks before it decides, and a
folder walk skips any entry that leads outside the scope. Tools build on these
checks through gaia.agents.tools.path_access rather than adding their own.Three things are wider on purpose:
A name search (search_file, find_files with a named scope) can return paths
under the common document folders. Opening one is still checked. On macOS an
undirected search skips Desktop, Documents, Downloads, iCloud Drive, Music, the
TV app’s library and the Photos library unless the user named the folder or allowed it, because
macOS blocks the first read of them behind a permission prompt; the result says
which it skipped.
Output a tool writes to GAIA’s own folders (~/.gaia/screenshots,
~/.gaia/transcripts, ~/.gaia/tts) is not the user’s files and is not checked.
capture_skill may copy a local skill folder from anywhere, because every
capture asks the user first with the source shown.
ChatAgent and GaiaAgent create one scratch directory per agent that has a
file-writing tool, name it in the system prompt, and delete it when the agent is
cleaned up (GaiaAgent.close()). The chat profile has no file-writing tools, so
it gets none.
Only a validator built without an allowed_paths argument reads or writes the
machine-global grants in ~/.gaia/cache/allowed_paths.json. A host that computes a
per-session scope gets exactly that scope — one user’s one-off [a]lways approval in
the CLI must not become standing access for every later Agent UI session.
GAIA_ALLOWED_PATHS (absolute paths joined with os.pathsep) narrows every
PathValidator the process builds, whatever scope its host computed. An
evaluation harness uses it so the agent cannot read answer keys stored outside
the task folder.
import osfrom gaia.security import PathValidatoros.environ["GAIA_ALLOWED_PATHS"] = "/home/user/evals/task-17"v = PathValidator(allowed_paths=["/home/user"])v.allowed_paths # {PosixPath('/home/user/evals/task-17')}v.is_path_allowed("/home/user/evals/answers.json") # False, and never prompts
The scope becomes the overlap of the host’s scope and the list. An entry
outside the host’s scope is logged and ignored; it never widens.
Later grants are held to it too: add_allowed_path, approval prompts (including
an approve-everything harness or full access), and persisted CLI grants.
The scratch directory set by set_scratch_dir stays allowed even when it sits
outside the list, so run_python helper scripts keep working.
ChatAgent (and so GaiaAgent) narrows its allowed_paths once at
construction, so its validator, the RAG SDK and the code-index ceilings agree.
An empty value, an empty entry, a relative path or a missing folder raises
AllowedPathsEnvError (a ValueError) when the validator is built. The Agent UI
server and the flagship sidecar check it before they start serving.
This confines GAIA’s tools, not code they run. A run_python script or shell
command can still open any file the OS user can read. Real isolation needs OS-level
separation: a separate user account, a container, or a VM.
from gaia.rag.sdk import RAGSDK, RAGConfig# RAG automatically detects and blocks symlinksrag = RAGSDK(RAGConfig())# This is blocked if it's a symlink — PathValidator raises PermissionErrortry: rag.index_document("/suspicious/symlink.pdf")except PermissionError as e: print(f"Security error: {e}")
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"GAIA SDK","colors":{"primary":"#A87B2D","light":"#E2A33E","dark":"#E2A33E"},"logo":{"light":"https://mintcdn.com/amd-fe836e11/PgPhi3UrqFX2lV53/assets/favicon.ico?fit=max\u0026auto=format\u0026n=PgPhi3UrqFX2lV53\u0026q=85\u0026s=77bcf8b2d70613766cc02f16b0e208a0","dark":"https://mintcdn.com/amd-fe836e11/PgPhi3UrqFX2lV53/assets/favicon.ico?fit=max\u0026auto=format\u0026n=PgPhi3UrqFX2lV53\u0026q=85\u0026s=77bcf8b2d70613766cc02f16b0e208a0","href":"https://github.com/amd/gaia"},"favicon":"https://mintcdn.com/amd-fe836e11/PgPhi3UrqFX2lV53/assets/favicon.ico?fit=max\u0026auto=format\u0026n=PgPhi3UrqFX2lV53\u0026q=85\u0026s=77bcf8b2d70613766cc02f16b0e208a0","appearance":{"default":"system"},"navbar":{"links":[{"href":"https://github.com/amd/gaia/releases","label":"v0.25.1 · Lemonade 2026.43.3"},{"href":"https://amd-gaia.ai","label":"Main Site"}],"primary":{"type":"button","label":"Download","href":"https://amd-gaia.ai/#install"}},"footer":{"socials":{"github":"https://github.com/amd/gaia","discord":"https://discord.com/invite/5xXzkMu8Zk","twitter":"https://twitter.com/amd","linkedin":"https://linkedin.com/company/amd"}},"fonts":{"heading":{"family":"Inter"},"body":{"family":"Inter"}},"contextual":{"options":["copy","view","chatgpt","claude","cursor","vscode"],"display":"header"},"metadata":{"timestamp":false},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/amd/gaia"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/5xXzkMu8Zk"},{"anchor":"PyPI","icon":"python","href":"https://pypi.org/project/amd-gaia/"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"amd-fe836e11","hasAudioNarration":false,"actualSubdomain":"amd-fe836e11","customDomains":["amd-gaia.ai"],"gitSource":{"type":"github","owner":"amd","repo":"gaia","deployBranch":"release","contentDirectory":"docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ade720d531268f76f8ae9c4","collectionId":"8e2093a5-a49b-4254-ac9a-c0367535f98d","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ade720d531268f76f8ae9c4"},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6ade720d531268f76f8ae9c4","clientVersion":"0.0.3971","searchFilterCounts":[{"language":"default","tag":"Documentation","count":94},{"language":"default","tag":"Python Framework","count":81},{"language":"default","tag":"SDK Reference","count":35},{"language":"default","tag":"Releases","count":31},{"language":"default","tag":"Release Notes","count":31},{"language":"default","tag":"User Guides","count":29},{"language":"default","tag":"Python Specifications","count":29},{"language":"default","tag":"Roadmap","count":25},{"language":"default","tag":"SDKs","count":20},{"language":"default","tag":"Python Reference","count":17}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":".nav-tabs .nav-tabs-item{color:rgb(156 163 175)!important}.dark .nav-tabs .nav-tabs-item{color:rgb(209 213 219)!important}.nav-tabs .nav-tabs-item:has(>div.bg-primary){color:rgb(31 41 55)!important}.dark .nav-tabs .nav-tabs-item:has(>div.bg-primary){color:rgb(229 231 235)!important}.nav-tabs .nav-tabs-item>div{height:3.5px}#navbar{border-bottom:1px solid rgb(var(--gray-500)/.3)}.dark #navbar{border-bottom:1px solid rgb(var(--gray-500)/.4)}"}],"page":{"pagePath":"sdk/security","slug":"/sdk/security","pageMetadata":{"title":"Security","icon":"shield-halved","description":null,"href":"/sdk/security"},"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`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,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(Heading,{level:`1`,id:`security`,children:`Security`}),`\n`,_jsx(Badge,{text:`development`,color:`orange`}),`\n`,_jsx(Heading,{level:`2`,id:`18-1-path-validation`,children:`18.1 Path Validation`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Import:`}),` `,_jsx(_components.code,{children:`from gaia.security import PathValidator`})]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`23`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`23`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` tempfile`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` gaia.security `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PathValidator`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# No scope supplied: the CWD, plus anything the interactive CLI persisted.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`validator `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PathValidator()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# An explicit scope stands alone — persisted grants are NOT unioned in.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Grant the files a session actually attached, not the folders holding them.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`session `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PathValidator(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`allowed_paths`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/home/user/documents/report.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:\"# Reads: scope AND secrets. `.env`, id_rsa, *.pem, ~/.ssh/* are refused even\"})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# when they sit inside an allowed directory.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`is_allowed, reason `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.validate_read(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/home/user/documents/report.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Writes: additionally refuses blocked directories and files that execute on`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# their own (.bashrc, PowerShell profiles, autostart entries, .git/**).`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`is_allowed, reason `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` session.validate_write(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/home/user/documents/out.md\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# A scratch directory for throwaway files. Only this directory is granted — the`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# rest of the system temp dir stays denied, and those denials name the scratch`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# directory. Secret and blocked-file checks still apply inside it.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`session.set_scratch_dir(tempfile.mkdtemp(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`prefix`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gaia-scratch-\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`))`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Every agent tool that takes a path checks it with `,_jsx(_components.code,{children:`validate_read`}),` or\n`,_jsx(_components.code,{children:`validate_write`}),`: reading, listing a folder, searching inside one, indexing it,\nwatching it, and the files a tool saves (screenshots, transcripts, speech,\nexports). Out-of-scope paths go through the same approval prompt as `,_jsx(_components.code,{children:`read_file`}),`.\nThe validator expands `,_jsx(_components.code,{children:`~`}),` and resolves `,_jsx(_components.code,{children:`..`}),` and symlinks before it decides, and a\nfolder walk skips any entry that leads outside the scope. Tools build on these\nchecks through `,_jsx(_components.code,{children:`gaia.agents.tools.path_access`}),` rather than adding their own.`]}),`\n`,_jsx(_components.p,{children:`Three things are wider on purpose:`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`A name search (`,_jsx(_components.code,{children:`search_file`}),`, `,_jsx(_components.code,{children:`find_files`}),` with a named scope) can return paths\nunder the common document folders. Opening one is still checked. On macOS an\nundirected search skips Desktop, Documents, Downloads, iCloud Drive, Music, the\nTV app’s library and the Photos library unless the user named the folder or allowed it, because\nmacOS blocks the first read of them behind a permission prompt; the result says\nwhich it skipped.`]}),`\n`,_jsxs(_components.li,{children:[`Output a tool writes to GAIA’s own folders (`,_jsx(_components.code,{children:`~/.gaia/screenshots`}),`,\n`,_jsx(_components.code,{children:`~/.gaia/transcripts`}),`, `,_jsx(_components.code,{children:`~/.gaia/tts`}),`) is not the user’s files and is not checked.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`capture_skill`}),` may copy a local skill folder from anywhere, because every\ncapture asks the user first with the source shown.`]}),`\n`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`ChatAgent`}),` and `,_jsx(_components.code,{children:`GaiaAgent`}),` create one scratch directory per agent that has a\nfile-writing tool, name it in the system prompt, and delete it when the agent is\ncleaned up (`,_jsx(_components.code,{children:`GaiaAgent.close()`}),`). The `,_jsx(_components.code,{children:`chat`}),` profile has no file-writing tools, so\nit gets none.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Only a validator built `,_jsx(_components.strong,{children:`without`}),` an `,_jsx(_components.code,{children:`allowed_paths`}),` argument reads or writes the\nmachine-global grants in `,_jsx(_components.code,{children:`~/.gaia/cache/allowed_paths.json`}),`. A host that computes a\nper-session scope gets exactly that scope — one user’s one-off `,_jsx(_components.code,{children:`[a]lways`}),` approval in\nthe CLI must not become standing access for every later Agent UI session.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`narrowing-the-scope-for-a-run`,children:`Narrowing the scope for a run`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`GAIA_ALLOWED_PATHS`}),` (absolute paths joined with `,_jsx(_components.code,{children:`os.pathsep`}),`) narrows every\n`,_jsx(_components.code,{children:`PathValidator`}),` the process builds, whatever scope its host computed. An\nevaluation harness uses it so the agent cannot read answer keys stored outside\nthe task folder.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` os`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` gaia.security `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PathValidator`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`os.environ[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"GAIA_ALLOWED_PATHS\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`] `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/home/user/evals/task-17\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`v `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` PathValidator(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`allowed_paths`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/home/user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`v.allowed_paths `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# {PosixPath('/home/user/evals/task-17')}`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`v.is_path_allowed(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/home/user/evals/answers.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# False, and never prompts`})]}),`\n`]})})}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsx(_components.li,{children:`The scope becomes the overlap of the host’s scope and the list. An entry\noutside the host’s scope is logged and ignored; it never widens.`}),`\n`,_jsxs(_components.li,{children:[`Later grants are held to it too: `,_jsx(_components.code,{children:`add_allowed_path`}),`, approval prompts (including\nan approve-everything harness or full access), and persisted CLI grants.`]}),`\n`,_jsxs(_components.li,{children:[`The scratch directory set by `,_jsx(_components.code,{children:`set_scratch_dir`}),` stays allowed even when it sits\noutside the list, so `,_jsx(_components.code,{children:`run_python`}),` helper scripts keep working.`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.code,{children:`ChatAgent`}),` (and so `,_jsx(_components.code,{children:`GaiaAgent`}),`) narrows its `,_jsx(_components.code,{children:`allowed_paths`}),` once at\nconstruction, so its validator, the RAG SDK and the code-index ceilings agree.`]}),`\n`,_jsxs(_components.li,{children:[`An empty value, an empty entry, a relative path or a missing folder raises\n`,_jsx(_components.code,{children:`AllowedPathsEnvError`}),` (a `,_jsx(_components.code,{children:`ValueError`}),`) when the validator is built. The Agent UI\nserver and the flagship sidecar check it before they start serving.`]}),`\n`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`This confines GAIA’s tools, not code they run. A `,_jsx(_components.code,{children:`run_python`}),` script or shell\ncommand can still open any file the OS user can read. Real isolation needs OS-level\nseparation: a separate user account, a container, or a VM.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`18-2-symlink-detection`,children:`18.2 Symlink Detection`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`10`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` gaia.rag.sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:` RAGSDK`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, RAGConfig`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# RAG automatically detects and blocks symlinks`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`rag `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` RAGSDK(RAGConfig())`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# This is blocked if it's a symlink — PathValidator raises PermissionError`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` rag.index_document(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"/suspicious/symlink.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` PermissionError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Security error: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`e`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`18-3-file-size-limits`,children:`18.3 File Size Limits`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`13`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`13`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` gaia.rag.sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` RAGConfig, `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#D4D4D4`},children:`RAGSDK`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`config `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` RAGConfig(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` max_file_size_mb`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`50`}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Reject files > 50MB`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`rag `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` RAGSDK(config)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Automatically rejects large files`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` rag.index_document(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"huge_file.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 100MB`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`except`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` ValueError`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` e:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"File too large: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`e`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`related-topics`,children:`Related Topics`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/sdk/core/agent-system`,children:`Core Agent System`}),` - Agent security configuration`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/sdk/sdks/rag`,children:`RAG SDK`}),` - Document security`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/sdk/mixins/tool-mixins#file-operations-mixin`,children:`File Operations`}),` - File tool security`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/sdk/best-practices`,children:`Best Practices`}),` - Security best practices`]}),`\n`]}),`\n`,_jsx(_components.hr,{}),`\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":"Security","icon":"shield-halved","description":null,"href":"/sdk/security"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Security","slug":"security","depth":1,"children":[]},{"title":"18.1 Path Validation","slug":"18-1-path-validation","depth":2,"children":[{"title":"Narrowing the scope for a run","slug":"narrowing-the-scope-for-a-run","depth":3,"children":[]}]},{"title":"18.2 Symlink Detection","slug":"18-2-symlink-detection","depth":2,"children":[]},{"title":"18.3 File Size Limits","slug":"18-3-file-size-limits","depth":2,"children":[]},{"title":"Related Topics","slug":"related-topics","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/amd-fe836e11/8c80882acf24ecda/server.js"],"subdomain":"amd-fe836e11","siteName":"GAIA SDK","title":"Security - GAIA SDK","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-25T21:18:31.093Z","originalFileLocation":"sdk/security.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=\"application-name\" content=\"GAIA SDK\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Security - GAIA SDK\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"GAIA SDK\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://amd-gaia.ai/docs/sdk/security\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://amd-fe836e11.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Security\u0026amp;theme=930f36e80adfafeb4328e01d\u0026amp;signature=888a8d80c7262cab5ba050289f5f24a4594fe7c1c9b6cee743ddf5f882632441\">\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=\"Security - GAIA SDK\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://amd-fe836e11.mintlify.app/_mintlify/api/og/v2?division=Guides\u0026amp;title=Security\u0026amp;theme=930f36e80adfafeb4328e01d\u0026amp;signature=888a8d80c7262cab5ba050289f5f24a4594fe7c1c9b6cee743ddf5f882632441\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/amd-fe836e11/Dg3wj8yq7cr3ck3W/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"GAIA SDK\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#A87B2D\">\u003clink data-mint-head rel=\"canonical\" href=\"https://amd-gaia.ai/docs/sdk/security\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/sdk/security.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://amd-gaia.ai/#organization\",\"name\":\"GAIA SDK\",\"url\":\"https://amd-gaia.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/amd-fe836e11/PgPhi3UrqFX2lV53/assets/favicon.ico?fit=max\u0026auto=format\u0026n=PgPhi3UrqFX2lV53\u0026q=85\u0026s=77bcf8b2d70613766cc02f16b0e208a0\"}},{\"@type\":\"WebSite\",\"@id\":\"https://amd-gaia.ai/docs#website\",\"name\":\"GAIA SDK\",\"url\":\"https://amd-gaia.ai/docs\",\"publisher\":{\"@id\":\"https://amd-gaia.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://amd-gaia.ai/docs/sdk/security#webpage\",\"url\":\"https://amd-gaia.ai/docs/sdk/security\",\"name\":\"Security\",\"dateModified\":\"2026-10-25T21:18:31.093Z\",\"isPartOf\":{\"@id\":\"https://amd-gaia.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://amd-gaia.ai/docs/sdk/security#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://amd-gaia.ai/docs/sdk/security#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Python Framework\",\"item\":\"https://amd-gaia.ai/docs/guides/install\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SDK Reference\",\"item\":\"https://amd-gaia.ai/docs/sdk/index\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Guides\",\"item\":\"https://amd-gaia.ai/docs/sdk/packaging\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Security\",\"item\":\"https://amd-gaia.ai/docs/sdk/security\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://amd-gaia.ai/docs/sdk/security#article\",\"headline\":\"Security\",\"name\":\"Security\",\"url\":\"https://amd-gaia.ai/docs/sdk/security\",\"mainEntityOfPage\":{\"@id\":\"https://amd-gaia.ai/docs/sdk/security#webpage\"},\"dateModified\":\"2026-10-25T21:18:31.093Z\",\"publisher\":{\"@id\":\"https://amd-gaia.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://amd-gaia.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"GAIA SDK\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"GAIA SDK","nav":{"global":{"anchors":[{"anchor":"GitHub","icon":"github","href":"https://github.com/amd/gaia"},{"anchor":"Discord","icon":"discord","href":"https://discord.com/invite/5xXzkMu8Zk"},{"anchor":"PyPI","icon":"python","href":"https://pypi.org/project/amd-gaia/"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting Started","pages":[{"title":"Welcome","icon":"hand-wave","href":""}]},{"group":"C++ Framework","pages":[{"title":"Setup","icon":"wrench","href":"/cpp/setup"},{"title":"Quickstart","icon":"rocket","href":"/cpp/quickstart"},{"title":"Overview","icon":"code","href":"/cpp/overview"},{"title":"Integration Guide","icon":"puzzle-piece","href":"/cpp/integration"},{"title":"Testing","icon":"flask-vial","href":"/cpp/testing"},{"title":"API Reference","icon":"book-open","href":"/cpp/api-reference"},{"title":"C++ Security","icon":"lock","href":"/cpp/security"},{"group":"User Guides","pages":[{"title":"Bash Coding Agent","icon":"terminal","href":"/cpp/bash-agent"},{"title":"System Health Agent","icon":"desktop","href":"/cpp/health-agent"},{"title":"Wi-Fi Troubleshooter Agent","icon":"wifi","href":"/cpp/wifi-agent"},{"title":"Process Analyst Agent","icon":"microchip","href":"/cpp/process-agent"},{"title":"Custom Agent","icon":"sliders","href":"/cpp/custom-agent"}]}]},{"group":"Python Framework","pages":[{"title":"Install GAIA","icon":"download","href":"/guides/install"},{"title":"Setup","icon":"wrench","href":"/setup"},{"title":"Quickstart","icon":"rocket","href":"/quickstart"},{"title":"Agent UI","icon":"desktop","href":"/guides/agent-ui"},{"title":"Terminal UI","icon":"terminal","href":"/guides/tui"},{"title":"Agent Memory","icon":"brain","href":"/guides/memory"},{"group":"User Guides","pages":[{"title":"User Guides","icon":"book","href":"/guides/index"},{"group":"Setup \u0026 Hardware","pages":[{"title":"Hardware Advisor","icon":"microchip","href":"/guides/hardware-advisor"},{"title":"NPU Acceleration","icon":"bolt","href":"/guides/npu"},{"title":"AMD LLM Gateway","href":"/guides/llm-gateway"}]},{"group":"Core Agents","pages":[{"title":"GAIA Agent","icon":"sparkles","href":"/guides/gaia"},{"title":"Complete document inventories","href":"/guides/document-extraction"},{"title":"Choose an AI provider","href":"/guides/ai-providers"},{"title":"Document Q\u0026A","icon":"file-lines","href":"/guides/chat"},{"title":"Browser Use","icon":"globe","href":"/guides/browser-use"},{"title":"Improve GAIA while using it","href":"/guides/harness-engineering"},{"title":"Voice Interaction","icon":"microphone","href":"/guides/talk"},{"title":"Transcription \u0026 Meeting Notes","icon":"file-audio","href":"/guides/transcription"}]},{"group":"Developer Tools","pages":[{"title":"Code Index","icon":"folder-magnifying-glass","href":"/guides/code-index"},{"title":"Project Map","icon":"map","href":"/guides/project-map"}]},{"group":"Connected Agents","pages":[{"title":"Email","icon":"envelope","href":"/guides/email"},{"title":"Slack","icon":"slack","href":"/guides/slack"},{"title":"Telegram Adapter","icon":"paper-plane","href":"/guides/telegram-adapter"}]},{"group":"Build \u0026 Extend","pages":[{"title":"Starter Skills","icon":"puzzle-piece","href":"/guides/starter-skills"},{"title":"Custom Agents","icon":"wand-magic-sparkles","href":"/guides/custom-agent"},{"title":"Composing Skills and Skill Sets","icon":"layer-group","href":"/guides/composing-skills"}]},{"group":"MCP Integration","pages":[{"title":"Agent UI MCP Server","icon":"plug","href":"/guides/mcp/agent-ui"},{"title":"TUI Control MCP Server","icon":"terminal","href":"/guides/mcp/tui"},{"title":"MCP Client","href":"/guides/mcp/client"},{"title":"Windows MCP System Health Agent","icon":"heart-pulse","href":"/guides/mcp/windows-system-health"}]}]},{"group":"Connectors","pages":[{"title":"Connectors","icon":"plug","href":"/connectors/index"},{"title":"Google","icon":"google","href":"/connectors/google"},{"title":"Microsoft","icon":"microsoft","href":"/connectors/microsoft"},{"title":"GitHub","icon":"github","href":"/connectors/github"},{"title":"Tavily","icon":"globe","href":"/connectors/tavily"},{"title":"Connections Security Model","icon":"shield","href":"/security/connections"},{"title":"OAuth Connection Threat Model","icon":"lock","href":"/security/connectors"}]},{"group":"Agent Eval","pages":[{"title":"Agent Eval","icon":"microscope","href":"/guides/eval"},{"title":"Scenario Authoring","icon":"file-pen","href":"/guides/eval-scenarios"},{"title":"CI/CD Integration","icon":"gears","href":"/guides/eval-ci"}]},{"group":"Playbooks","pages":[{"title":"GAIA Playbooks","icon":"book-atlas","href":"/playbooks/index"},{"group":"Hardware Advisor Agent","pages":[{"title":"Building a Hardware Advisor Agent","icon":"microchip","href":"/playbooks/hardware-advisor/index"}]},{"group":"Document Q\u0026A Agent","pages":[{"title":"Part 1: Getting Started with Document Q\u0026A Agents","icon":"book-open-reader","href":"/playbooks/chat-agent/part-1-getting-started"},{"title":"Part 2: Advanced Features \u0026 Customization","icon":"wrench","href":"/playbooks/chat-agent/part-2-advanced-features"},{"title":"Part 3: Deployment \u0026 Optimization","icon":"graduation-cap","href":"/playbooks/chat-agent/part-3-deployment"}]},{"group":"Custom Installer","pages":[{"title":"Custom Installer Playbook","icon":"play","href":"/playbooks/custom-installer/index"}]}]},{"group":"SDK Reference","pages":[{"title":"SDK Reference","icon":"book","href":"/sdk/index"},{"group":"Core Concepts","pages":[{"title":"Understanding the Agent System","icon":"robot","href":"/sdk/core/agent-system"},{"title":"Creating Tools: Giving Agents Superpowers","icon":"screwdriver-wrench","href":"/sdk/core/tools"},{"title":"Output Handlers","icon":"terminal","href":"/sdk/core/console"},{"title":"Agent Patterns Cookbook","icon":"code","href":"/sdk/patterns"}]},{"group":"SDKs","pages":[{"title":"Agent SDK","icon":"comments","href":"/sdk/sdks/chat"},{"title":"Memory SDK","icon":"brain","href":"/sdk/sdks/memory"},{"title":"Agent UI SDK","icon":"desktop","href":"/sdk/sdks/agent-ui"},{"title":"RAG: Teaching Your Agent About Documents","href":"/sdk/sdks/rag"},{"title":"Code Index SDK","icon":"folder-magnifying-glass","href":"/sdk/sdks/code-index"},{"title":"MCP Client","icon":"plug","href":"/sdk/sdks/mcp"},{"title":"LLM Integration","icon":"brain","href":"/sdk/sdks/llm"},{"title":"Vision-Language Models","icon":"eye","href":"/sdk/sdks/vlm"},{"title":"Audio \u0026 Voice","href":"/sdk/sdks/audio"},{"title":"Governance: Optional Policy Layer for Agents","href":"/sdk/sdks/governance"},{"title":"Skills SDK","href":"/sdk/sdks/skills"}]},{"group":"Infrastructure","pages":[{"title":"API Server","href":"/sdk/infrastructure/api-server"},{"title":"MCP Integration","href":"/sdk/infrastructure/mcp"},{"title":"Connectors SDK","href":"/sdk/infrastructure/connectors"}]},{"group":"Agents","pages":[{"title":"Specialized","href":"/sdk/agents/specialized"},{"title":"Talk SDK","href":"/sdk/agents/talk"}]},{"group":"Mixins \u0026 Utilities","pages":[{"title":"Tool Mixins","icon":"puzzle-piece","href":"/sdk/mixins/tool-mixins"},{"title":"DatabaseMixin","icon":"database","href":"/sdk/mixins/database-mixin"},{"title":"FileWatcher","icon":"file-magnifying-glass","href":"/sdk/utils/file-watcher"}]},{"group":"Guides","pages":[{"title":"Application Packaging","icon":"box","href":"/sdk/packaging"},{"title":"Configuration","icon":"gear","href":"/sdk/configuration"},{"title":"Testing","icon":"vial","href":"/sdk/testing"},{"title":"Performance Analysis Plotter","icon":"chart-bar","description":null,"href":"/sdk/performance-analysis-plotter"},{"title":"Security","icon":"shield-halved","href":"/sdk/security"},{"title":"Best Practices","icon":"star","description":null,"href":"/sdk/best-practices"}]},{"group":"Resources","pages":[{"title":"Complete Examples","icon":"lightbulb","href":"/sdk/examples"},{"title":"Advanced Patterns","icon":"diagram-project","href":"/sdk/advanced-patterns"},{"title":"API Reference Summary","icon":"book-open","href":"/sdk/api-reference"},{"title":"Migration Guide","icon":"arrow-right-arrow-left","href":"/sdk/migration"},{"title":"Troubleshooting","icon":"circle-question","href":"/sdk/troubleshooting"}]}]}]}]},{"tab":"Python Specifications","pages":[{"title":"Python Specifications","href":"/spec/agent-base"}]},{"tab":"Python Reference","pages":[{"title":"Python Reference","href":"/reference/cli"}]},{"tab":"Python Deployment","pages":[{"title":"Python Deployment","href":"/integrations/vscode"}]},{"tab":"Roadmap","pages":[{"title":"Roadmap","href":"/roadmap"}]},{"tab":"Releases","pages":[{"title":"Releases","href":"/releases"}]}]},"title":"Security - GAIA SDK","buildId":"dpl_GvhK4qVXq51DpfYJLCtPpYNN4YHN","deploymentId":"dpl_GvhK4qVXq51DpfYJLCtPpYNN4YHN","dynamics":[],"chunks":[]}