# How to Deploy PrimeAgent: A Complete Installation and Setup Guide

> Easily deploy PrimeAgent with our complete installation guide. Follow simple steps to set up and launch PrimeAgent for your AI projects. Get started today!

- Repository: [Prime Intellect/prime-agent](https://github.com/PrimeIntellect-ai/prime-agent)
- Tags: how-to-guide
- Published: 2026-08-20

---

**Answer:** Deploy PrimeAgent by running the official installer script (`curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh`), which bootstraps Node.js ≥20.6, installs the CLI globally, and optionally configures the IPython kernel—then launch with `prime-agent` and authenticate via `/login`.

PrimeAgent from **PrimeIntellect-ai/prime-agent** is a self-contained Node.js command-line tool that launches a long-running daemon, worker process, and IPython kernel for autonomous coding tasks. Whether you need a quick production deployment or a development environment for customizing the runtime, this guide covers every path with exact commands and source file references.

## Prerequisites for PrimeAgent Deployment

Before installing, ensure your system meets these requirements:

- **Node.js** ≥ 20.6 (the installer installs this automatically if missing)
- **curl** for downloading the installer
- **npm** (bundled with Node)

The [`install.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/install.sh) script handles detection and bootstrapping. If you prefer manual control, install Node 20.6+ via your system's package manager first.

## Install PrimeAgent from Release (Recommended)

The production deployment path uses the signed, versioned release tarball.

### Stable Channel Installation

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

```

This command in [`install.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/install.sh) performs the following:

- Resolves the latest stable version
- Downloads the tarball with SHA-256 checksum verification
- Runs `npm install -g` to install the CLI
- Prompts to bootstrap the IPython runtime (`uv`, Python 3.11, `ipykernel`)

### Beta Channel Installation

For early access features:

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

```

The `-s beta` flag switches the version resolution logic in [`install.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/install.sh) to fetch pre-release builds.

## Launch and Configure PrimeAgent

After installation, start the agent in any project directory:

```bash
cd /path/to/your/project
prime-agent

```

By default, PrimeAgent launches in **interactive TUI mode**. The terminal interface renders an animated splash screen and interactive panels handled by `packages/tui`.

### Authentication

Configure your LLM provider inside the TUI:

```

/login

```

Or set environment variables before launching:

```bash
export ANTHROPIC_API_KEY="sk-..."
prime-agent

```

Source configuration is managed in `packages/ai/src/providers/` with provider abstractions defined in the **ai** package.

### Non-Interactive One-Shot Mode

Run a single prompt without the TUI:

```bash
prime-agent -p "Summarize this codebase"

```

This mode skips the animated interface and streams output directly to stdout.

## Deploy PrimeAgent from Source (Development)

For modifying the runtime or adding custom providers, deploy from the Git repository:

```bash
git clone https://github.com/PrimeIntellect-ai/prime-agent
cd prime-agent
npm ci
./prime-agent.sh

```

The [`prime-agent.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/prime-agent.sh) entry point:
- Sets up the workspace directory
- Resolves the package location via `packages/agent`
- Forwards CLI arguments to the core daemon

This path preserves the monorepo structure with three runtime packages:

| Package | Role | Key Entry |
|---------|------|-----------|
| `packages/agent` | Core daemon, session manager, RPC layer | [`src/agent.ts`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/src/agent.ts) |
| `packages/ai` | LLM provider abstraction, streaming logic | Provider implementations in `src/providers/` |
| `packages/tui` | Terminal UI, splash screen, interactive panels | Vitest build config in [`vitest.config.ts`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/vitest.config.ts) |

## Configure PATH for Stand-Alone Node

If the installer used its bundled Node binary instead of a system installation, it prompts to update your shell profile. Accepting writes:

```bash
export PATH="$HOME/.local/share/prime-agent-node/current/bin:$PATH"

```

Apply the change:

```bash
source ~/.bashrc    # or ~/.zshrc, ~/.config/fish/config.fish

```

The [`install.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/install.sh) script detects your shell and suggests the appropriate file.

## IPython Kernel Setup

PrimeAgent executes code cells through an IPython kernel. You have two setup paths:

**During Installation:** Answer "yes" to the bootstrap prompt in [`install.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/install.sh)

**On-Demand:** The first time you run a cell command (`%%bash` or `!cmd`), the agent automatically downloads `uv` and provisions Python 3.11 with `ipykernel`.

Manual preparation is never required—the runtime handles lazy initialization.

## Execute Commands from Within PrimeAgent

Once running, prefix shell commands with `!`:

```

!npm run lint
!git status

```

These execute through the IPython kernel's bash cell magic, with output streamed back to the TUI.

## Key Source Files for Deployment

Understanding these files helps troubleshoot or extend your deployment:

- **[`install.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/install.sh)** — Full installer logic, platform detection, checksum verification, and Node bootstrap
- **[`prime-agent.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/prime-agent.sh)** — CLI entry point that loads the workspace and forwards arguments
- **[`packages/agent/src/agent.ts`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/packages/agent/src/agent.ts)** — Core daemon implementing session creation and RPC handling
- **`packages/ai/src/providers/`** — LLM provider implementations including streaming abstractions
- **[`packages/coding-agent/docs/quickstart.md`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/packages/coding-agent/docs/quickstart.md)** — End-user quick-start documentation

## Summary

- **Production deployment:** Run the [`install.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/install.sh) one-liner for automated Node setup and global CLI installation
- **Development deployment:** Clone the repository, run `npm ci`, and launch via [`./prime-agent.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/./prime-agent.sh)
- **Authentication:** Use `/login` in TUI mode or set provider API keys as environment variables
- **IPython kernel:** Bootstraps automatically during install or on first code execution
- **Core packages:** `agent` (daemon), `ai` (providers), and `tui` (interface) form the runtime architecture

## Frequently Asked Questions

### What Node.js version does PrimeAgent require?

PrimeAgent requires **Node.js ≥ 20.6**. The [`install.sh`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/install.sh) script automatically downloads and installs a compatible version if your system lacks it, or uses your existing installation if sufficient.

### Can I use PrimeAgent without the interactive TUI?

Yes. Pass the `-p` flag with your prompt for **one-shot mode**: `prime-agent -p "your question here"`. This executes without launching the animated interface and returns results directly to the terminal.

### How do I add a custom LLM provider to PrimeAgent?

Create a new provider file in `packages/ai/src/providers/` following the existing pattern. Implement the streaming interface yielding `AssistantMessageEventStream`, then rebuild with `npm run build`. See [`packages/ai/README.md`](https://github.com/PrimeIntellect-ai/prime-agent/blob/main/packages/ai/README.md) and existing providers like the Anthropic implementation for the full pattern.

### What happens if I skip IPython kernel setup during installation?

PrimeAgent **lazy-initializes** the kernel on first use. When you first execute a code cell or shell command, it automatically downloads `uv`, installs Python 3.11, and configures `ipykernel` without manual intervention.