Skip to content

overview

Zachary BENSALEM edited this page Aug 15, 2026 · 1 revision

Prime Agent overview

Prime Agent is a self-improving RLM (Recursive Language Model) coding and research agent. It ships as a web chat interface, a terminal UI, and a headless daemon, all three drive the same core session runtime (@earendil-works/pi-coding-agent) through a single typed connection seam called AgentConnection.

The repository (Qredence/fleet-prime-agent) is a hard fork of PrimeIntellect's prime-agent (originally badlogic's pi-mono). The agent core lives in the npm workspace under packages/; the web chat interface is a standalone Qredence product under web/ that is not merged upstream. The repo is public and self-installing: curl -fsSL https://raw.githubusercontent.com/Qredence/fleet-prime-agent/main/install.sh | sh clones, builds, and links a global prime-agent command.

Key capabilities:

  • Persistent IPython is the built-in model tool, the model reads files, runs shell commands, edits code, and manages context through a persistent Jupyter kernel (packages/coding-agent/src/core/kernel/, prime-agent-runtime/).
  • Recursive subagents, rlm(...) spawns real child agents for parallel or background work and returns their results programmatically (packages/coding-agent/src/core/rlm-runtime.ts).
  • Self-improving harness, /refine reviews the current trajectory and applies small, evidence-backed updates to supplemental harness state; it never rewrites the immutable base system prompt, and recorded snapshots support rollback (packages/coding-agent/src/core/refinement/).
  • Skills are executable, skills are importable Python packages; a built-in skill creator turns recurring workflows into project or personal skills.
  • Daemon-backed sessions, agents keep running when the terminal disconnects and can be reattached later; heartbeats, schedules, and autonomous mode preserve progress across turns (packages/coding-agent/src/modes/daemon/).
  • Agent-to-agent communication, running agents can exchange messages and orchestrate one another without routing through the user.

Who uses it

Developers and researchers who want a long-running coding agent that keeps state across sessions: work in the terminal (prime-agent), over the web chat at http://127.0.0.1:3000 (prime-agent web), or through the SDK. It works with API keys and subscription providers (Anthropic, OpenAI, Google, Mistral, Bedrock, and more) via /login or environment variables.

Repository layout

Path Package Purpose
packages/ai @earendil-works/pi-ai LLM provider abstraction, streaming, model registry, OAuth, MCP client
packages/agent @earendil-works/pi-agent-core Core agent runtime (Agent class, turn loop)
packages/coding-agent @earendil-works/pi-coding-agent Coding agent: CLI, SDK, session runtime, daemon, tools, skills
packages/tui @earendil-works/pi-tui Terminal UI engine (differential rendering, components, editor)
web/protocol @prime-agent/web-protocol Web wire contract (ChatStreamEvent, zod schemas, provider catalog)
web/design @prime-agent/web-design Shared web chat components and tool renderers
web/server @prime-agent/web-server HTTP adapter (PrimeBridge, event mapper, handlers)
web/app @prime-agent/web Web chat frontend (TanStack Start host)
prime-agent-runtime , Python IPython kernel shim (requires Python >= 3.10)

The root also contains the installer (install.sh), dev launchers (prime-agent.sh, fleet-prime), release and check scripts (scripts/), and CI workflows (.github/workflows/).

Where to go next

Clone this wiki locally