agent.ts
What it costs
Agents bill from the same credit balance as every other primitive. 1 credit = $0.05. No subscription, no per-agent fee.naive agents spend <agent-id> prints six components — inference, sandbox,
web_search, browser, storage, wakes — including the zeros, because a
paid tool missing from that view is how a bill goes unnoticed. wakes is not
metered today and prints rate not configured rather than being omitted.
The limits, plainly
The completion window is served on GLM-5.2 only
completion_window decides how a turn is scheduled — tool fan-out, sub-agent
allowance, how hard the model is asked to batch. It never changes your model.
asapis the default and is admitted on every model.standardandflexare served only onzai-org/GLM-5.2-FP8. That is the entire supported set.
standard or flex on any other model is meant to fail with
window_unavailable (400) and never be quietly downgraded — a window served
as asap under another name reports a discount nobody bought.
What it buys, and the measurement behind it — including a five-harness comparison
whose raw ranking inverts once you condition on the wall-clock cap — is on
Pricing.
Three fields that are not live yet
status, wakes and next_wake_at come back on every agent and are written
by nothing — exactly two writers touch the row and neither sets them. So
status reads "idle", wakes reads 0, and next_wake_at reads null
whether or not an alarm is armed. Do not build on them. harness_sha256 is
stamped by the runtime and is real.
Is an agent the right primitive?
Tenancy
agents.create refuses without a child project. The child project owns the vault
entries, the connections and the Account Kit that decide what the agent may
touch, so an agent with no owner has no credentials and no cap.
404, never 403, so
an id is never confirmed to someone who should not have it.
Next
Quickstart
API key to a running agent — SDK, CLI or cURL.
Concepts
Agent, task, completion window, sandbox, budget, schedule, event log, deliverable.
Pricing
The six components, and what the window is measured to do.
SDK
All 22 methods.
CLI
All 18 verbs.
API
All 20 routes.