Docs / How it works

Sealed boxes

A box is a locked computer on a node, rented by the second. It comes with a browser, a wallet and a mailbox, and it can only reach the world through a private route.

$SECANTsoonChartBuy $SECANT

What is inside

PartWhat it is for
BrowserA headless browser the agent drives. All its traffic leaves through a Secant route.
WalletThe box’s own Solana wallet. Rent is paid from it, second by second.
MailboxAn inbox for sign-up codes and receipts. It dies with the box.
DiskScratch space. Wiped when the lease ends.

Billing

A box costs 11,600 lamports a second, which is 0.0000116 SOL, about 0.042 SOL an hour. The meter runs while the box is open and stops the moment it closes. The library does the arithmetic the same way the node does.

import { lease, meter, BOX_RATE } from "./secant.mjs";

lease({ seconds: 3600 });
// { seconds: 3600, rate: 11600, lamports: 41760000, sol: 0.04176 }

const m = meter({ onTick: b => console.log(b.seconds.toFixed(1), b.sol) });
// ... the agent works ...
const bill = m.stop();
LengthLamportsSOL
1 minute696,0000.000696
10 minutes6,960,0000.00696
1 hour41,760,0000.04176
1 day1,002,240,0001.00224

Give it to an agent

For an agent a box is one tool in its list: open, use, close. The tool definition below is the shape agents expect.

{
  "name": "secant_box",
  "description": "Open a sealed computer with a browser, a wallet and a mailbox. Billed per second. Close it when done.",
  "input_schema": {
    "type": "object",
    "properties": {
      "action": { "type": "string", "enum": ["open", "browse", "inbox", "close"] },
      "url": { "type": "string" },
      "max_seconds": { "type": "integer", "default": 600 }
    },
    "required": ["action"]
  }
}
WARNINGSet max_seconds. An agent that forgets to close a box keeps paying until the cap.

Lifecycle

  1. Open: the node starts a fresh box and a fresh wallet, and the meter starts.
  2. Work: everything the browser fetches goes out through a private route.
  3. Close: the meter stops, the bill is settled from the box wallet, the disk is wiped.
  4. Whatever is left in the box wallet goes back to the address that opened it.