Skip to content

AI Coding Agents

Every managed compute instance ships with three AI coding agents that work directly on your files:

Agent How you use it Models Billed to
opencode In the browser—click the opencode button GoFigr AI Gateway (Claude, GPT, and open-weight models) Your GoFigr AI token allowance
Codex CLI codex in any terminal GoFigr AI Gateway Your GoFigr AI token allowance
Claude Code claude in any terminal Your own Claude account or Anthropic API key Your Anthropic account

All three see the same home directory (/home/gofigr/notebooks) as JupyterLab, code-server, and R Server, and run with the same Python environment (/home/gofigr/venv) on their PATH. Ask an agent to fix a notebook, refactor an analysis, or write a script, and the changes show up in every editor immediately.

opencode is a full AI coding agent with a web UI. When an instance is Running, click opencode in the instance’s connect row. It opens in a new tab, already inside your home directory, with Claude Sonnet 5 selected.

From there:

  • Chat with the agent about your project. It can read and edit files, run shell commands, and execute Python in your environment.
  • Switch models from the model picker. Everything served by the GoFigr AI Gateway is available, under the GoFigr AI Gateway provider.
  • Sessions persist. Conversation history lives on your data volume, so you can stop the instance and pick a session back up after the next start.

The opencode button appears only on instances launched from an image that includes it. If an older instance doesn’t show the button, launch a new instance—its data volume gets the newer image.

Codex and Claude Code are terminal programs. Open a terminal from JupyterLab (File → New → Terminal) or from code-server’s integrated terminal, cd to your project, and run the agent. Both are on PATH, and the Python environment is already active.

Terminal window
codex

Codex is pre-configured to use the GoFigr AI Gateway with GPT-5.6 Terra as its default model. To use a different model for one session, pass any gateway model name:

Terminal window
codex -m claude-sonnet-5

To change the default, edit ~/.codex/config.toml, which GoFigr seeds on the instance’s first boot. The file is yours—edits persist across stop/start, and you can add MCP servers or other Codex settings as usual. The model line accepts any name from the model table.

Terminal window
claude

Claude Code runs on your own Anthropic account, not on the GoFigr AI Gateway. On first run it walks you through signing in with your Claude subscription, or you can set ANTHROPIC_API_KEY in your shell instead. Usage is billed by Anthropic and doesn’t draw on your GoFigr allowance.

Claude Code’s built-in auto-updater is disabled on managed compute; new versions arrive with image updates.

The GoFigr AI Gateway is an OpenAI-compatible endpoint that serves Claude, GPT, and open-weight models to the tools on your instance. It’s what opencode and Codex use out of the box. Each request is authenticated with the instance’s own credentials and metered against your monthly AI token allowance—the same allowance that powers AI features in the web app.

The gateway is also available to your own code. In any terminal, notebook, or R session on the instance, OPENAI_BASE_URL and OPENAI_API_KEY are already set, so the OpenAI Python SDK (or anything else that speaks the OpenAI API) works with no configuration:

from openai import OpenAI
client = OpenAI() # picks up OPENAI_BASE_URL / OPENAI_API_KEY
reply = client.chat.completions.create(
model="claude-sonnet-5",
messages=[{"role": "user", "content": "Summarize this DE analysis plan..."}],
)

Use the model names below—raw provider IDs are rejected.

Different models draw on your allowance at different rates. The relative cost column shows how many allowance tokens one model token consumes, so a Claude Opus 5 session uses about 25× the allowance of a GPT-5.6 Luna session of the same length. Output tokens are additionally weighted 4× relative to input.

Model name Model Relative cost Vision
claude-opus-5 Claude Opus 5 25
claude-sonnet-5 Claude Sonnet 5 (opencode default) 8
claude-opus-4-6 Claude Opus 4.6 25
claude-sonnet-4-6 Claude Sonnet 4.6 8
claude-haiku-4-5 Claude Haiku 4.5 2
gpt-6-astra GPT-6 Astra 40
gpt-5.6-sol GPT-5.6 Sol 16
gpt-5.6-terra GPT-5.6 Terra (Codex default) 8
gpt-5.6-luna GPT-5.6 Luna 1
gpt-oss-120b GPT-OSS 120B 2
gpt-oss-20b GPT-OSS 20B 1
kimi-k2.5 Kimi K2.5 2
kimi-k2-thinking Kimi K2 Thinking 2
glm-5 GLM-5 2.5
deepseek-v3.2 DeepSeek V3.2 1.5
qwen3-coder-next Qwen3 Coder Next 1.5
devstral-2 Devstral 2 123B 1.5
minimax-m2.5 MiniMax M2.5 1

A few things to know:

  • Reasoning effort settings only apply to Claude models. For the other models the gateway ignores any reasoning-effort or thinking parameter rather than failing the request.
  • Rate limits. The gateway enforces per-instance requests-per-minute and tokens-per-minute limits. A 429 response means you’ve hit one—wait a moment and retry.
  • Quota exhausted. Once your monthly allowance (plus a small overage buffer) is used up, gateway requests are refused until the next billing period. The agents will report an authentication or quota error.

The AI Usage card in the web app shows your monthly token usage against your allowance, broken down by model. Tokens consumed by opencode and Codex appear there alongside usage from AI features in the web app.

You’re not locked into the gateway. Each agent’s configuration is an ordinary file on your data volume that GoFigr creates once, on the instance’s first boot, and never overwrites:

Agent Configuration
opencode ~/.config/opencode/opencode.json
Codex ~/.codex/config.toml
Claude Code ~/.claude/ (not seeded—Claude Code manages it)

Add your own provider (an OpenAI key, a self-hosted model, and so on) following each tool’s documentation and it persists across stop/start. Anything you route to your own provider is billed by that provider, not by GoFigr.

Agent state lives on your data volume and survives stop/start:

  • opencode sessions and settings in ~/.local/share/opencode and ~/.config/opencode
  • Codex sessions and configuration in ~/.codex
  • Claude Code sign-in, settings, and history in ~/.claude

Deleting the instance removes all of it along with the rest of the volume.

The opencode button isn’t there. The instance was launched from an image that predates opencode. Launch a new instance.

The first claude or opencode command takes a long time. The agents are large single-file programs, and the very first launch after a fresh volume can take tens of seconds while the binary is read. Subsequent launches are fast.

Codex or opencode says the model doesn’t exist. Use one of the model names from the table above, not a provider ID like us.anthropic.claude-sonnet-5.

Requests fail with an authentication or quota error. Check the AI Usage card—you’ve likely used up your monthly allowance. Claude Code errors of this kind come from your Anthropic account instead.

Claude Code asks me to sign in. That’s expected: it uses your Anthropic account, not GoFigr’s gateway. See Claude Code.

Still stuck? Email support@gofigr.io with your instance name.