1"use strict";(self.webpackChunkdocs_site=self.webpackChunkdocs_site||[]).push([["7204"],{8237(e,n,s){s.r(n),s.d(n,{metadata:()=>o,default:()=>h,frontMatter:()=>t,contentTitle:()=>l,toc:()=>c,assets:()=>r});var o=JSON.parse('{"id":"cli/cloud","title":"Cloud commands","description":"All cloud commands require a tenant session unless noted.","source":"@site/docs/cli/cloud.md","sourceDirName":"cli","slug":"/cli/cloud","permalink":"/cli/cloud","draft":false,"unlisted":false,"editUrl":"https://github.com/AgentPaaS-ai/docs/edit/main/docs/cli/cloud.md","tags":[],"version":"current","frontMatter":{"id":"cloud","title":"Cloud commands","sidebar_label":"Cloud"},"sidebar":"docs","previous":{"title":"Cron","permalink":"/cli/cron"},"next":{"title":"Invoke tokens","permalink":"/cli/invoke-tokens"}}'),d=s(4848),a=s(8453);let t={id:"cloud",title:"Cloud commands",sidebar_label:"Cloud"},l,r={},c=[{value:"Images and deploy",id:"images-and-deploy",level:2},{value:"Pull (edit loop)",id:"pull-edit-loop",level:2},{value:"Secrets",id:"secrets",level:2},{value:"Workflows",id:"workflows",level:2},{value:"Invoke and runs",id:"invoke-and-runs",level:2},{value:"Catalog and usage",id:"catalog-and-usage",level:2},{value:"Usage and cost",id:"usage-and-cost",level:2},{value:"Cron",id:"cron",level:2},{value:"Ingress",id:"ingress",level:2},{value:"Agent checklist (cloud weather path)",id:"agent-checklist-cloud-weather-path",level:2}];function i(e){let n={a:"a",code:"code",h2:"h2",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",...(0,a.R)(),...e.components};return(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(n.p,{children:"All cloud commands require a tenant session unless noted."}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"agentpaas cloud login\nagentpaas cloud whoami\nagentpaas cloud logout\n"})}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.code,{children:"cloud login"})," opens a browser. Approve in the ",(0,d.jsx)(n.strong,{children:"same browser"})," used for the trial claim. Do not put ",(0,d.jsx)(n.code,{children:"apc_\u2026"})," tokens in chat. CI may use ",(0,d.jsx)(n.code,{children:"cloud login --token-stdin"}),"."]}),"\n",(0,d.jsxs)(n.p,{children:["After a successful login, the CLI remembers the Cloud API URL in its local AgentPaaS configuration. Set ",(0,d.jsx)(n.code,{children:"AGENTPAAS_CLOUD_API_URL"})," to override it for one or more commands. ",(0,d.jsx)(n.code,{children:"agentpaas cloud logout"})," clears the saved URL. This matters when moving between staging and production."]}),"\n",(0,d.jsx)(n.h2,{id:"images-and-deploy",children:"Images and deploy"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"# pack for cloud first\nagentpaas pack ./my-agent --target linux/amd64\n\nagentpaas cloud push --lock ~/.agentpaas/state/agents/<name>/agent.lock\nagentpaas cloud images\nagentpaas cloud deploy latest\n# or: agentpaas cloud deploy --lock <path>\n\nagentpaas cloud deployments\nagentpaas cloud undeploy <deployment> --yes --confirm-id <deployment>\nagentpaas cloud images delete <img_or_sha256> --yes --confirm-id <img_or_sha256>\n"})}),"\n",(0,d.jsxs)(n.p,{children:["These commands require ",(0,d.jsx)(n.code,{children:"--yes"}),", including with ",(0,d.jsx)(n.code,{children:"--json"}),". In a non-TTY, pass ",(0,d.jsx)(n.code,{children:"--confirm-id"})," with the exact deployment id, image id, or image digest. In a TTY, the CLI prompts you to type that same value, even when ",(0,d.jsx)(n.code,{children:"--yes"})," is present. Run destructive commands in your own terminal. They are designed to reject agent-mediated confirmation."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.code,{children:"cloud undeploy"})," deletes live compute, removes the deployment's secret bindings, and frees the deployment slot. A workflow that refers to the deployment remains stored, but a later run fails with ",(0,d.jsx)(n.code,{children:"deployment_not_found"})," until you redeploy the component and restore its bindings."]}),"\n",(0,d.jsxs)(n.p,{children:[(0,d.jsx)(n.code,{children:"cloud images delete"})," removes an admitted image by image id or ",(0,d.jsx)(n.code,{children:"sha256:"})," digest. It does not undeploy a deployment. If the image is still referenced, the API returns HTTP 409 and the CLI prints an ",(0,d.jsx)(n.code,{children:"agentpaas cloud undeploy <dep_> --yes --confirm-id <dep_>"})," command for each blocking deployment. Undeploy those deployments, then retry the image deleti
1on."]}),"\n",(0,d.jsx)(n.h2,{id:"pull-edit-loop",children:"Pull (edit loop)"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"agentpaas cloud pull <name-or-id>\nagentpaas cloud pull weather-agent --dir ./weather-from-cloud\nagentpaas cloud pull weather-agent --bump-version 0.2.0\n"})}),"\n",(0,d.jsx)(n.h2,{id:"secrets",children:"Secrets"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"agentpaas cloud secrets push openrouter\nagentpaas cloud secrets list\nagentpaas cloud secrets bind <deployment> openrouter --as bearer --host openrouter.ai\nagentpaas cloud secrets bindings <deployment>\nagentpaas cloud secrets delete <name> --yes --confirm-id <name>\n"})}),"\n",(0,d.jsxs)(n.p,{children:["Labels only on list, bindings, and delete operations. Never prints values. ",(0,d.jsx)(n.code,{children:"cloud secrets delete"})," requires ",(0,d.jsx)(n.code,{children:"--yes"})," and the same TTY or non-TTY ",(0,d.jsx)(n.code,{children:"--confirm-id"})," rule described above. If the secret is bound to deployments, the API returns HTTP 409 and the CLI prints the bound deployment ids. Remove the bindings and retry, or pass ",(0,d.jsx)(n.code,{children:"--force"})," when you intend to delete the bound secret. Deleting it removes the cloud secret label and its value from the cloud secret store."]}),"\n",(0,d.jsx)(n.h2,{id:"workflows",children:"Workflows"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"agentpaas cloud workflow retire <wf_id> --yes --confirm-id <wf_id>\n"})}),"\n",(0,d.jsxs)(n.p,{children:["Retiring a workflow calls ",(0,d.jsx)(n.code,{children:"POST /v1/workflows/:id/retire"}),". It retires the stored workflow recipe and does not delete in-use instances. If instances are still running, the API returns HTTP 409 and the CLI prints the in-use instance ids. Stop or hang up those instances, then retry. The command requires ",(0,d.jsx)(n.code,{children:"--yes"})," and the same TTY or non-TTY ",(0,d.jsx)(n.code,{children:"--confirm-id"})," rule described above."]}),"\n",(0,d.jsx)(n.h2,{id:"invoke-and-runs",children:"Invoke and runs"}),"\n",(0,d.jsxs)(n.p,{children:["Public invoke (agent or MCP) needs a ",(0,d.jsx)(n.strong,{children:"deployment invoke token"})," first.\nSee ",(0,d.jsx)(n.a,{href:"./invoke-tokens",children:"Invoke tokens"})," for why, and ",(0,d.jsx)(n.a,{href:"./mcp-demos",children:"MCP demos"})," for Hermes and Codex."]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"agentpaas cloud invoke-token <deployment> # dep_\u2026 ; prints inv_\u2026 once\nexport AGENTPAAS_CLOUD_INVOKE_TOKEN='inv_\u2026' # or CLI token store\n\nagentpaas cloud invoke <deployment> --body '{\"query\":\"weather in Folsom\"}' --wait\nagentpaas cloud run <deployment>\nagentpaas cloud status <run-id>\nagentpaas cloud result <run-id>\nagentpaas cloud logs <run-id>\nagentpaas cloud events <run-id>\nagentpaas cloud cancel <run-id>\n"})}),"\n",(0,d.jsxs)(n.p,{children:["Bare deployment URLs without ",(0,d.jsx)(n.code,{children:"inv_\u2026"})," return 401. Do not treat ",(0,d.jsx)(n.code,{children:"dep_\u2026"})," as a secret capability."]}),"\n",(0,d.jsx)(n.p,{children:"MCP coding tools use:"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-text",children:"https://cloud.agentpaas.ai/v1/deployments/<dep_\u2026>/mcp\nHeader: X-Agentpaas-Invoke-Token: inv_\u2026\n"})}),"\n",(0,d.jsxs)(n.p,{children:["Not ",(0,d.jsx)(n.code,{children:"/invoke"})," for Streamable HTTP clients."]}),"\n",(0,d.jsx)(n.h2,{id:"catalog-and-usage",children:"Catalog and usage"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"agentpaas cloud registry\nagentpaas cloud usage\nagentpaas cloud audit\nagentpaas cloud metrics\n"})}),"\n",(0,d.jsx)(n.h2,{id:"usage-and-cost",children:"Usage and cost"}),"\n",(0,d.jsx)(n.p,{children:"Cloud records gateway-observed LLM usage for a run. The console Usage and Plan view shows tenant usage, and run details show the usage and cost recorded for that run. The workload cannot submit arbitrary usage values to change the record."}),"\n",(0,d.jsx)(n.p,{children:"Use the CLI to inspect tenant usage:"}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"agentpaas cloud usage\n"})}),"\n",(0,d.jsx)(n.h2,{id:"cron",children:"Cron"}),"\n",(0,d.jsxs)(n.p,{children:["See ",(0,d.jsx)(n.a,{href:"./cron",children:"Cron"}),"."]}),"\n",(0,d.jsx)(n.h2,{id:"ingress",children:"Ingress"}),"\n",(0,d.jsxs)(n.p,{children:["Use ",(0,d.jsx)(n.a,{href:"../trial/ingress",children:"Ingress through the gateway"})," to connect Slack, Stripe, GitHub, or a compatible HMAC-signed JSON sender to a Cloud deployment."]}),"\n",(0,d.jsx)(n.pre,{children:(0,d.jsx)(n.code,{className:"language-bash",children:"agentpaas cloud ingress source delete <src_id>
1 --yes --confirm-id <src_id>\n"})}),"\n",(0,d.jsxs)(n.p,{children:["Deleting an ingress source calls ",(0,d.jsx)(n.code,{children:"DELETE /v1/ingress/sources/:id"}),". It does not automatically disable connections. If enabled connections still reference the source, the API returns HTTP 409 and the CLI prints ",(0,d.jsx)(n.code,{children:"agentpaas cloud ingress connection disable <con_>"})," for each blocker. Disable those connections, then retry. The command requires ",(0,d.jsx)(n.code,{children:"--yes"})," and the same TTY or non-TTY ",(0,d.jsx)(n.code,{children:"--confirm-id"})," rule described above. Signing secrets are never printed."]}),"\n",(0,d.jsx)(n.h2,{id:"agent-checklist-cloud-weather-path",children:"Agent checklist (cloud weather path)"}),"\n",(0,d.jsxs)(n.ol,{children:["\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"cloud login"})," + ",(0,d.jsx)(n.code,{children:"whoami"})]}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"pack --target linux/amd64"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"cloud push"})}),"\n",(0,d.jsx)(n.li,{children:(0,d.jsx)(n.code,{children:"cloud deploy"})}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"cloud secrets push"})," + ",(0,d.jsx)(n.code,{children:"bind"})," to LLM host"]}),"\n",(0,d.jsxs)(n.li,{children:[(0,d.jsx)(n.code,{children:"cloud invoke"})," + ",(0,d.jsx)(n.code,{children:"result"})," / ",(0,d.jsx)(n.code,{children:"logs"})]}),"\n",(0,d.jsxs)(n.li,{children:["Confirm in console ",(0,d.jsx)(n.strong,{children:"Runs"})," tab"]}),"\n"]})]})}function h(e={}){let{wrapper:n}={...(0,a.R)(),...e.components};return n?(0,d.jsx)(n,{...e,children:(0,d.jsx)(i,{...e})}):i(e)}},8453(e,n,s){s.d(n,{R:()=>t,x:()=>l});var o=s(6540);let d={},a=o.createContext(d);function t(e){let n=o.useContext(a);return o.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(d):e.components||d:t(e.components),o.createElement(a.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.