Skip to content

Inference

Threads call LLMs through the cluster’s inference gateway using inference accounts linked to your org. Link an account once per org and every thread in that org can use it. Provider credentials stay on the control plane; threads and machines only receive short-lived gateway tokens.

Kind anastroctl inference account add How it works
ChatGPT (Codex) codex ChatGPT subscription signed in via one-time device code (like Codex CLI)
Claude Code subscription claude Claude plan through the official Claude Code runtime, using a claude setup-token token
Antigravity antigravity Google Antigravity plan through agy, using Google sign-in and a paste-back code
OpenAI API key openai OpenAI key, or any OpenAI-compatible endpoint with --base-url
Anthropic API key anthropic Anthropic key, or any Anthropic-compatible endpoint with --base-url
  • Claude subscriptions run through Anthropic’s Agent SDK and Claude Code, drawing from your plan’s usage limits (see Anthropic’s subscription guidance).
  • Antigravity runs through agy (Google’s official Antigravity agent bundled in the agents sidecar), keeping one session per thread while routing all tool calls and approvals through Anastro—agy’s built-in file, terminal, and browser tools are blocked so nothing executes on the control plane. Available models (including Gemini and, on some plans, Claude and GPT) depend on your Antigravity plan.

Org owners and admins link accounts in Settings → Inference:

  • ChatGPT (Codex): displays a link and a one-time code valid for 15 minutes. Open the link on any device signed into ChatGPT and enter the code. If ChatGPT rejects it, enable device-code sign-in under ChatGPT’s Settings → Security (a workspace admin may need to allow it).
  • Claude Code subscription: run claude setup-token on your computer and paste the token. Anastro stores it encrypted and uses it only with the bundled Claude Code runtime; re-authenticate with a fresh token when it expires.
  • Antigravity: open the Google sign-in link on any device, sign in, and paste the resulting code (or full callback URL) within 15 minutes.
  • OpenAI / Anthropic API key: paste the key and optionally set an https:// Base URL for a compatible provider.

Or from the CLI (which also works over SSH):

Terminal window
anastroctl inference account add codex --label "Team Pro"
anastroctl inference account add claude --label "My Claude" # prompts for setup token
anastroctl inference account add antigravity # prints Google link, prompts for code
anastroctl inference account add anthropic # reads key from stdin or prompt
anastroctl inference account add openai --base-url https://llm.example.com/v1 --label "Internal"

To migrate an existing Codex CLI login into Anastro:

Terminal window
anastroctl inference account import codex --clear-local

Because refresh tokens rotate, the login moves rather than shares—--clear-local removes ~/.codex/auth.json so your local Codex CLI doesn’t invalidate Anastro’s token.

Terminal window
anastroctl inference account list # status, plan, limits, last refresh
anastroctl inference account test <id> # quick streamed test (--model to pick one)
anastroctl inference account default <id> # set the org default for new threads
anastroctl inference account set <id> --label "Team Pro" --budget 2000000
anastroctl inference account reauth <id> # update credentials in place; threads keep going
anastroctl inference account delete <id>

The UI exposes the same Re-authenticate, Test, Set default, and Remove actions. The first account linked in an org becomes its default.

Status Meaning
active Ready
needs_reauth Sign-in or key failed; re-authenticate to resume
limited Hit provider usage limit; resumes after reset time
revoked Deleted; kept only so historical usage logs still show its name

--budget sets a daily token cap per UTC day (--budget 0 removes it). Once exhausted, new requests are refused until the next UTC day.

Press ⌘⇧M in the composer to choose any model offered by your org’s accounts (star favorites to keep them on top), and ⌘⇧E to set effort and fast mode where supported. Both apply from the next message onward. Set your default model for new threads in Settings → Defaults.

Switching between accounts or provider protocols automatically hands off the thread’s context—see Switch models and recover from usage limits.

Open Settings → Usage (⌘U) for token and request counts over the last 1, 7, 30, or 90 days, broken down by account, day, and model (org owners and admins can view org-wide totals). The gateway tracks tokens, not dollar spend.

Terminal window
anastroctl inference usage --since 2026-11-01T00:00:00Z
anastroctl inference usage --all # org-wide (owners and admins)

Point local agents or SDKs (Pi, OpenAI SDK, Anthropic SDK) at your org’s accounts using the local proxy. It forwards over iroh as your enrolled device, writes a fresh per-run API key to a private temp file, prints its path, and deletes the file on exit (pass --credential-file <new-path> for automation):

Terminal window
anastroctl inference proxy # listens on 127.0.0.1:4141
Provider Base URL API key
OpenAI-compatible http://127.0.0.1:4141/v1/inference Contents of the credential file
Anthropic http://127.0.0.1:4141/v1/inference/anthropic Contents of the credential file

If you’re calling a node’s gateway directly (for example http://127.0.0.1:7443/v1/inference on a local dev stack, or behind your own reverse proxy), you can also mint a personal gateway token:

Terminal window
anastroctl inference token create --ttl 12h --model gpt-5
anastroctl inference token list
anastroctl inference token revoke <id>

Projects can opt in to giving commands and terminals inside machines access to the gateway—useful if you want to run an agent inside a machine terminal. Your operator must allow it cluster-wide, and a project owner turns it on in Project settings → Agents in machines, or with:

Terminal window
anastroctl project set --project <project> --machine-tokens true

Every command and terminal in that project’s machines then gets OPENAI_BASE_URL, OPENAI_API_KEY, ANTHROPIC_BASE_URL, and ANTHROPIC_API_KEY. The token only works from inside that machine and meters usage against it.

  • GitHub: give machines scoped access to your repositories.
  • Full design: Inference in the spec.