Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.
A published Site is a static or server-rendered frontend Arg hosts for you. Its frontend can use @arg/sdk in two different situations, with two different sources of authority.
When a viewer opens the Site from Apps, or from a .app launcher, on web, desktop, iOS or Android, Arg wraps it with a bridge. Bundle the SDK into the Site like any dependency:
The Site sees the signed-in viewer, not its publisher, and only after that viewer enables Permissions → Workspace access for it. The grant starts off for every Site and every account, and works like an app preview’s:
Folder scope reads relative to the Site’s source folder in the workspace; Workspace scope, Read and write and Actions are separate choices.
It is remembered for that Site, origin and source folder, including published updates.
Revoking it, or changing account, replaces the guest so nothing survives in memory.
Credentials stay in Arg: the page never holds a token, and its normal fetch() calls and assets keep going to the Site’s own network. The bridge serves files, embedded SQLite, identity and members, chats, workspace discovery and Actions with their usual gates.Two limits: a shared-origin development URL does not get a bridge, only the Site’s canonical origin does; and Android needs a current system WebView.
The same Site opened in an ordinary browser tab renders anonymously if it is public, or behind its normal viewing authorization if it is workspace-only. There, arg.ready rejects with bridge_unavailable and nothing attaches a viewer or publisher account. Handle it with your app’s signed-out state:
A frontend that must work outside Arg - a Site with its own users, or any app you host - reaches the SDK through a gateway your app server mounts on the same origin. The browser half:
import { createHostedClient } from "@arg/sdk/hosted";const arg = await createHostedClient({ endpoint: "/api/arg-sdk" });const principal = await arg.auth.principal();
createHostedClient connects to that endpoint and nothing else: it does not log visitors in, does not exchange a Site’s viewing authorization for account access, and never attaches the publisher’s identity. Your server already owns an authenticated session for the visitor (or a service identity) and decides what that session may do.
authenticate runs on every request and returns the server-owned session: a workspace-bound transport, an explicit list of permitted operations, and an authorize check per call. Return null for an expired or revoked session and false from authorize to deny a call. Never pick the credential, workspace or role from anything the guest sent.The gateway itself checks one exact origin, the JSON content type and the protocol header, emits no CORS headers, rejects oversized bodies and hides internal error messages, following the non-simple request and origin defences for CSRF. It is a transport adapter: cookie verification, installation consent, audience binding, expiry, revocation and resource authorization belong in your authenticate and authorize.
Allowing actions.run is not a narrow file grant. Authorize the Action id and what it can do
downstream: an Action that executes code or starts an agent must not receive a broader workspace
or integration scope than the app was granted.
A Server (a long-running process on an HTTPS URL) receives its own Action capability token. On that server, use createCapabilityClient rather than an account credential; its frontend, if it needs the SDK, goes through a gateway exactly as above.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"arg.ai","colors":{"primary":"#18181B","light":"#A1A1AA","dark":"#27272A"},"logo":{"light":"https://mintcdn.com/relevanceai-docs/zsccF0hnTHoJIc4d/logo/light.svg?fit=max\u0026auto=format\u0026n=zsccF0hnTHoJIc4d\u0026q=85\u0026s=0e8f44bd3b309a747d1f730aff1238ce","dark":"https://mintcdn.com/relevanceai-docs/zsccF0hnTHoJIc4d/logo/dark.svg?fit=max\u0026auto=format\u0026n=zsccF0hnTHoJIc4d\u0026q=85\u0026s=3b87c38bf2bcd7b17b07a319d5550e4e"},"favicon":"https://mintcdn.com/relevanceai-docs/zsccF0hnTHoJIc4d/favicon.svg?fit=max\u0026auto=format\u0026n=zsccF0hnTHoJIc4d\u0026q=85\u0026s=f42be0aa1bc2118fed1fd28467715463","api":{"playground":{"display":"interactive"},"examples":{"defaults":"required","languages":["curl","python","javascript"],"prefill":true,"autogenerate":true}},"navbar":{"links":[{"href":"mailto:[email protected]","label":"Support"}],"primary":{"type":"button","label":"Open arg.ai","href":"https://arg.ai"}},"footer":{"socials":{"github":"https://github.com/arg-ai"}},"seo":{"metatags":{"og:type":"website","og:site_name":"arg.ai docs","twitter:card":"summary_large_image"},"indexing":"navigable"},"banner":{"content":"New: the [Agent API](/guides/agents/runs) and [Actions](/guides/actions) guides, plus a fully regenerated API reference. [See the changelog](/changelog).","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude","perplexity","mcp","cursor","vscode","download-spec"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"anchors":[{"anchor":"API Reference","icon":"terminal","href":"/api-reference/introduction"},{"anchor":"GitHub","icon":"github","href":"https://github.com/arg-ai"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"relevanceai-docs","hasAudioNarration":false,"actualSubdomain":"relevanceai-docs","customDomains":["developers.arg.ai"],"gitSource":{"type":"github","owner":"relevanceai","repo":"arg","deployBranch":"main","contentDirectory":"mintlify-docs","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"ENABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"ENABLED"}},"buildId":"6aed57a32ff3555c21a911a0","clientVersion":"0.0.4087","searchFilterCounts":[{"language":"default","tag":"API Reference","count":156},{"language":"default","tag":"Documentation","count":76},{"language":"default","tag":"Integrations","count":32},{"language":"default","tag":"Files","count":27},{"language":"default","tag":"Organizations","count":21},{"language":"default","tag":"Automations","count":14},{"language":"default","tag":"Agent","count":12},{"language":"default","tag":"Sites","count":12},{"language":"default","tag":"Arg SDK","count":11},{"language":"default","tag":"Workspaces","count":10}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"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},{"name":"comment-mode","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":"[data-component-part=\"update-tag\"]{padding:2px 10px!important;border-radius:9999px!important;border:1px solid color-mix(in srgb, currentColor 24%, transparent);background:color-mix(in srgb, currentColor 12%, transparent);font-weight:500;line-height:1.5}[data-component-part=\"update-tag\"][data-tag=\"docs\"]{color:#6366f1}[data-component-part=\"update-tag\"][data-tag=\"files\"]{color:#0ea5e9}[data-component-part=\"update-tag\"][data-tag=\"models\"]{color:#8b5cf6}[data-component-part=\"update-tag\"][data-tag=\"workspaces\"]{color:#10b981}[data-component-part=\"update-tag\"][data-tag=\"sdk\"]{color:#f59e0b}[data-component-part=\"update-tag\"][data-tag=\"automations\"]{color:#ec4899}[data-component-part=\"update-tag\"][data-tag=\"api\"]{color:#14b8a6}:root{--arg-terminal-bg: #09090b;--arg-terminal-bar: #18181b;--arg-terminal-border: #27272a;--arg-terminal-title: #d4d4d8}.code-block:has(code[language=\"shellscript\"]),.code-block:has(code[language=\"bash\"]),.code-block:has(code[language=\"sh\"]),.code-block:has(code[language=\"shell\"]),.code-block:has(code[language=\"console\"]),.code-block:has(code[language=\"zsh\"]){background:var(--arg-terminal-bg)!important;border:1px solid var(--arg-terminal-border);box-shadow:0 1px 2px rgb(60 45 20 / 0.05),\n 0 6px 16px -4px rgb(60 45 20 / 0.1),\n 0 30px 70px -18px rgb(50 38 18 / 0.38)}.code-block:has(code[language=\"shellscript\"]) [data-component-part=\"code-block-root\"],.code-block:has(code[language=\"bash\"]) [data-component-part=\"code-block-root\"],.code-block:has(code[language=\"sh\"]) [data-component-part=\"code-block-root\"],.code-block:has(code[language=\"shell\"]) [data-component-part=\"code-block-root\"],.code-block:has(code[language=\"console\"]) [data-component-part=\"code-block-root\"],.code-block:has(code[language=\"zsh\"]) [data-component-part=\"code-block-root\"],.code-block:has(code[language=\"shellscript\"]) pre.shiki,.code-block:has(code[language=\"bash\"]) pre.shiki,.code-block:has(code[language=\"sh\"]) pre.shiki,.code-block:has(code[language=\"shell\"]) pre.shiki,.code-block:has(code[language=\"console\"]) pre.shiki,.code-block:has(code[language=\"zsh\"]) pre.shiki{background:transparent!important}.code-block:has(code[language=\"shellscript\"]) pre.shiki,.code-block:has(code[language=\"bash\"]) pre.shiki,.code-block:has(code[language=\"sh\"]) pre.shiki,.code-block:has(code[language=\"shell\"]) pre.shiki,.code-block:has(code[language=\"console\"]) pre.shiki,.code-block:has(code[language=\"zsh\"]) pre.shiki,.code-block:has(code[language=\"shellscript\"]) pre.shiki span,.code-block:has(code[language=\"bash\"]) pre.shiki span,.code-block:has(code[language=\"sh\"]) pre.shiki span,.code-block:has(code[language=\"shell\"]) pre.shiki span,.code-block:has(code[language=\"console\"]) pre.shiki span,.code-block:has(code[language=\"zsh\"]) pre.shiki span{color:var(--shiki-dark)!important}.code-block:has(code[language=\"shellscript\"]) .code-block-fade-overlay,.code-block:has(code[language=\"bash\"]) .code-block-fade-overlay,.code-block:has(code[language=\"sh\"]) .code-block-fade-overlay,.code-block:has(code[language=\"shell\"]) .code-block-fade-overlay,.code-block:has(code[language=\"console\"]) .code-block-fade-overlay,.code-block:has(code[language=\"zsh\"]) .code-block-fade-overlay{background:linear-gradient(\n to right,\n rgb(9 9 11 / 0) 0,\n rgb(9 9 11 / 0.85) 24px,\n var(--arg-terminal-bg) 48px\n )!important}.code-block:has(code[language=\"shellscript\"]) [data-component-part=\"code-block-header\"],.code-block:has(code[language=\"bash\"]) [data-component-part=\"code-block-header\"],.code-block:has(code[language=\"sh\"]) [data-component-part=\"code-block-header\"],.code-block:has(code[language=\"shell\"]) [data-component-part=\"code-block-header\"],.code-block:has(code[language=\"console\"]) [data-component-part=\"code-block-header\"],.code-block:has(code[language=\"zsh\"]) [data-component-part=\"code-block-header\"]{background:var(--arg-terminal-bar);border-bottom:1px solid var(--arg-terminal-border);padding:0.375rem 0.625rem 0.375rem 0.75rem}.code-block:has(code[language=\"shellscript\"]) [data-component-part=\"code-block-header-filename\"],.code-block:has(code[language=\"bash\"]) [data-component-part=\"code-block-header-filename\"],.code-block:has(code[language=\"sh\"]) [data-component-part=\"code-block-header-filename\"],.code-block:has(code[language=\"shell\"]) [data-component-part=\"code-block-header-filename\"],.code-block:has(code[language=\"console\"]) [data-component-part=\"code-block-header-filename\"],.code-block:has(code[language=\"zsh\"]) [data-component-part=\"code-block-header-filename\"]{color:var(--arg-terminal-title)!important;font-family:ui-monospace, SFMono-Regular, Menlo, monospace;font-size:0.75rem;user-select:none}.code-block:has(code[language=\"shellscript\"]) [data-component-part=\"code-block-header-filename\"]::before,.code-block:has(code[language=\"bash\"]) [data-component-part=\"code-block-header-filename\"]::before,.code-block:has(code[language=\"sh\"]) [data-component-part=\"code-block-header-filename\"]::before,.code-block:has(code[language=\"shell\"]) [data-component-part=\"code-block-header-filename\"]::before,.code-block:has(code[language=\"console\"]) [data-component-part=\"code-block-header-filename\"]::before,.code-block:has(code[language=\"zsh\"]) [data-component-part=\"code-block-header-filename\"]::before{content:\"\";flex:none;width:9px;height:9px;border-radius:9999px;background:#ff5f57;box-shadow:14px 0 0 #febc2e,\n 28px 0 0 #28c840;margin-right:2.375rem}"}],"page":{"pagePath":"guides/sdk/hosted-sites","slug":"/guides/sdk/hosted-sites","pageMetadata":{"title":"Published Sites and hosted frontends","description":"Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.","href":"/guides/sdk/hosted-sites"},"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: \"Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Heading,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`A published `,_jsx(_components.a,{href:`/guides/sdk/actions#workspace-resources`,children:`Site`}),` is a static or server-rendered frontend Arg hosts for you. Its frontend can use `,_jsx(_components.code,{children:`@arg/sdk`}),` in two different situations, with two different sources of authority.`]}),`\n`,_jsx(Heading,{level:`2`,id:`opened-inside-arg`,children:`Opened inside Arg`}),`\n`,_jsxs(_components.p,{children:[`When a viewer opens the Site from `,_jsx(_components.strong,{children:`Apps`}),`, or from a `,_jsx(_components.code,{children:`.app`}),` launcher, on web, desktop, iOS or Android, Arg wraps it with a bridge. Bundle the SDK into the Site like any dependency:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`1`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`1`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`npm`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` install`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` @arg/sdk`})]}),`\n`]})})}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`5`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`5`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`arg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@arg/sdk\"`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` arg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ready`}),_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\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` viewer`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` arg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`principal`}),_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\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` settings`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` arg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`fs`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`readJSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"./settings.json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`The Site sees the `,_jsx(_components.strong,{children:`signed-in viewer`}),`, not its publisher, and only after that viewer enables `,_jsx(_components.strong,{children:`Permissions → Workspace access`}),` for it. The grant starts off for every Site and every account, and works like an app preview’s:`]}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Folder scope reads relative to the Site’s source folder in the workspace; Workspace scope, `,_jsx(_components.strong,{children:`Read and write`}),` and `,_jsx(_components.strong,{children:`Actions`}),` are separate choices.`]}),`\n`,_jsx(_components.li,{children:`It is remembered for that Site, origin and source folder, including published updates.`}),`\n`,_jsx(_components.li,{children:`Revoking it, or changing account, replaces the guest so nothing survives in memory.`}),`\n`]}),`\n`,_jsxs(_components.p,{children:[`Credentials stay in Arg: the page never holds a token, and its normal `,_jsx(_components.code,{children:`fetch()`}),` calls and assets keep going to the Site’s own network. The bridge serves files, embedded SQLite, identity and members, chats, workspace discovery and Actions with their usual gates.`]}),`\n`,_jsx(_components.p,{children:`Two limits: a shared-origin development URL does not get a bridge, only the Site’s canonical origin does; and Android needs a current system WebView.`}),`\n`,_jsx(Heading,{level:`3`,id:`outside-arg-without-a-gateway`,children:`Outside Arg, without a gateway`}),`\n`,_jsxs(_components.p,{children:[`The same Site opened in an ordinary browser tab renders anonymously if it is public, or behind its normal viewing authorization if it is workspace-only. There, `,_jsx(_components.code,{children:`arg.ready`}),` rejects with `,_jsx(_components.code,{children:`bridge_unavailable`}),` and nothing attaches a viewer or publisher account. Handle it with your app’s signed-out state:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`6`,children:[_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` arg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ready`}),_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:`} `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`code`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ===`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"bridge_unavailable\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`showSignedOut`}),_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:` else`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` throw`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`hosted-frontends-outside-arg`,children:`Hosted frontends outside Arg`}),`\n`,_jsxs(_components.p,{children:[`A frontend that must work outside Arg - a Site with its own users, or any app you host - reaches the SDK through a `,_jsx(_components.strong,{children:`gateway your app server mounts on the same origin`}),`. The browser half:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`4`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createHostedClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@arg/sdk/hosted\"`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` arg`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createHostedClient`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({ `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`endpoint:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/api/arg-sdk\"`}),_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\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` principal`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` arg`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`auth`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`principal`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`createHostedClient`}),` connects to that endpoint and nothing else: it does not log visitors in, does not exchange a Site’s viewing authorization for account access, and never attaches the publisher’s identity. Your server already owns an authenticated session for the visitor (or a service identity) and decides what that session may do.`]}),`\n`,_jsx(Heading,{level:`3`,id:`the-gateway`,children:`The gateway`}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`createGateway`}),` from `,_jsx(_components.code,{children:`@arg/sdk/gateway`}),` returns a `,_jsx(_components.code,{children:`(request: Request) => Promise\u003cResponse>`}),` handler for any standard Request/Response server:`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`20`,language:`typescript`,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:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`20`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createGateway`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@arg/sdk/gateway\"`}),_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:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`createServerTransport`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@arg/sdk/server\"`}),_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:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`export`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` handleSdk`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createGateway`}),_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\":`#9CDCFE`},children:` origin:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://app.example.com\"`}),_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\":`#9CDCFE`},children:` path:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"/api/arg-sdk\"`}),_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\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` authenticate`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_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\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` session`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` sessions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`fromCookie`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`request`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// your own session store`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`revoked`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`return`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` null`}),_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:` return`}),_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\":`#9CDCFE`},children:` transport:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` createServerTransport`}),_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\":`#9CDCFE`},children:` workspaceId:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`workspaceId`}),_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\":`#9CDCFE`},children:` auth:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"api-key\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`key:`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` keyFor`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) },`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }),`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` operations:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auth.principal\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fs.read\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fs.readJSON\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"fs.list\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"actions.run\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` authorize`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ({ `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`operation`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` operation`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"actions.run\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` ALLOWED_ACTIONS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`has`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`String`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`args`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])),`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` };`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.code,{children:`authenticate`}),` runs on every request and returns the server-owned session: a workspace-bound `,_jsx(_components.code,{children:`transport`}),`, an explicit list of permitted `,_jsx(_components.code,{children:`operations`}),`, and an `,_jsx(_components.code,{children:`authorize`}),` check per call. Return `,_jsx(_components.code,{children:`null`}),` for an expired or revoked session and `,_jsx(_components.code,{children:`false`}),` from `,_jsx(_components.code,{children:`authorize`}),` to deny a call. Never pick the credential, workspace or role from anything the guest sent.`]}),`\n`,_jsxs(_components.p,{children:[`The gateway itself checks one exact origin, the JSON content type and the protocol header, emits no CORS headers, rejects oversized bodies and hides internal error messages, following the `,_jsx(_components.a,{href:`https://developer.mozilla.org/en-US/docs/Web/Security/Attacks/CSRF`,children:`non-simple request and origin defences for CSRF`}),`. It is a transport adapter: cookie verification, installation consent, audience binding, expiry, revocation and resource authorization belong in your `,_jsx(_components.code,{children:`authenticate`}),` and `,_jsx(_components.code,{children:`authorize`}),`.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[`Allowing `,_jsx(_components.code,{children:`actions.run`}),` is not a narrow file grant. Authorize the Action id `,_jsx(_components.strong,{children:`and`}),` what it can do\ndownstream: an Action that executes code or starts an agent must not receive a broader workspace\nor integration scope than the app was granted.`]})}),`\n`,_jsx(Heading,{level:`3`,id:`servers-with-capability-tokens`,children:`Servers with capability tokens`}),`\n`,_jsxs(_components.p,{children:[`A Server (a long-running process on an HTTPS URL) receives its own Action capability token. On that server, use `,_jsx(_components.a,{href:`/guides/sdk/server#sites-and-servers-with-their-own-tokens`,children:_jsx(_components.code,{children:`createCapabilityClient`})}),` rather than an account credential; its frontend, if it needs the SDK, goes through a gateway exactly as above.`]})]})}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":"Published Sites and hosted frontends","description":"Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.","href":"/guides/sdk/hosted-sites"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Opened inside Arg","slug":"opened-inside-arg","depth":2,"children":[{"title":"Outside Arg, without a gateway","slug":"outside-arg-without-a-gateway","depth":3,"children":[]}]},{"title":"Hosted frontends outside Arg","slug":"hosted-frontends-outside-arg","depth":2,"children":[{"title":"The gateway","slug":"the-gateway","depth":3,"children":[]},{"title":"Servers with capability tokens","slug":"servers-with-capability-tokens","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/relevanceai-docs/b158b20cc35b89b7/custom.js"],"subdomain":"relevanceai-docs","siteName":"arg.ai","title":"Published Sites and hosted frontends - arg.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-09-14T10:09:35.445Z","originalFileLocation":"guides/sdk/hosted-sites.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=\"Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.\">\u003cmeta data-mint-head name=\"application-name\" content=\"arg.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/relevanceai-docs/AkHi6r04eAFa6tzw/_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/relevanceai-docs/AkHi6r04eAFa6tzw/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/relevanceai-docs/AkHi6r04eAFa6tzw/_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/relevanceai-docs/AkHi6r04eAFa6tzw/_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/relevanceai-docs/AkHi6r04eAFa6tzw/_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/relevanceai-docs/AkHi6r04eAFa6tzw/_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/relevanceai-docs/AkHi6r04eAFa6tzw/_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/relevanceai-docs/AkHi6r04eAFa6tzw/_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/relevanceai-docs/AkHi6r04eAFa6tzw/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Published Sites and hosted frontends - arg.ai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"arg.ai docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://developers.arg.ai/guides/sdk/hosted-sites\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://relevanceai-docs.mintlify.site/_mintlify/api/og/v2?division=Arg+SDK\u0026amp;title=Published+Sites+and+hosted+frontends\u0026amp;description=Bundle+%40arg%2Fsdk+into+a+Site%3A+opened+inside+Arg+it+reaches+the+signed-in+viewer+after+consent%3B+outside+Arg+it+talks+to+a+gateway+your+own+app+server+mounts.\u0026amp;theme=977ce49dde30d3c62b6e0fad\u0026amp;signature=098ef31de8aadf704d3298819b58fba515167488e9badf204abe7d04e0907e6f\">\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=\"Published Sites and hosted frontends - arg.ai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://relevanceai-docs.mintlify.site/_mintlify/api/og/v2?division=Arg+SDK\u0026amp;title=Published+Sites+and+hosted+frontends\u0026amp;description=Bundle+%40arg%2Fsdk+into+a+Site%3A+opened+inside+Arg+it+reaches+the+signed-in+viewer+after+consent%3B+outside+Arg+it+talks+to+a+gateway+your+own+app+server+mounts.\u0026amp;theme=977ce49dde30d3c62b6e0fad\u0026amp;signature=098ef31de8aadf704d3298819b58fba515167488e9badf204abe7d04e0907e6f\">\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/relevanceai-docs/AkHi6r04eAFa6tzw/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"arg.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#18181B\">\u003clink data-mint-head rel=\"canonical\" href=\"https://developers.arg.ai/guides/sdk/hosted-sites\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/guides/sdk/hosted-sites.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://developers.arg.ai/#organization\",\"name\":\"arg.ai\",\"url\":\"https://developers.arg.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/relevanceai-docs/zsccF0hnTHoJIc4d/logo/light.svg?fit=max\u0026auto=format\u0026n=zsccF0hnTHoJIc4d\u0026q=85\u0026s=0e8f44bd3b309a747d1f730aff1238ce\"}},{\"@type\":\"WebSite\",\"@id\":\"https://developers.arg.ai#website\",\"name\":\"arg.ai\",\"url\":\"https://developers.arg.ai\",\"publisher\":{\"@id\":\"https://developers.arg.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://developers.arg.ai/guides/sdk/hosted-sites#webpage\",\"url\":\"https://developers.arg.ai/guides/sdk/hosted-sites\",\"name\":\"Published Sites and hosted frontends\",\"description\":\"Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.\",\"dateModified\":\"2026-09-14T10:09:35.445Z\",\"isPartOf\":{\"@id\":\"https://developers.arg.ai#website\"},\"breadcrumb\":{\"@id\":\"https://developers.arg.ai/guides/sdk/hosted-sites#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://developers.arg.ai/guides/sdk/hosted-sites#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Arg SDK\",\"item\":\"https://developers.arg.ai/guides/sdk/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Published Sites and hosted frontends\",\"item\":\"https://developers.arg.ai/guides/sdk/hosted-sites\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://developers.arg.ai/guides/sdk/hosted-sites#article\",\"headline\":\"Published Sites and hosted frontends\",\"name\":\"Published Sites and hosted frontends\",\"description\":\"Bundle @arg/sdk into a Site: opened inside Arg it reaches the signed-in viewer after consent; outside Arg it talks to a gateway your own app server mounts.\",\"url\":\"https://developers.arg.ai/guides/sdk/hosted-sites\",\"mainEntityOfPage\":{\"@id\":\"https://developers.arg.ai/guides/sdk/hosted-sites#webpage\"},\"dateModified\":\"2026-09-14T10:09:35.445Z\",\"publisher\":{\"@id\":\"https://developers.arg.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://developers.arg.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"arg.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"arg.ai","nav":{"global":{"anchors":[{"anchor":"API Reference","icon":"terminal","href":"/api-reference/introduction"},{"anchor":"GitHub","icon":"github","href":"https://github.com/arg-ai"}]},"tabs":[{"tab":"Documentation","groups":[{"group":"Getting started","pages":[{"title":"Introduction","href":""},{"title":"Quickstart","href":"/guides/quickstart"},{"title":"TypeScript SDK","href":"/guides/typescript-sdk"},{"title":"Authentication","href":"/guides/authentication"},{"title":"API Keys","href":"/guides/api-keys"}]},{"group":"Building with agents","pages":[{"title":"Agents overview","href":"/guides/agents/overview"},{"title":"Agent runs","href":"/guides/agents/runs"},{"title":"Skills and subagents","href":"/guides/agents/skills"},{"title":"Unattended runs","href":"/guides/agents/unattended"}]},{"group":"Core concepts","pages":[{"title":"Organizations","href":"/guides/organizations"},{"title":"Workspaces","href":"/guides/workspaces"},{"title":"Files","href":"/guides/files"},{"title":"Tools","href":"/guides/tools"},{"title":"Actions","href":"/guides/actions"},{"title":"Search","href":"/guides/search"},{"title":"Servers","href":"/guides/tunnels"},{"title":"MCP","href":"/guides/mcp"},{"title":"OpenAI SDK","href":"/guides/openai-sdk"},{"title":"Anthropic SDK","href":"/guides/anthropic-sdk"}]},{"group":"Apps","pages":[{"title":"React app SDKs","href":"/guides/apps/react-apps"},{"title":"@arg/ui","href":"/guides/apps/ui-sdk"},{"title":"Actions in apps","href":"/guides/apps/actions-sdk"},{"title":"Full-view apps","href":"/guides/apps/full-view"},{"title":"Link previews","href":"/guides/apps/link-previews"}]},{"group":"Arg SDK","pages":[{"title":"Arg SDK overview","href":"/guides/sdk/overview"},{"title":"Apps inside Arg","href":"/guides/sdk/embedded-apps"},{"title":"Multiplayer apps","href":"/guides/sdk/multiplayer"},{"title":"Workspace files","href":"/guides/sdk/files"},{"title":"Chats and workspaces","href":"/guides/sdk/chat"},{"title":"Actions, agents and resources","href":"/guides/sdk/actions"},{"title":"Servers and CI","href":"/guides/sdk/server"},{"title":"Local development","description":"Run an app from a folder on your machine with arg serve: the same @arg-ai/sdk imports read local disk, while chats, Actions and the other namespaces use your CLI login.","href":"/guides/sdk/local"},{"title":"Published Sites and hosted frontends","href":"/guides/sdk/hosted-sites"},{"title":"Agent scripts","description":"The scripts an agent writes during a run can import @arg/sdk: in run_code, in run_bash and under arg exec, bound to the run's identity, workspace and permissions.","href":"/guides/sdk/agent-scripts"},{"title":"SDK reference","href":"/guides/sdk/reference"}]},{"group":"Integrations","pages":[{"title":"Integrations","href":"/guides/integrations/overview"},{"title":"GitHub","href":"/guides/integrations/github"},{"title":"Google","href":"/guides/integrations/google"},{"title":"Microsoft","href":"/guides/integrations/microsoft"},{"title":"Slack","href":"/guides/integrations/slack"},{"title":"Notion","href":"/guides/integrations/notion"},{"title":"Linear","href":"/guides/integrations/linear"},{"title":"Jira","href":"/guides/integrations/jira"},{"title":"Confluence","href":"/guides/integrations/confluence"},{"title":"Airtable","href":"/guides/integrations/airtable"},{"title":"HubSpot","href":"/guides/integrations/hubspot"},{"title":"Monday.com","href":"/guides/integrations/monday"},{"title":"Salesforce","href":"/guides/integrations/salesforce"},{"title":"Twilio","href":"/guides/integrations/twilio"},{"title":"ElevenLabs","href":"/guides/integrations/elevenlabs"},{"title":"Vapi","href":"/guides/integrations/vapi"},{"title":"Retell AI","href":"/guides/integrations/retell"},{"title":"Bland AI","href":"/guides/integrations/bland"},{"title":"Firmable","href":"/guides/integrations/firmable"},{"title":"Exa","href":"/guides/integrations/exa"},{"title":"Firecrawl","href":"/guides/integrations/firecrawl"},{"title":"Parallel","href":"/guides/integrations/parallel"},{"title":"SendGrid","href":"/guides/integrations/sendgrid"},{"title":"Resend","href":"/guides/integrations/resend"},{"title":"Smartlead","href":"/guides/integrations/smartlead"},{"title":"Ashby","href":"/guides/integrations/ashby"},{"title":"Avoma","href":"/guides/integrations/avoma"},{"title":"treg","href":"/guides/integrations/treg"},{"title":"Databricks","href":"/guides/integrations/databricks"},{"title":"Gong","href":"/guides/integrations/gong"},{"title":"Jev","href":"/guides/integrations/jev"},{"title":"Zoom","href":"/guides/integrations/zoom"}]},{"group":"Command line","pages":[{"title":"Command line (arg CLI)","href":"/guides/cli"}]},{"group":"Recipes \u0026 patterns","pages":[{"title":"Overview","href":"/guides/recipes/overview"},{"title":"Sync a local folder","href":"/guides/recipes/sync-folder"},{"title":"Agent loop with arg","href":"/guides/recipes/agent-loop"},{"title":"Accumulate structured data","href":"/guides/recipes/accumulate-data"},{"title":"Automations \u0026 reactions","href":"/guides/recipes/automations"},{"title":"Worked example","href":"/guides/recipes/worked-example"},{"title":"Developer templates","href":"/guides/recipes/developer-templates"}]},{"group":"Changelog","pages":[{"title":"Changelog","href":"/changelog"}]}]},{"tab":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/introduction"}]}]},"basePath":"","title":"Published Sites and hosted frontends - arg.ai","buildId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","deploymentId":"dpl_FWZhTb2vab28gFGFH4ojka6qEznQ","dynamics":["10e4515597"],"chunks":["BannerMarkdown-C79IUEr8.js","dist-DE3EVdvd.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-DK3K4Z1S.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js"]}