Install the agent framework extras before following these examples:This adds PydanticAI, OpenAI Agents SDK, LangChain, and Playwright as dependencies. See installation for details.
Agentor
Agentor is Celesto’s own agent framework. It has built-in SmolVM support throughSmolVMRuntime, so your agent’s shell commands run inside a sandbox automatically.
PydanticAI
Register SmolVM as a PydanticAI tool. Each call spins up a fresh VM, runs the command, and tears it down automatically.Reusable sandbox across turns
If your agent needs to maintain state between tool calls, keep the VM alive across invocations:OpenAI Agents SDK
Use SmolVM as a function tool in the OpenAI Agents SDK:Use SmolVM as a SandboxAgent provider
If you want OpenAI’sSandboxAgent to treat SmolVM as its full working computer (not just a one-shot tool), use the ready-made provider in the Celesto SDK. It plugs into Runner and SandboxRunConfig directly, and ships alongside a hosted Celesto option you can swap in without changing your agent code. See OpenAI Agents SDK sandboxes for the full guide.
LangChain
Wrap SmolVM as a LangChain tool:Browser and desktop sandboxes
SmolVM can give your agent a browser or a full desktop inside a disposable sandbox. Use browser mode for websites and Playwright automation. Use desktop mode when the agent needs a visible screen that a computer-use driver can control. VNC means Virtual Network Computing, a standard way to view and control a remote screen.browser_agent.py
Browser and desktop modes
cdp_url is the browser automation address used by Playwright and other Chrome DevTools Protocol clients. viewer_url opens in your browser so you can watch the screen. display_url is the VNC address for desktop viewers and computer-use agents.
Computer-use with OpenAI
Combine a visible browser or desktop sandbox with OpenAI’s computer-use API for autonomous browsing and desktop workflows. The model sees screenshots and sends back click, type, and scroll instructions.computer_use_browser.py
