Overview
A Cowork workspace carries its own apps. An app is a folder .cowork/apps/<name>/ with a
cowork.json manifest, React widgets (.jsx / .tsx, the UI, drawn in the IDE) that call the
window.cowork SDK, and routines (.ts, privileged backend code run by the local Cowork
daemon: secrets, files, signed-in APIs). Copy the folder and you have copied the app.
Build your first appThe pattern every app follows, starting from the CRUD template.
cowork.jsonEvery manifest field: routines, file routing, accounts, capabilities, the status bar.
The window.cowork SDKWhat a widget can call: routines, dialogs, accounts, notifications, capture, state.
The CLIEvery cowork command: routines, apps, publishing, secrets, team servers.
I want to…
Section titled “I want to…”| … | In a widget (window.cowork) |
In a routine (ctx) |
Also |
|---|---|---|---|
| Ask the user (a dialog, a confirm) | ui.dialog / ui.confirm, options in CoworkDialog |
consent.request |
|
| Use an API key, or sign in to Google / Microsoft | credentials.get / connect — widgets never see the key |
credential.fetch / fields |
credential in cowork.json, cowork credential |
| Run backend code | routines.run |
Writing routines | cowork routine run |
| Keep data fresh | routines.subscribe — never setInterval |
unchanged() for reads |
|
| Store the app's data | state (per view, small) |
data, db |
|
| Notify the user | notify, badge |
notify, badge |
|
| Record the screen or audio | capture |
— panes only | capture in cowork.json |
| Hand work to an agent | queue |
cowork queue |
|
| Open a file type in my app | openedFile |
fileRouting |
|
| Let AI agents call my routines | mark each routine readOnly / destructive / reachesOthers (routines in cowork.json) |
Agents and grants, cowork agent |
|
| Publish or install an app | Publish and install, cowork push |
How these docs are made
Section titled “How these docs are made”Nothing under Guides or Reference is edited by hand. Every Cowork build regenerates them from what ships:
- Guides: the
cowork-studioAgent Skill that Cowork installs for Claude Code and Codex. - SDK types: the
.cowork/local/cowork.d.tsevery workspace gets, rendered by TypeDoc. - cowork.json and workspace.json:
cowork.schema.jsonandworkspace.schema.json, the schemas the editor validates them against. - CLI: the CLI's usage table — every command, including the group verbs only
cowork <command> --helpprints. - Commands: the
contributes.commandsof Cowork's extensions.
For AI agents
Section titled “For AI agents”/docs/llms.txt,llms-full.txt(everything) andllms-small.txtfollow llmstxt.org.- On a machine with Cowork, the same guides are the
cowork-studioskill (~/.claude/skills/cowork-studio/), matched to the installed version, and every workspace has the types at.cowork/local/cowork.d.ts.