Prime Agent is an open-source coding and research agent for general and long-running work, released under the MIT License.[1] Prime Agent began as a hard fork of pi-mono (https://github.com/badlogic/pi-mono) but is now developed and distributed independently.[2]
Prime Agent is installable on macOS or Linux via a curl-based installer: curl -fsSL https://app.primeintellect.ai/prime-agent/install.sh | sh.[1] The installer downloads a versioned release, verifies its SHA-256 checksum, installs the prime-agent command, and can prepare the IPython runtime used by the agent — details live on Installation and self-update.[1] After npm install, packages/coding-agent runs node postinstall.cjs via the postinstall lifecycle hook.[3]
Prime Agent must be started from the repository or directory it should work in; it runs commands and modifies files in the current working directory.[1] Prime Agent executes model-generated Python and project commands with the user's own permissions; its worker and kernel processes improve lifecycle isolation and recovery but are not a security sandbox.[1]
packages/coding-agent/package.json declares piConfig.name = "prime-agent" and piConfig.configDir = ".prime/agent", setting the agent's display name and configuration directory.[3] The packages/coding-agent binary is registered as pi, pointing to the bundled CLI entry point at dist/bundle/cli.js.[3] By default, Prime Agent gives the model one built-in tool — ipython — which uses a persistent kernel to read files, run commands, edit code, and inspect data; the tool is covered in depth on IPython tool.[2] Sessions are stored as JSONL files with a tree structure; each entry carries an id and parentId, enabling in-place branching without creating new files — session management is detailed on Sessions and navigation.[2] Prime Agent stores sessions as JSONL (JSON Lines) files, where each line is a self-contained JSON object, enabling individual entries to be appended or read without parsing the entire file. Prime Agent's persistent IPython kernel preserves Python environment state — variables, imports, and context — across tool calls within a session, eliminating the need to re-execute earlier steps.
Sources