This page gets you from install to a useful first Prime Agent session.
Install the latest stable release on Linux or macOS:
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | shTo try the latest beta built from main:
curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh -s -- betaBoth commands fetch versioned Prime Agent release artifacts and install the prime-agent command. The inherited npm workspace identifiers in the source tree are not the public install path.
Then start Prime Agent in the project directory you want it to work on:
cd /path/to/project
prime-agentTo run a source checkout instead, use Node.js 22.8.0 or newer:
git clone https://github.com/PrimeIntellect-ai/prime-agent
cd prime-agent
npm ci
./prime-agent.shThe source runner preserves the directory from which it is invoked, so you can also call /path/to/prime-agent/prime-agent.sh from another project.
Prime Agent can use subscription providers through /login, or API-key providers through environment variables or its auth file.
Start Prime Agent and run:
/login
Then select a provider. Built-in subscription logins include Claude Pro/Max, ChatGPT Plus/Pro (Codex), and GitHub Copilot.
Set an API key before launching Prime Agent:
export ANTHROPIC_API_KEY=sk-ant-...
prime-agentYou can also run /login and select an API-key provider to store the key in ~/.prime/agent/auth.json.
See Providers for all supported providers, environment variables, and cloud-provider setup.
Once Prime Agent starts, type a request and press Enter:
Summarize this repository and tell me how to run its checks.
Prime Agent gives the model one built-in tool, ipython. The long-lived kernel is a control environment for reading and editing files, running project commands, inspecting data, retaining Python state, and invoking installed skills. The kernel runtime is bootstrapped automatically on first use; set PRIME_AGENT_KERNEL_PYTHON to use an existing Python environment with ipykernel.
Prime Agent runs in your current working directory and can modify files there. Use git or another checkpointing workflow if you want easy rollback.
Recursive subagents are a built-in Prime Agent capability. The model spawns independent work from IPython with await rlm("subtask"); each call returns at admission with a child handle and never returns the answer. Children send requested results as explicit agent_message replies to the parent or write them to files. Child agents use the same TypeScript agent runtime, providers, tools, skills, and session machinery as the parent.
You can prompt the model to use that capability directly:
Review authentication and test coverage as independent subtasks. Run them in parallel, then synthesize the findings.
See RLM Runtime Architecture for the API and execution model.
Prime Agent loads context files at startup. Add an AGENTS.md file to tell it how to work in a project:
# Project Instructions
- Run `npm run check` after code changes.
- Do not run production migrations locally.
- Keep responses concise.Prime Agent loads:
~/.prime/agent/AGENTS.mdfor global instructionsAGENTS.mdorCLAUDE.mdfrom parent directories and the current directory
Restart Prime Agent, or run /reload, after changing context files.
Type @ in the editor to fuzzy-search files, or pass files on the command line:
prime-agent @README.md "Summarize this"
prime-agent @src/app.ts @src/app.test.ts "Review these together"Images can be pasted with Ctrl+V (Alt+V on Windows) or dragged into supported terminals.
In interactive mode:
!npm run lint
The command output is sent to the model. Use !!command to run a command without adding its output to model context. During agent work, the model normally runs project commands from the IPython control environment with a %%bash cell.
Use /model or Ctrl+L to choose a model. Use /effort to set the reasoning level. Use Ctrl+P / Shift+Ctrl+P to cycle through scoped models.
Sessions are saved automatically under ~/.prime/agent/sessions/:
prime-agent -c # Continue the most recent session
prime-agent -r [path|id] # Browse sessions or open a specific sessionInside Prime Agent, use /resume, /new, /tree, /fork, and /clone to manage sessions. Persistent sessions run in worker processes, so closing the TUI detaches from the agent rather than necessarily stopping it. Use prime-agent agents to inspect or reattach to active work.
For one-shot prompts:
prime-agent -p "Summarize this codebase"
cat README.md | prime-agent -p "Summarize this text"
prime-agent -p @screenshot.png "What's in this image?"Use --mode json for JSON event output or --mode rpc for process integration.
- Using Prime Agent - interactive mode, slash commands, sessions, context files, and CLI reference.
- Providers - authentication and model setup.
- Settings - global and project configuration.
- Keybindings - shortcuts and customization.
- Prime Agent Packages - install shared extensions, skills, prompts, and themes.
Platform notes: Windows, Termux, tmux, Terminal setup, Shell aliases.