SDK examples
From an MCP connection, call docs_read with path reference/sdk/examples to open this index. Pass the path of a recipe to read its instructions.
Choose an example
| Workflow | Required risk classes | Example |
|---|---|---|
| Find an online machine and inspect its OS | read | Quickstart |
| Read a file and check truncation | read | Files and screenshots |
| Run a command and print its exit code | exec | Commands |
| Follow output as it arrives | exec | Streaming |
| Start work and read it after reconnecting | exec, read | Tasks |
| Prompt Codex on a selected machine | read, agent | Codex example |
| Prompt Claude Code on a selected machine | read, agent | Claude Code example |
| Capture the computer’s screen | screen, OS permission | Screenshots |
The language references cover TypeScript and
Python, including resource cleanup. Workflow snippets use the connected
client and selected box from the quickstart; run them inside its try or context-manager block.
Published source programs
Browse Python and TypeScript sources.
Run the executable examples
Set up and run a first example.
Catalog-based checkout runner
Select a workflow and interpret results.
Search Google Flights through a local MCP server
Save the latest fare report on the selected machine
Build an integration
Use a dedicated token for each application. Discover machines, select an explicit id and call the tool you need. Keep tool arguments typed; handle refusal codes and uncertain connection outcomes. For a custom AI integration, have the model propose a supported tool call, validate it against the tool contract, and execute it under that application’s grant.
The public SDK source and executable example files are in commandoperator/cmdop-sdk . Review commands before running them on your own machines.