Agent tools

account

account({ action?: "overview" | "keys" })

What the account has and what it has spent: credits, plan, this month by kind, and the devices registered on it. Free and instant. With action "keys", the account's API keys instead, for an audit.

category: readfreeone optional action
Using Python?

Switch any code block to Python: the choice applies to every page. Python SDK guide and resource reference.

What it reports

FieldIs
Credits leftThe balance.
PlanWhich pack the account is on.
This monthWhat was spent, by kind.
DevicesThe computers and phones registered.

Why the agent has it

So it stops inventing figures. The system prompt tells it to read this before an expensive job, when the user asks what is left, and instead of guessing a price.

A balance is not a cost

Do not add what this returns to a run's credit total

The balance travels as a balance. Treating it as the tool's cost makes a run that reads it look like it spent the entire account — and makes a modest budget die on the first call.

action "keys": the audit, not the keyring

It lists each API key of the account with the day it was created and the day it was last used. A key is shown once, at creation, and never again — not here either. Creating one is not on the public API at all, and revoking one is the user's own call: a key cut off breaks whatever is using it, and the agent does not know what that is.

It is in the read-only set

An investigating subagent can be given it: it reads a number and changes nothing.