What is inside
| Part | What it is for |
|---|---|
| Browser | A headless browser the agent drives. All its traffic leaves through a Secant route. |
| Wallet | The box’s own Solana wallet. Rent is paid from it, second by second. |
| Mailbox | An inbox for sign-up codes and receipts. It dies with the box. |
| Disk | Scratch 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();| Length | Lamports | SOL |
|---|---|---|
| 1 minute | 696,000 | 0.000696 |
| 10 minutes | 6,960,000 | 0.00696 |
| 1 hour | 41,760,000 | 0.04176 |
| 1 day | 1,002,240,000 | 1.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
- Open: the node starts a fresh box and a fresh wallet, and the meter starts.
- Work: everything the browser fetches goes out through a private route.
- Close: the meter stops, the bill is settled from the box wallet, the disk is wiped.
- Whatever is left in the box wallet goes back to the address that opened it.