[{"data":1,"prerenderedAt":933},["ShallowReactive",2],{"navigation":3,"/agent-api":261,"/agent-api-surround":928},[4,22,50,83,125,161,194,205,231],{"title":5,"path":6,"stem":7,"children":8,"icon":16},"Getting Started","/getting-started","1.getting-started/1.index",[9,12,17],{"title":10,"path":6,"stem":7,"icon":11},"Introduction","i-ph-house",{"title":13,"path":14,"stem":15,"icon":16},"Quickstart","/getting-started/quickstart","1.getting-started/2.quickstart","i-ph-rocket",{"title":18,"path":19,"stem":20,"icon":21},"Plans","/getting-started/plans","1.getting-started/3.plans","i-ph-credit-card",{"title":23,"path":24,"stem":25,"children":26,"icon":29},"Agents","/agents","2.agents/1.index",[27,30,35,40,45],{"title":28,"path":24,"stem":25,"icon":29},"Overview","i-ph-robot",{"title":31,"path":32,"stem":33,"icon":34},"Creating an agent","/agents/creating-an-agent","2.agents/2.creating-an-agent","i-ph-plus",{"title":36,"path":37,"stem":38,"icon":39},"Agent settings","/agents/settings","2.agents/3.settings","i-ph-gear",{"title":41,"path":42,"stem":43,"icon":44},"Memory","/agents/memory","2.agents/4.memory","i-ph-database",{"title":46,"path":47,"stem":48,"icon":49},"Residential proxy","/agents/proxy","2.agents/5.proxy","i-ph-globe-hemisphere-west",{"title":51,"path":52,"stem":53,"children":54,"icon":57},"Chats & Tasks","/chats-and-tasks","3.chats-and-tasks/1.index",[55,58,63,68,73,78],{"title":56,"path":52,"stem":53,"icon":57},"Chats","i-ph-chats-circle",{"title":59,"path":60,"stem":61,"icon":62},"Sharing chats","/chats-and-tasks/sharing-chats","3.chats-and-tasks/2.sharing-chats","i-ph-share-network",{"title":64,"path":65,"stem":66,"icon":67},"Tasks","/chats-and-tasks/tasks","3.chats-and-tasks/3.tasks","i-ph-list-checks",{"title":69,"path":70,"stem":71,"icon":72},"Recurring tasks","/chats-and-tasks/recurring-tasks","3.chats-and-tasks/4.recurring-tasks","i-ph-repeat",{"title":74,"path":75,"stem":76,"icon":77},"Results & deliverables","/chats-and-tasks/results-and-deliverables","3.chats-and-tasks/5.results-and-deliverables","i-ph-package",{"title":79,"path":80,"stem":81,"icon":82},"Save a chat as a skill","/chats-and-tasks/save-chat-as-skill","3.chats-and-tasks/6.save-chat-as-skill","i-ph-sparkle",{"title":84,"path":85,"stem":86,"children":87,"icon":90},"Models & Skills","/models-and-skills","4.models-and-skills/1.index",[88,91,96,101,105,110,115,120],{"title":89,"path":85,"stem":86,"icon":90},"LLM configuration","i-ph-cpu",{"title":92,"path":93,"stem":94,"icon":95},"Providers & models","/models-and-skills/providers","4.models-and-skills/2.providers","i-ph-stack",{"title":97,"path":98,"stem":99,"icon":100},"Bring your own key","/models-and-skills/byok","4.models-and-skills/3.byok","i-ph-key",{"title":102,"path":103,"stem":104,"icon":29},"ChatGPT subscription","/models-and-skills/chatgpt-subscription","4.models-and-skills/4.chatgpt-subscription",{"title":106,"path":107,"stem":108,"icon":109},"Skills","/models-and-skills/skills","4.models-and-skills/5.skills","i-ph-puzzle-piece",{"title":111,"path":112,"stem":113,"icon":114},"Installing skills","/models-and-skills/installing-skills","4.models-and-skills/6.installing-skills","i-ph-download-simple",{"title":116,"path":117,"stem":118,"icon":119},"Custom skills","/models-and-skills/custom-skills","4.models-and-skills/7.custom-skills","i-ph-code",{"title":121,"path":122,"stem":123,"icon":124},"Local models","/models-and-skills/local-models","4.models-and-skills/8.local-models","i-ph-desktop-tower",{"title":126,"path":127,"stem":128,"children":129,"icon":131},"Connect Your Tools","/connect-your-tools","5.connect-your-tools/1.index",[130,132,137,142,147,152,156],{"title":28,"path":127,"stem":128,"icon":131},"i-ph-plug",{"title":133,"path":134,"stem":135,"icon":136},"Telegram","/connect-your-tools/telegram","5.connect-your-tools/2.telegram","i-ph-telegram-logo",{"title":138,"path":139,"stem":140,"icon":141},"Discord","/connect-your-tools/discord","5.connect-your-tools/3.discord","i-ph-discord-logo",{"title":143,"path":144,"stem":145,"icon":146},"Slack","/connect-your-tools/slack","5.connect-your-tools/4.slack","i-ph-slack-logo",{"title":148,"path":149,"stem":150,"icon":151},"Connectors","/connect-your-tools/connectors","5.connect-your-tools/5.connectors","i-ph-link",{"title":153,"path":154,"stem":155,"icon":100},"Secrets","/connect-your-tools/secrets","5.connect-your-tools/6.secrets",{"title":157,"path":158,"stem":159,"icon":160},"Audit log","/connect-your-tools/secret-audit-log","5.connect-your-tools/7.secret-audit-log","i-ph-scroll",{"title":162,"path":163,"stem":164,"children":165,"icon":193},"Account & Team","/account-and-team","6.account-and-team/1.index",[166,169,174,179,184,188],{"title":167,"path":163,"stem":164,"icon":168},"Signing in","i-ph-sign-in",{"title":170,"path":171,"stem":172,"icon":173},"Team members","/account-and-team/teams","6.account-and-team/3.teams","i-ph-users",{"title":175,"path":176,"stem":177,"icon":178},"Roles & permissions","/account-and-team/roles-and-permissions","6.account-and-team/4.roles-and-permissions","i-ph-shield",{"title":180,"path":181,"stem":182,"icon":183},"Invitations","/account-and-team/invitations","6.account-and-team/5.invitations","i-ph-envelope-simple",{"title":185,"path":186,"stem":187,"icon":21},"Billing & upgrades","/account-and-team/billing","6.account-and-team/6.billing",{"title":189,"path":190,"stem":191,"icon":192},"Support","/account-and-team/support","6.account-and-team/7.support","i-ph-lifebuoy","i-ph-user",{"title":195,"path":196,"stem":197,"children":198,"icon":200},"Apps","/apps","7.apps/1.index",[199,201],{"title":195,"path":196,"stem":197,"icon":200},"i-ph-squares-four",{"title":202,"path":203,"stem":204,"icon":119},"Building an app","/apps/building-an-app","7.apps/2.building-an-app",{"title":206,"path":207,"stem":208,"children":209,"icon":211},"Workflows","/workflows","8.workflows/1.index",[210,212,216,221,226],{"title":28,"path":207,"stem":208,"icon":211},"i-ph-flow-arrow",{"title":213,"path":214,"stem":215,"icon":82},"Create a workflow","/workflows/creating-a-workflow","8.workflows/2.creating-a-workflow",{"title":217,"path":218,"stem":219,"icon":220},"Edit sections","/workflows/editing-sections","8.workflows/3.editing-sections","i-ph-pencil-simple",{"title":222,"path":223,"stem":224,"icon":225},"Run and schedule","/workflows/running-and-scheduling","8.workflows/4.running-and-scheduling","i-ph-clock",{"title":227,"path":228,"stem":229,"icon":230},"Workflow directory","/workflows/directory","8.workflows/5.directory","i-ph-compass",{"title":232,"path":233,"stem":234,"children":235,"icon":119},"Agent API","/agent-api","9.agent-api/1.index",[236,237,241,246,251,256],{"title":28,"path":233,"stem":234,"icon":119},{"title":13,"path":238,"stem":239,"icon":240},"/agent-api/quickstart","9.agent-api/2.quickstart","i-ph-rocket-launch",{"title":242,"path":243,"stem":244,"icon":245},"Authentication","/agent-api/authentication","9.agent-api/3.authentication","i-ph-lock-key",{"title":247,"path":248,"stem":249,"icon":250},"Endpoints","/agent-api/endpoints","9.agent-api/4.endpoints","i-ph-list-bullets",{"title":252,"path":253,"stem":254,"icon":255},"Streaming","/agent-api/streaming","9.agent-api/5.streaming","i-ph-broadcast",{"title":257,"path":258,"stem":259,"icon":260},"Errors","/agent-api/errors","9.agent-api/6.errors","i-ph-warning-circle",{"id":262,"title":232,"body":263,"description":920,"extension":921,"links":922,"meta":924,"navigation":925,"path":233,"seo":926,"stem":234,"__hash__":927},"docs/9.agent-api/1.index.md",{"type":264,"value":265,"toc":909},"minimark",[266,270,278,281,292,299,304,325,356,359,369,374,382,457,466,470,537,544,548,558,581,610,614,857,863,867,905],[267,268,232],"h1",{"id":269},"agent-api",[271,272,273,274,277],"p",{},"The Agent API lets your own software do what you do in ",[275,276,56],"strong",{},": find your agents, start a chat,\nsend a message, and read or stream the reply. Use it to put an agent behind your product, wire one\ninto an internal tool, or script work you'd otherwise type by hand.",[271,279,280],{},"Every request goes to:",[282,283,288],"pre",{"className":284,"code":286,"language":287},[285],"language-text","https://api.betterclaw.io\n","text",[289,290,286],"code",{"__ignoreMap":291},"",[271,293,294,295,298],{},"Requests and responses are JSON, except message uploads with files, which use\n",[289,296,297],{},"multipart/form-data",". There is no version prefix in the path.",[300,301,303],"h2",{"id":302},"how-api-keys-work","How API keys work",[271,305,306,307,309,310,312,313,316,317,320,321,324],{},"You generate keys on the ",[275,308,23],{}," page: choose ",[275,311,23],{}," under ",[275,314,315],{},"Workspace settings"," in the\nsidebar, then open the ",[275,318,319],{},"API keys"," tab (or go straight to ",[289,322,323],{},"/agents?tab=api-keys"," in the app).\nEvery key is:",[326,327,328,335,345,351],"ul",{},[329,330,331,334],"li",{},[275,332,333],{},"Bound to one workspace."," It can only see and act in the workspace it was generated in.",[329,336,337,340,341,344],{},[275,338,339],{},"Optionally pinned to one agent."," A pinned key can only start, list, open, and stream chats\nof that agent. Leave it set to ",[275,342,343],{},"Any agent"," to use every agent in the workspace.",[329,346,347,350],{},[275,348,349],{},"Acting as the person who generated it."," A key is a personal access token for the workspace\nadmin who created it, not a separate service account. Chats it starts are theirs, and are\nvisible to the rest of the workspace like any other chat. If that person leaves the workspace,\nthe key stops working.",[329,352,353],{},[275,354,355],{},"Limited to the permissions you chose.",[271,357,358],{},"Only workspace owners and admins can generate or revoke keys. Members can see which keys exist\nand when they were last used, but never the secret itself.",[360,361,362],"warning",{},[271,363,364,365,368],{},"The full key is shown ",[275,366,367],{},"once",", when you generate it. BetterClaw stores only a hash of it, so it\ncan't be shown again. If you lose a key, revoke it and generate a new one.",[370,371,373],"h3",{"id":372},"permissions","Permissions",[271,375,376,377,381],{},"Each key carries one or more permissions (called ",[378,379,380],"em",{},"scopes"," in the API).",[383,384,385,401],"table",{},[386,387,388],"thead",{},[389,390,391,395,398],"tr",{},[392,393,394],"th",{},"Scope",[392,396,397],{},"Shown in the app as",[392,399,400],{},"Allows",[402,403,404,418,431,444],"tbody",{},[389,405,406,412,415],{},[407,408,409],"td",{},[289,410,411],{},"chats:read",[407,413,414],{},"Read chats",[407,416,417],{},"List chats, read a chat and its messages, download deliverables, and stream live updates",[389,419,420,425,428],{},[407,421,422],{},[289,423,424],{},"chats:write",[407,426,427],{},"Send messages",[407,429,430],{},"Create, rename, archive and delete chats, send messages, and stop a reply",[389,432,433,438,441],{},[407,434,435],{},[289,436,437],{},"agents:read",[407,439,440],{},"List agents",[407,442,443],{},"List the workspace's agents and the agent templates",[389,445,446,451,454],{},[407,447,448],{},[289,449,450],{},"workspaces:read",[407,452,453],{},"Read workspace",[407,455,456],{},"Read the workspace's name, status, and plan",[271,458,459,460,462,463,465],{},"New keys start with ",[275,461,414],{}," and ",[275,464,427],{},". There is no permission to create,\nchange, or remove agents: adding an agent provisions a machine and changes your bill, so that stays\nin the app.",[370,467,469],{"id":468},"two-kinds-of-credential","Two kinds of credential",[383,471,472,484],{},[386,473,474],{},[389,475,476,478,481],{},[392,477],{},[392,479,480],{},"API key",[392,482,483],{},"Session token",[402,485,486,501,512,523],{},[389,487,488,491,496],{},[407,489,490],{},"Looks like",[407,492,493],{},[289,494,495],{},"bc_sk_…",[407,497,498],{},[289,499,500],{},"bcs_…",[389,502,503,506,509],{},[407,504,505],{},"Lasts",[407,507,508],{},"Until you revoke it",[407,510,511],{},"10 minutes by default, 15 at most",[389,513,514,517,520],{},[407,515,516],{},"Where it can live",[407,518,519],{},"Your server only",[407,521,522],{},"Anywhere, including a browser or mobile app",[389,524,525,528,531],{},[407,526,527],{},"How you get one",[407,529,530],{},"Generate it in the app",[407,532,533,534],{},"Exchange an API key at ",[289,535,536],{},"POST /auth/sdk-token",[271,538,539,540,543],{},"An API key is a long-lived secret. Keep it on your server: the API rejects a key sent from a\nbrowser or in a URL. For browser and mobile apps, your server exchanges the key for a short-lived\nsession token and hands that out instead. See ",[541,542,242],"a",{"href":243},".",[300,545,547],{"id":546},"javascript-sdk","JavaScript SDK",[271,549,550,551,557],{},"Building in JavaScript or TypeScript? The ",[541,552,556],{"href":553,"rel":554},"https://github.com/better-claw/sdk-js",[555],"nofollow","BetterClaw JavaScript SDK","\nwraps this API — chats, messages, live replies, and session-token refresh — with hooks for React\nand Vue.",[282,559,563],{"className":560,"code":561,"language":562,"meta":291,"style":291},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install @better-claw/sdk\n","bash",[289,564,565],{"__ignoreMap":291},[566,567,570,574,578],"span",{"class":568,"line":569},"line",1,[566,571,573],{"class":572},"sBMFI","npm",[566,575,577],{"class":576},"sfazB"," install",[566,579,580],{"class":576}," @better-claw/sdk\n",[271,582,583,584,587,588,591,592,595,596,599,600,603,604,609],{},"On a server, create a client with your API key using ",[289,585,586],{},"createServerClient"," from\n",[289,589,590],{},"@better-claw/sdk/server",". In a browser, use ",[289,593,594],{},"BetterClawClient"," with ",[289,597,598],{},"SessionTokenAuth",", and mint\ntokens on your server with ",[289,601,602],{},"mintSessionToken",". The\n",[541,605,608],{"href":606,"rel":607},"https://github.com/better-claw/sdk-js#readme",[555],"SDK's README"," has complete examples.",[300,611,613],{"id":612},"what-you-can-call","What you can call",[383,615,616,628],{},[386,617,618],{},[389,619,620,623,626],{},[392,621,622],{},"Method",[392,624,625],{},"Path",[392,627,394],{},[402,629,630,646,661,676,691,706,722,737,752,767,782,797,812,827,843],{},[389,631,632,637,642],{},[407,633,634],{},[289,635,636],{},"GET",[407,638,639],{},[289,640,641],{},"/workspaces",[407,643,644],{},[289,645,450],{},[389,647,648,652,657],{},[407,649,650],{},[289,651,636],{},[407,653,654],{},[289,655,656],{},"/workspaces/{workspaceId}",[407,658,659],{},[289,660,450],{},[389,662,663,667,672],{},[407,664,665],{},[289,666,636],{},[407,668,669],{},[289,670,671],{},"/workspaces/{workspaceId}/agents",[407,673,674],{},[289,675,437],{},[389,677,678,682,687],{},[407,679,680],{},[289,681,636],{},[407,683,684],{},[289,685,686],{},"/workspaces/{workspaceId}/agents/{agentId}",[407,688,689],{},[289,690,437],{},[389,692,693,697,702],{},[407,694,695],{},[289,696,636],{},[407,698,699],{},[289,700,701],{},"/workspaces/{workspaceId}/agents/templates",[407,703,704],{},[289,705,437],{},[389,707,708,713,718],{},[407,709,710],{},[289,711,712],{},"POST",[407,714,715],{},[289,716,717],{},"/chats",[407,719,720],{},[289,721,424],{},[389,723,724,728,733],{},[407,725,726],{},[289,727,636],{},[407,729,730],{},[289,731,732],{},"/chats?workspaceId={workspaceId}",[407,734,735],{},[289,736,411],{},[389,738,739,743,748],{},[407,740,741],{},[289,742,636],{},[407,744,745],{},[289,746,747],{},"/chats/{chatId}",[407,749,750],{},[289,751,411],{},[389,753,754,759,763],{},[407,755,756],{},[289,757,758],{},"PATCH",[407,760,761],{},[289,762,747],{},[407,764,765],{},[289,766,424],{},[389,768,769,774,778],{},[407,770,771],{},[289,772,773],{},"DELETE",[407,775,776],{},[289,777,747],{},[407,779,780],{},[289,781,424],{},[389,783,784,788,793],{},[407,785,786],{},[289,787,712],{},[407,789,790],{},[289,791,792],{},"/chats/{chatId}/messages",[407,794,795],{},[289,796,424],{},[389,798,799,803,808],{},[407,800,801],{},[289,802,712],{},[407,804,805],{},[289,806,807],{},"/chats/{chatId}/messages/{messageId}/stop",[407,809,810],{},[289,811,424],{},[389,813,814,818,823],{},[407,815,816],{},[289,817,636],{},[407,819,820],{},[289,821,822],{},"/chats/{chatId}/messages/{messageId}/deliverables/{index}",[407,824,825],{},[289,826,411],{},[389,828,829,834,839],{},[407,830,831],{},[289,832,833],{},"WS",[407,835,836],{},[289,837,838],{},"/ws/chats?workspaceId={workspaceId}",[407,840,841],{},[289,842,411],{},[389,844,845,849,854],{},[407,846,847],{},[289,848,712],{},[407,850,851],{},[289,852,853],{},"/auth/sdk-token",[407,855,856],{},"Any API key",[271,858,859,860,543],{},"Everything else in the API, including managing keys themselves, needs a signed-in user and answers\nan API key with ",[289,861,862],{},"403",[300,864,866],{"id":865},"in-this-section","In this section",[868,869,870,876,881,887,893,898],"card-group",{},[871,872,873],"card",{"icon":240,"title":13,"to":238},[271,874,875],{},"Generate a key, send a message, and read the reply in five minutes.",[871,877,878],{"icon":245,"title":242,"to":243},[271,879,880],{},"API keys, session tokens for browsers, pinning, and revocation.",[871,882,884],{"icon":250,"title":883,"to":248},"Endpoint reference",[271,885,886],{},"Every request and response, with examples.",[871,888,890],{"icon":255,"title":889,"to":253},"Streaming replies",[271,891,892],{},"Watch replies arrive live over a WebSocket.",[871,894,895],{"icon":260,"title":257,"to":258},[271,896,897],{},"Status codes, error bodies, and what to do about each.",[871,899,902],{"icon":900,"title":547,"to":553,"target":901},"i-ph-github-logo","_blank",[271,903,904],{},"The official client for Node.js and browsers, with React and Vue hooks.",[906,907,908],"style",{},"html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":291,"searchDepth":569,"depth":910,"links":911},2,[912,917,918,919],{"id":302,"depth":910,"text":303,"children":913},[914,916],{"id":372,"depth":915,"text":373},3,{"id":468,"depth":915,"text":469},{"id":546,"depth":910,"text":547},{"id":612,"depth":910,"text":613},{"id":865,"depth":910,"text":866},"Talk to your agents from your own apps, scripts, and backends with a workspace API key.","md",[923],{"label":547,"icon":900,"to":553,"target":901},{},{"title":28,"icon":119},{"title":232,"description":920},"gP8RRbdLVqg3cDy__W7_zDEZtlrzEiwEWXzjbe8OG2E",[929,931],{"title":227,"path":228,"stem":229,"description":930,"icon":230,"children":-1},"Browse ready-made workflows and install them into your workspace.",{"title":13,"path":238,"stem":239,"description":932,"icon":240,"children":-1},"Generate a key, start a chat, send a message, and read your agent's reply.",1791467816950]