Skip to main content
For Cloudflare Workers AI there is no outside CLI. Arakun runs the tool loop itself against the Workers AI API, so there is nothing to install.

Sign in

You need a Cloudflare API token with Workers AI access, and your account id. Give them to Arakun in one of two ways:
  • Set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID in the environment Arakun starts in.
  • Or run opencode auth login, pick Cloudflare Workers AI and paste the token. This needs the OpenCode CLI. If the account id is not saved with it, put it in ~/.config/opencode/cf-account-id.
Workers AI has no section in Settings. When a session is not signed in, the error has a Sign in in a terminal button that runs opencode auth login. The token goes only to api.cloudflare.com.

Pick a model

Pick the model and the reasoning level in the composer. Switching models sets the reasoning level back to that model’s default. The session shows its tokens and cost as it goes, worked out from these prices.
Claude Sonnet 5.5 is not a Workers AI modelArakun sends it to Anthropic’s API, so it needs an Anthropic API key (pay per use). Put the key in ~/.config/arakun/anthropic-key, one line, or set ARAKUN_ANTHROPIC_KEY. Arakun ignores ANTHROPIC_API_KEY.

What it can do

The agent can run shell commands, read, write and edit files, search the code, fetch and search the web, and load skills. It asks before each shell command and each edit: Allow, Always allow commands (or edits), or Deny, which stops the turn. It reads the project’s AGENTS.md, or CLAUDE.md if there is none. Sessions are saved, so you can resume one after a restart. Headless agents use Workers AI models too, and arakun agent new --model workers-ai/<model> <prompt> starts a session from a terminal.

Skills

A skill is a folder with a SKILL.md. Workers AI finds them in:
  • ~/.claude/skills and ~/.agents/skills
  • the project’s .claude/skills and .agents/skills
  • the Claude Code plugins you turned on
The system prompt lists each skill’s name and description. The agent loads a skill’s instructions when a task matches it, or when you type /<name>. A skill in your home folder wins over a project skill with the same name. Discover › Skills in the Marketplace installs skills from skills.sh into ~/.claude/skills.

See what uses the tokens

Each turn logs what each tool’s results added to the context. Add them up, largest first:
Shell commands are split by the program they run, such as bash cargo and bash git. Add --json for JSON.

What does not work yet

  • No MCP servers and no plan mode.
  • The Workers AI models can’t see images. Arakun has a vision model describe each attached photo and passes the description on. Claude Sonnet 5.5 sees photos itself.
  • Sessions are not compacted. When the next request would not fit in the model’s context, the session stops; start a new one to go on.
  • The Usage tab doesn’t show Workers AI.
  • Workers AI sessions can’t be sandboxed yet, and a headless session’s sandbox only sees the project’s skills.
  • A turn makes at most 200 model calls.

Rate limits

Arakun keeps to 20 requests a minute per model, across all sessions; GPT-OSS 120B allows 300. Set ARAKUN_WORKERS_AI_RPM to change the limit. When Cloudflare answers 429, Arakun waits and retries, up to 8 tries.

Common errors

Arakun found no token, or Cloudflare refused it. Set CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID, or run opencode auth login and paste a token with Workers AI access. Then retry.
You picked Claude Sonnet 5.5 without an Anthropic key. See the note under “Pick a model”.
Cloudflare kept refusing requests. Wait a minute, or lower ARAKUN_WORKERS_AI_RPM if several sessions run at once.
Start a new session. GPT-OSS 120B fills up first, at 128K tokens.