Docs · Guide

Prime Agent on any model

Prime Agent is Prime Intellect's open-source coding agent in Rust, the prime-agent command. It keeps Pi's settings.json and models.json in a folder of its own and reads them with Pi's fields and types. packinggoods sets it up as it does Pi, so Prime Agent runs on any model in packinggoods: DeepSeek, GLM, Kimi, Qwen, Claude or a ChatGPT subscription.

Set up Prime Agent

  1. Add a provider in packinggoodsAdd an API key on the Providers page, or sign in to a subscription.
  2. Pick a model for Prime Agent on the Agents pagePick a model via packinggoods.
  3. Run prime-agentA new session starts on that model, with every model of packinggoods's in its list.
Terminal
packinggoods prime-agent deepseek/deepseek-v4-pro

What gets written

Terminal
~/.prime/agent/            (or $PRIME_AGENT_CODING_AGENT_DIR)
  settings.json            defaultProvider: "packinggoods"
                           defaultModel:    "deepseek/deepseek-v4-pro"
                           defaultThinkingLevel
  models.json              providers.packinggoods: the gateway's /v1,
                           the key packinggoods-prime-agent, packinggoods's models

packinggoods adds a provider named packinggoods to models.json, at the gateway's /v1 with packinggoods's models, and sets defaultProvider, defaultModel and defaultThinkingLevel in settings.json. Your own providers and settings stay as they are.

Prime Agent's requests carry no User-Agent, so the key packinggoods gives it names it, packinggoods-prime-agent: that is how the gateway counts its requests as Prime Agent's.

PRIME_AGENT_CODING_AGENT_DIR

Prime Agent's folder is ~/.prime/agent, or $PRIME_AGENT_CODING_AGENT_DIR when it is set, ~ in it standing for home. A relative path is its working directory's, which packinggoods can't know, so it isn't taken and packinggoods writes ~/.prime/agent. A Prime Agent in WSL is set up too.

Settings left to you

Only the global settings.json is written, as for Pi. These are yours, and packinggoods doesn't change them:

  1. A project's .prime/agent/settings.jsonSettings for that project.
  2. allowedModelsIts daemon's allow-list; a model outside it fails loudly.
  3. subagentDefaultModelThe model subagents start on.

So if you keep allowedModels, add packinggoods's model to it.

Switching back

Pick one of your own models on Prime Agent's row, or run the command below. packinggoods copied both files before its first write: if nothing changed since, they go back byte for byte; otherwise only packinggoods's provider is removed.

Terminal
packinggoods prime-agent default

FAQ

Can Prime Agent run on DeepSeek or GLM?

Yes. Pick a via-packinggoods model for Prime Agent on packinggoods's Agents page. packinggoods adds its provider to models.json, so DeepSeek, GLM, Kimi, Qwen and Claude all work.

Which folder does packinggoods write to?

~/.prime/agent, or PRIME_AGENT_CODING_AGENT_DIR when it is set, with ~ expanded. A relative path isn't taken.

packinggoods's model fails as not allowed. Why?

Your allowedModels doesn't list it. packinggoods leaves that list to you; add the model to it.

How does packinggoods know Prime Agent's requests?

By the key packinggoods gives it, packinggoods-prime-agent, since its requests carry no User-Agent.

More agents on the same models: Pi on any model, Kimi Code on any model, DS Bot on any model and Muse Code on any model. Something fails? See Fixing common errors, or ask on Discord.