DocsAPI Reference
Coding Agents

Jan Agent

Run Jan's coding agent on Tokamak with your Tokamak key, attribution and Insights, without changing Jan's own configuration.


Install and launch

Complete Install and connect, using tokamak-stag for staging. The first tokamak launch jan-agent installs Jan Agent with the official installer when it is not found, and updates a build too old for Tokamak with jan update. To install it yourself:

# macOS / Linux (installs to ~/.local/bin)
curl -fsSL https://delta.jan.ai/jan-cli/install-jan-agent.sh | bash
# Windows (installs to %LOCALAPPDATA%\Programs\Jan)
irm https://delta.jan.ai/jan-cli/install-jan-agent.ps1 | iex

On Windows with the Jan desktop app installed, the launcher does not install Jan Agent for you; install it to its own folder: the app is also in %LOCALAPPDATA%\Programs\Jan, and installing there replaces its Jan.exe. Set $env:JAN_INSTALL_DIR (for example "$env:LOCALAPPDATA\Programs\jan-agent") before the command above, then add that folder to PATH.

tokamak launch finds Jan Agent's jan on PATH or in those install folders; the desktop app's own jan command is not Jan Agent and is skipped. Choose a model that supports Chat Completions.

tokamak launch jan-agent --model YOUR_MODEL_ID --check
tokamak launch jan-agent --model YOUR_MODEL_ID                 # the TUI
tokamak launch jan-agent --model YOUR_MODEL_ID "fix the build" # the TUI with a first task
tokamak launch jan-agent --model YOUR_MODEL_ID -- cli agent run "fix the build"

Native TUI flags (--safe, --plan, --resume, --project) and headless cli agent run flags go after --. tokamak launch jan-agent starts agent sessions only: run Jan's other commands (jan login, jan config, jan usage, jan update, …) directly.

How it connects

The launch names Jan's built-in tokamak provider and supplies your Tokamak key, endpoint and attribution headers at run time. Jan keeps that provider session-scoped: its models and prices stay in memory, nothing is written to ~/.jan, and your own jan login sign-in, providers, MCP servers, skills and sessions are unchanged. Inside a launched session, Jan refuses changes to the Tokamak sign-in; other providers work normally.

Before starting, the launcher asks the installed Jan what it supports (jan cli agent status). A build that cannot take a gateway at run time is updated with jan update once, and refused with "update Jan with jan update" if it still cannot. A project [provider] override for tokamak is refused too, so your key never goes to another address.

Usage and Insights

Tokamak meters every request. Requests are labelled Jan Agent, and with Insights enabled for your organization the session shows its prompts, API calls, tool runs and tokens, linked to its metered cost. Prompt text is sent only when your organization turned on prompt summaries.

Limits

  • A model role pointing at another provider (Jan's smol_model, a subagent's model) or a /model switch to another provider leaves Tokamak for those calls.
  • Jan's /new keeps one session for the whole TUI process, so several conversations appear as one Insights session.
  • Headless RPC (jan cli agent rpc, used by the Jan ADKs) is not started by the launcher.

See troubleshooting for connection issues.

On this page