1
Install the CLI
Upgrading from
@usenaive-sdk/vetta-cli? Run npm rm -g @usenaive-sdk/vetta-cli first, because both
packages install the same commands. Your saved login carries over.npx @usenaive-sdk/cli ….The snippets below use jq to capture ids from JSON output (… | jq -r .id) — install it,
or copy the agt_... / ses_... ids from the output by hand.Working with a coding agent? Point it at the onboarding manifest —
https://usenaive.ai/skill.md — and it will walk your operator
through everything on this page. Every command below is also a REST call against
the API, so curl works before the CLI does.2
Authenticate
The CLI stores a profile — a credential plus base URL — and never prints it back.Confirm which organization you are pointed at before you spend anything:
NAIVE_API_KEY and --api-base-url override the stored profile for a single command, so
scripts and CI never need a config file at all.3
Start the plan
A new organization needs a plan before anything outside billing answers. Standard is $20 a
month with $20 of credit included, and starts with a 7-day free trial (card required); Pro is
$200 a month with $200 included. See Pricing.
subscribe prints a hosted checkout link.4
Add credits
Billing is real US dollars, prepaid; the plan’s included credit lands here too and rolls over.
Your organization is the billing entity; every agent draws from the same balance. See
Billing.
topup prints a hosted checkout link — nothing is credited until the payment settles.5
Create an agent
An agent bundles a model, a system prompt, a completion window, and a budget — the budget is
required, so every agent has a spend cap from birth.Later commands take the id, not the name.
naive models list prints the model ids and the
completion windows each supports.You do not attach a computer to an agent. Each agent gets its own computer the first time
one of its sessions’ tools needs it, and every session of the agent works on it and sees the
same files — a text-only agent never gets one and pays nothing for it.
6
Run it and stream the output
A session is one directly-controlled run: create it with its first message, then stream events.The stream is the whole truth of the run — every model call with its quote, every tool call,
the reply, the usage line:Follow up with
naive session send --session "$SID" --text "…"; resume a dropped stream with
--after-seq.7
Read the meter
Every dollar is metered per component, per agent, and per session.Files the agent published during the run are listed with
naive file list --scope session --session "$SID".Create an API key for programmatic access
Code authenticates with a scoped API key — the secret is returned once and never again:"type": "module" in package.json (or use .mts / .mjs files), or load it with
await import("@usenaive-sdk/managed-agents") inside an async function in a CommonJS project (if tsc
builds it, set "module" to "node16" or "nodenext", or tsc turns the import into require()).
Driving a sandbox directly
A computer is a disposable Linux sandbox you can drive yourself, independently of any agent. Pause it and it bills nothing. Sessions work on their agent’s own computer — a computer you create here is never handed to one. See the Computer reference.The same arc over HTTP
The CLI is a thin client over the REST API; the whole arc above is a few requests.Next: how Naive Managed Agents works
Harness, runtime, tools — the three layers that make a finished task cheap.