Prime Agent

Connect Prime Agent (Prime Intellect) to Gab AI as a custom OpenAI-compatible provider for long-running coding and research agents.

Prerequisites

Install Prime Agent

Install the latest stable release, then start it from the project directory you want the agent to work in:

Install and launch

Not a security sandbox

Prime Agent runs model-generated Python and project commands with your user permissions. Use a disposable clone or clean worktree for untrusted work, and review changes before committing.

Add Gab AI as a Custom Provider

Prime Agent does not list Gab AI as a built-in provider. Add it through ~/.prime/agent/models.json using the OpenAI Chat Completions API. The apiKey value can be a literal key, an environment variable name, or a shell command (prefix with !):

~/.prime/agent/models.json

Environment variable for the key

With "apiKey": "GAB_AI_API_KEY", Prime Agent reads the value of that environment variable. Export it before launching, or put a literal key / !command in the field instead.

Authenticate and Select the Model

Export your Gab AI API key, then start Prime Agent with the custom provider and a model id from your models.json (or switch with /model inside the TUI):

Launch with Gab AI

Discover Compatible Models

Prime Agent's tools and subagents work best with models that support function calling. List them from the Gab AI API, then add matching ids to models.json:

List function-calling models

Model slug case sensitivity

The model id must exactly match a slug from GET /v1/models — lowercase, hyphenated. "Claude Sonnet 4.5" will fail; use claude-sonnet-4-5 (or whatever /v1/models returns).

Supported Features

Useful Prime Agent Commands

Once Gab AI is configured, these commands help with day-to-day agent work:

CLI reference (common)

Troubleshooting

Further reading

Prime Agent's own docs cover providers, custom models, long-running agents, and the RLM programming model — start at github.com/PrimeIntellect-ai/prime-agent.

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

cd /path/to/project
prime-agent

Not a security sandbox

Prime Agent runs model-generated Python and project commands with your user permissions. Use a disposable clone or clean worktree for untrusted work, and review changes before committing.

{
  "providers": {
    "gab-ai": {
      "baseUrl": "https://gab.ai/v1",
      "api": "openai-completions",
      "apiKey": "GAB_AI_API_KEY",
      "compat": {
        "supportsDeveloperRole": false,
        "supportsReasoningEffort": false
      },
      "models": [
        {
          "id": "arya",
          "name": "Arya",
          "reasoning": false,
          "input": ["text"],
          "contextWindow": 128000
        },
        {
          "id": "claude-sonnet-4-5",
          "name": "Claude Sonnet 4.5",
          "reasoning": true,
          "input": ["text", "image"],
          "contextWindow": 200000
        }
      ]
    }
  }
}

Environment variable for the key

With "apiKey": "GAB_AI_API_KEY", Prime Agent reads the value of that environment variable. Export it before launching, or put a literal key / !command in the field instead.

export GAB_AI_API_KEY="gab-xxxxxxxxxxxx"

cd /path/to/project
prime-agent --provider gab-ai --model arya
curl https://gab.ai/v1/models \\
  -H "Authorization: Bearer YOUR_GAB_API_KEY" \\
  | jq -r '.data[] | select(.capabilities.function_calling and .capabilities.text) | .id'

Model slug case sensitivity

The model id must exactly match a slug from GET /v1/models — lowercase, hyphenated. "Claude Sonnet 4.5" will fail; use claude-sonnet-4-5 (or whatever /v1/models returns).

prime-agent agents                   # Browse running, idle, and saved sessions
prime-agent attach <agent>           # Reattach to a running session
prime-agent --resume <path|id>       # Resume a saved session
prime-agent -p "Summarize this repo" # One-shot non-interactive prompt
prime-agent doctor                   # Inspect background services

Further reading

Prime Agent's own docs cover providers, custom models, long-running agents, and the RLM programming model — start at github.com/PrimeIntellect-ai/prime-agent.