Connect Prime Agent (Prime Intellect) to Gab AI as a custom OpenAI-compatible provider for long-running coding and research agents.
Install the latest stable release, then start it from the project directory you want the agent to work in:
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.
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 !):
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 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):
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:
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).
Once Gab AI is configured, these commands help with day-to-day agent work:
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
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
}
]
}
}
}
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'
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
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.