Prime-Intellect-ai/prime-agent Prerequisites: Complete Setup Guide for 2024

To use Prime Agent, you need Node.js v18+, Python 3.9+, npm v9+, a POSIX shell, Git, an LLM provider API key, and optionally tmux and ffmpeg.

Prime Agent is a multi-language, multi-process AI agent framework that combines a TypeScript/Node.js frontend with a Python runtime for executing code. Understanding the prerequisites for Prime-Intellect-ai/prime-agent ensures a smooth installation and prevents common environment-related failures.

Core Runtime Requirements

Prime Agent operates across two distinct runtime environments that must both be present on your system.

The entire user-facing layer of Prime Agent is built on Node.js. According to the source repository, the core packages—packages/ai, packages/agent, packages/coding-agent, and packages/tui—are written in TypeScript and compiled with the Node toolchain.

Check your version:

node --version

If below v18, install or upgrade via your package manager or nodejs.org.

npm v9+ or Equivalent (pnpm/yarn)

The monorepo uses npm workspaces defined in package.json. The npm ci command installs exact versions locked in package-lock.json.

npm --version

Python 3.9+ with venv Support

The "prime-agent-runtime" daemon that executes skill code lives entirely within the prime-agent-runtime/ directory. This Python module requires:

  • Python 3.9 or newer
  • The venv module for creating isolated environments

The setup script at scripts/setup-kernel-venv.sh automates virtual environment creation and dependency installation.

System Environment Prerequisites

POSIX-Compatible Shell

Installation and helper scripts—including install.sh and prime-agent.sh—are written for bash, zsh, or compatible shells. Windows users should use WSL2 or Git Bash.

Git

Required for cloning the repository and applying certain development patches.

git clone https://github.com/PrimeIntellect-ai/prime-agent.git
cd prime-agent

LLM Provider API Keys

Prime Agent communicates with large-language-model backends. Keys are read from environment variables or a .env file. Supported providers include:

  • OpenAI
  • Anthropic
  • Groq

Copy the template and configure your credentials:

cp .env.example .env

# Edit .env, adding: OPENAI_API_KEY=sk-...

tmux

The interactive TUI is frequently tested inside tmux sessions to guarantee controlled terminal dimensions. While not strictly required, tmux prevents display issues in varying terminal environments.

ffmpeg

Some tooling—particularly image-to-video conversions—expects the system ffmpeg binary to be available in $PATH.

Step-by-Step Installation

Follow this sequence after confirming all prerequisites above.

1. Clone and Enter Repository

git clone https://github.com/PrimeIntellect-ai/prime-agent.git
cd prime-agent

2. Install Node Dependencies

npm ci

3. Set Up Python Kernel Runtime

./scripts/setup-kernel-venv.sh

This creates prime-agent-runtime/.venv and installs Python dependencies as specified in prime-agent-runtime/pyproject.toml.

4. Configure API Credentials

cp .env.example .env

# Edit .env with your provider keys

5. Launch Prime Agent

./prime-agent.sh

This entry point script starts both the Python daemon and the Node-based TUI.

Quick Verification Examples

Once prerequisites are satisfied, verify functionality with these commands.

Start Daemon and TUI Separately


# Start the daemon in background

prime-agent-runtime/src/rlm/harness.py &

# Launch the interactive UI

./prime-agent.sh

List and Select Models

prime-agent.sh /list-models
prime-agent.sh /set-model gpt-4o-mini

Programmatic Coding Agent Usage

import { CodingAgent } from '@primeintellect/agent';
const agent = new CodingAgent({ model: 'gpt-4o-mini' });

await agent.run(`
  Write a TypeScript function that returns the Fibonacci sequence up to n.
`);

Key Source Files for Reference

File Purpose
package.json Declares Node version, workspace layout, top-level scripts
install.sh Convenience installer checking Node, npm, Python; runs npm ci and venv setup
prime-agent.sh Entry point starting daemon + TUI
.env.example Template for required environment variables
scripts/setup-kernel-venv.sh Creates Python virtual environment and installs runtime dependencies
prime-agent-runtime/pyproject.toml Python project metadata and dependency pins
README.md High-level overview and quick-start
AGENTS.md Development rules and tmux-based TUI testing instructions

Summary

  • Node.js v18+ and npm v9+ power the TypeScript frontend and TUI
  • Python 3.9+ with venv support runs the code execution daemon
  • POSIX shell and Git are required for installation scripts
  • LLM API keys enable communication with OpenAI, Anthropic, or Groq
  • tmux prevents TUI display issues; ffmpeg unlocks video tooling

With these prerequisites installed and configured according to the Prime-Intellect-ai/prime-agent source code, you can clone the repository, run npm ci, execute scripts/setup-kernel-venv.sh, configure .env, and start using Prime Agent immediately.

Frequently Asked Questions

Can I use an alternative package manager to npm?

Yes. While the repository documents npm ci in package.json, pnpm and yarn are explicitly mentioned as equivalent alternatives. Ensure your chosen manager supports workspace functionality for the monorepo structure.

What happens if my Python version is 3.8 or older?

The prime-agent-runtime requires Python 3.9 or newer. The scripts/setup-kernel-venv.sh script will likely fail or create an incompatible environment. Upgrade Python before proceeding.

Is Windows natively supported?

Prime Agent expects a POSIX-compatible shell for its installation and runtime scripts. Windows users should run Prime Agent within WSL2, which provides the required bash environment and proper path handling for both Node.js and Python.

Where do I get the required API keys?

Create accounts with your preferred LLM providers—OpenAI, Anthropic, or Groq—and generate API keys from their developer dashboards. Copy these into .env after running cp .env.example .env. Without valid keys, Prime Agent cannot communicate with any model backend.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →