Skip to content
Free plan, no credit card

A code sandbox for AI agents: a fresh computer for each task

Obsession gives your AI agents a code sandbox, a computer in the cloud where they run code, install packages and work with files. It starts when a task needs it and stops when the task ends.

import { Obsession } from "obsession"const obsession = new Obsession({ apiKey: process.env.OBSESSION_API_KEY })// A computer for this task onlyconst sandbox = await obsession.sandboxes.create()// Run the code your agent wroteawait sandbox.run("pip install pandas")await sandbox.run("python report.py")// When the task ends, the sandbox stops and so does the bill

A computer for each agent, for the files it finds.

An agent downloads a statement, a spreadsheet or a PDF and needs to work on it. The sandbox runs the code, sends back the result and keeps the output in the log.

  1. 01A report arrives by email
  2. 02The agent runs code on it
  3. 03It checks every row
  4. 04The answer goes to your system
Ledger agent 7 at fenwick.exampleExample

Event log

3,000 runs today

  1. 06:00email.receivedDaily settlement report · settlements.csv attached
  2. 06:00sandbox.finished1,204 rows checked in 1.8 s · 3 don’t match the bank
  3. 06:01email.sentThe 3 mismatches, row by row, to finance@fenwick.example
  4. 06:01webhookMismatch list sent to your accounting system

1,204 rows checked in 1.8 seconds

4 events · delivered
A report in, code run on it, and the rows that don’t match out, before anyone starts work. Fenwick is an invented example.

Your agent runs its own code, away from your systems.

A full Linux computer for each task, gone when the task is done.

  • Starts when needed

    It starts when your agent calls for one, and stops when the task ends.

  • Any language

    Python and Node are ready to use, with a shell for anything else on Linux.

  • Install what it needs

    pip, npm and apt work as they do on your own machine.

  • Files in and out

    Upload a spreadsheet, run code on it, and download the chart or report it makes.

  • Sealed off

    Each sandbox is set apart from the others and from your systems, so your agent’s code touches only its sandbox.

  • The internet when you allow it

    Turn network access on to fetch data or call an API, or keep it offline.

Every event reaches your webhook, your code or your agent.

Each event is saved in your event log, then sent where you listen.

The events it sends

sandbox.finished
A sandbox finishes its task, with its output.

Where they reach you

  1. One signed webhook

    Subscribe once for every piece and blueprint. Each event is signed.

  2. Your event log, by cursor

    Read every event since the last one you saw.

  3. Your own agent, over MCP

    Events as tools, in Claude Code, Cursor or any MCP client.

  4. Your handler, on our runtime

    Your code runs about 50 ms after the event lands. No server to run.

  5. A live stream while you build

    Every event, forwarded to your laptop.

  6. Zapier, Make and n8n

    Each event starts a Zap, scenario or workflow.

If your server is down, events retry for 27 hours, and any event can be replayed.

See the code for each channel

A sandbox is billed only while it works.

Pay for the processor time and memory it uses.

See every price
Sandbox
$0.12 an active vCPU hour
Billed only while the CPU works, so a sandbox waiting on a task costs almost nothing.
Sandbox memory
$0.015 a GiB hour

Run the code your agent writes, set apart from everything else.

A computer in the cloud, set apart from your systems, where an agent runs the code it writes. It installs packages, reads and writes files and returns the results.

RL environments for AI agents

Any language that runs on Linux. Python and Node are ready to use, and your agent can install anything else with pip, npm or apt.

The sandbox stops and billing stops with it. Download the files you want to keep before it stops.

Only if you allow it. Turn network access on to fetch data or call an API, or leave it off.

Sandbox: $0.12 an active vCPU hour.

Give your agent a computer for each task.