Docs
Account, keys and webhooks ›

Get policy

GET/v1/policy

Get policy.

RequestTypeScript
  1. import { Agental } from "agental-sdk";
  2. const agental = new Agental();
  3. const policy = await agental.policy();
Answer200 OK · Policy
  1. {
  2. "signup": "open" | "invite",
  3. "sandboxesPerAccount": integer | null,
  4. "defaultTtlSeconds": integer | null,
  5. "maxTtlSeconds": integer | null,
  6. "publicUrls": boolean,
  7. "routeDomain": string | null,
  8. "routesPerSandbox": integer | null,
  9. "forks": boolean,
  10. "runsOn": boolean,
  11. … 15 more
  12. }

Sign-up mode and the limits that apply to every account.

Headers

Authorizationrequired
Bearer key
An API key that may make this call.

Returns

200 Sign-up mode and the limits that apply to every account. No auth.

Policy24 fields
signup
openinvite
invite means POST /v1/auth/register needs an inviteCode.
sandboxesPerAccount
integernull
Sandboxes one account may hold at a time, stopped ones included, before it has saved a card or bought a plan.
More One that has, where plans are enforced, may hold any number, and runs as many at once as its plan's runningUnits. Null means no per-account limit.
defaultTtlSeconds
integernull
Seconds a new sandbox runs after a start before it is stopped.
More Null means it is not stopped for age.
maxTtlSeconds
integernull
Largest ttlSeconds a caller may set.
More Null means no ceiling.
publicUrls
boolean
Whether a port registered as public gets an address of its own.
routeDomain
stringnull
Domain that public addresses are subdomains of.
More Null when they are off.
routesPerSandbox
integernull
Ports one sandbox may register.
More Null means no limit.
forks
boolean
Whether a sandbox can be forked into a new sandbox with a copy of what it holds.
runsOn
boolean
Whether GitHub Actions jobs can run on sandboxes: an organization connects GitHub (GET /v1/github), and a job that asks for runs-on: agental-<size> runs on one of its sandboxes.
ssh
boolean
Whether a sandbox can be logged in to over SSH.
More Where it can, PUT /v1/sandboxes/{id}/ssh turns it on and answers with the address and port to connect to, and POST /v1/sandboxes/{id}/ssh/keys lets a public key in.
desktop
boolean
Whether a sandbox can be given a desktop: a screen in its machine that programs open windows on, an agent reads and clicks on, and a person watches in a browser.
More Where it can, PUT /v1/sandboxes/{id}/desktop turns it on and answers with the address to watch it at.
browser
boolean
Whether a sandbox's browser can be driven from outside it, over the Chrome DevTools Protocol: by Playwright, Puppeteer, browser-use or Stagehand on your own computer.
More Where it can, PUT /v1/sandboxes/{id}/browser starts Chrome in the sandbox and answers with the address to connect to.
keepMemory
boolean
Whether a sandbox can be stopped with its memory kept: POST /v1/sandboxes/{id}/stop with keepMemory, after which a start puts back every process as it was.
More A stopped sandbox that keeps its memory costs 10% of its running price, and 5% without.
archiving
boolean
Whether a stopped sandbox can be archived: its machine kept in storage until it is started again.
More An archived sandbox is still stopped and loses nothing, and a start of it answers 202 and takes longer.
archiveAfterSeconds
integernull
Seconds a sandbox stays stopped before it is archived without being asked.
More Null when that does not happen.
email
object3 fields
Sandbox mail: whether this deployment offers it.
More It is off for each sandbox until that sandbox's owner turns it on.
receiving
boolean
Whether a sandbox can be sent mail.
More Where it can, PUT /v1/sandboxes/{id}/email turns it on for one sandbox.
sending
boolean
Whether a sandbox can send mail.
More It can write to one address only: its own account's.
domain
stringnull
The domain every sandbox's mail domain is under.
More Null where there is no mail.
networkPolicy
boolean
Whether a sandbox can be held to an outbound rule: a template's rule set to blocked or allowlist with PUT /v1/templates/{id}/network, and a sandbox's own addresses on top of it.
More False, asking for either answers 501 network_policy_unavailable, and every sandbox is open.
hiddenVariables
boolean
Whether a variable can be kept out of its sandbox: set with hosts, its commands see a stand-in, and the proxy on the sandbox's server puts the value in on HTTPS requests to those hosts.
More False, a save with hosts answers 501 hidden_variables_unavailable, and a variable already kept out stays out.
metrics
boolean
Whether a sandbox's CPU, memory, disk and network are read and kept: GET /v1/sandboxes/{id}/metrics and GET /v1/metrics.
More False, both answer 501 metrics_unavailable. GET /v1/metrics/running answers either way.
telemetry
boolean
Whether an account can have its sandboxes' metrics and lifecycle events sent to a collector of its own, over OTLP/HTTP: GET, PUT and DELETE /v1/telemetry, and POST /v1/telemetry/test.
More Metrics are sent only where metrics is true as well. False, those calls answer 501 telemetry_unavailable.
passwordSignUp
boolean
Whether a new account can be made with a password.
More False where a code can be emailed: a new account then signs up by code, GitHub or Google.
consoleUrl
string
Where the console is, such as https://console.agental.io: its Billing page is consoleUrl/billing and its API keys page consoleUrl/keys.
cliPackage
stringnull
The npm package the agental command is published as: npx <cliPackage>@latest signs in through the browser, installs the command and the agent skills, and with sh opens a shell in a new sandbox.
More Null until it is published.
signIn
object5 fields
The ways there are to sign in here.
password
boolean
For accounts that have a password.
emailCode
boolean
A six-digit code sent to the email address.
github
boolean
google
boolean
passkey
boolean
A passkey, for an account that has added one: both steps of two-factor sign-in at once.