Skip to content

Prime Agent

Prime Agent is an open-source terminal coding agent from Prime Intellect. It provides an interactive TUI for repository analysis, code changes, tool execution, and long-running development sessions.

Prime Agent supports custom OpenAI-compatible providers through models.json. Connected to our Swiss-hosted Everyware AI API, your prompts and source code are processed on our Swiss GPU infrastructure.


Key Features

  • Terminal-first TUI: Interactive coding and repository work in the terminal.
  • Custom providers: Register OpenAI-compatible endpoints and model limits in models.json.
  • Thinking levels: Control reasoning effort per model or session.
  • Session defaults: Persist provider, model, and thinking level in settings.json.
  • Full data sovereignty: All model requests are routed through our Swiss Everyware AI API.

Installation

curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh -s -- beta

Update an existing installation:

prime-agent update

Configuration

1. Save API Key

Export your virtual API key as an environment variable:

export EW_AI_API_KEY="sk-bf-..."

2. Register the Gateway

Create or edit ~/.prime/agent/models.json:

{
  "providers": {
    "ew": {
      "baseUrl": "https://ai.ewcs.ch/v1",
      "api": "openai-completions",
      "apiKey": "EW_AI_API_KEY",
      "models": [
        {
          "id": "flagship",
          "name": "Everyware Flagship",
          "reasoning": true,
          "input": ["text", "image"],
          "contextWindow": 1048576,
          "maxTokens": 131072
        },
        {
          "id": "balanced",
          "name": "Everyware Balanced",
          "reasoning": true,
          "input": ["text", "image"],
          "contextWindow": 1000000,
          "maxTokens": 131072
        },
        {
          "id": "fast",
          "name": "Everyware Fast",
          "reasoning": true,
          "input": ["text", "image"],
          "contextWindow": 262144,
          "maxTokens": 131072
        }
      ]
    }
  }
}

apiKey can be a literal key, an environment variable name (as above), or a shell command prefixed with !. Prefer the environment variable so the key is not stored in the file.

The provider ID ew combined with the model IDs produces the selectors ew/flagship, ew/balanced, and ew/fast.

3. Optional: Set Defaults

Create or edit ~/.prime/agent/settings.json:

{
  "defaultProvider": "ew",
  "defaultModel": "flagship",
  "defaultThinkingLevel": "medium"
}

4. Verify and Start

cd /path/to/project
prime-agent model list
prime-agent --model ew/flagship

Typical Commands and Workflows

  • Start interactively:
    prime-agent
    
  • Select a model at startup:
    prime-agent --model ew/balanced
    
  • Set the thinking level:
    prime-agent --thinking high
    
  • In the TUI:
    • /model – open the model picker
    • /effort – change the reasoning level
    • /settings – edit common settings
  • One-shot prompt:
    prime-agent -p "Explain the architecture of this repository."
    

Version-dependent shortcuts

Prime Agent is under active development. Keyboard shortcuts and some configuration fields can differ between releases — use prime-agent model list and the in-app help to confirm the exact names for your installed version.