Account, keys and webhooks ›
Get policy
GET
/v1/policyGet policy.
RequestTypeScript
- import { Agental } from "agental-sdk";
- const agental = new Agental();
- const policy = await agental.policy();
Answer200 OK · Policy
- {
- "signup": "open" | "invite",
- "sandboxesPerAccount": integer | null,
- "defaultTtlSeconds": integer | null,
- "maxTtlSeconds": integer | null,
- "publicUrls": boolean,
- "routeDomain": string | null,
- "routesPerSandbox": integer | null,
- "forks": boolean,
- "runsOn": boolean,
- … 15 more
- }
Sign-up mode and the limits that apply to every account.
Headers
AuthorizationrequiredBearer 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
signupopeninvite
invite means POST /v1/auth/register needs an inviteCode.
sandboxesPerAccountintegernull
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.defaultTtlSecondsintegernull
Seconds a new sandbox runs after a start before it is stopped.
More
Null means it is not stopped for age.maxTtlSecondsintegernull
Largest ttlSeconds a caller may set.
More
Null means no ceiling.publicUrlsboolean
Whether a port registered as public gets an address of its own.
routeDomainstringnull
Domain that public addresses are subdomains of.
More
Null when they are off.routesPerSandboxintegernull
Ports one sandbox may register.
More
Null means no limit.forksboolean
Whether a sandbox can be forked into a new sandbox with a copy of what it holds.
runsOnboolean
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.
sshboolean
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.desktopboolean
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.browserboolean
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.keepMemoryboolean
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.archivingboolean
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.archiveAfterSecondsintegernull
Seconds a sandbox stays stopped before it is archived without being asked.
More
Null when that does not happen.emailobject3 fields
Sandbox mail: whether this deployment offers it.
More
It is off for each sandbox until that sandbox's owner turns it on.receivingboolean
Whether a sandbox can be sent mail.
More
Where it can, PUT /v1/sandboxes/{id}/email turns it on for one sandbox.sendingboolean
Whether a sandbox can send mail.
More
It can write to one address only: its own account's.domainstringnull
The domain every sandbox's mail domain is under.
More
Null where there is no mail.networkPolicyboolean
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.hiddenVariablesboolean
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.metricsboolean
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.telemetryboolean
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.passwordSignUpboolean
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.consoleUrlstring
Where the console is, such as https://console.agental.io: its Billing page is consoleUrl/billing and its API keys page consoleUrl/keys.
cliPackagestringnull
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.signInobject5 fields
The ways there are to sign in here.
passwordboolean
For accounts that have a password.
emailCodeboolean
A six-digit code sent to the email address.
githubboolean
googleboolean
passkeyboolean
A passkey, for an account that has added one: both steps of two-factor sign-in at once.