PrimeIntellect-ai/prime-agent Dependencies: Complete Package Breakdown

PrimeIntellect-ai/prime-agent uses an npm workspaces monorepo with four core packages—@earendil-works/pi-ai, @earendil-works/pi-agent-core, @earendil-works/pi-coding-agent, and @earendil-works/pi-tui—declaring runtime, development, and optional dependencies across multiple package.json files.

The prime-agent repository is structured as a TypeScript monorepo where dependencies are organized hierarchically. Understanding this structure is essential for contributors who want to extend functionality, debug installation issues, or deploy the CLI in custom environments.

Root-Level Workspace Dependencies

The repository root declares workspaces in package.json via "workspaces": ["packages/*", …]. This configuration enables npm to link internal packages automatically during installation.

At the root level, only two runtime dependencies are defined:

  • @earendil-works/pi-coding-agent — serves as the CLI entry point
  • get-east-asian-width — Unicode width calculation utility for terminal rendering

Development dependencies at the root include TypeScript, Biome, Vitest, tsx, husky, and concurrently for orchestrating builds and tests across packages.

Package-Specific Dependencies

@earendil-works/pi-ai

Located in packages/ai/package.json, this package provides unified LLM API access with automatic model discovery. Its runtime dependencies include:

  • @anthropic-ai/sdk
  • @aws-sdk/client-bedrock-runtime
  • @google/genai
  • @mistralai/mistralai
  • openai
  • undici
  • zod-to-json-schema
  • typebox
  • chalk
  • partial-json
  • proxy-agent

These SDKs enable communication with Anthropic, OpenAI, Google, Mistral, and AWS Bedrock providers through a single interface.

@earendil-works/pi-agent-core

Defined in packages/agent/package.json, this package contains general-purpose agent abstractions for transport, state management, and attachments. It declares minimal external dependencies:

  • @earendil-works/pi-ai (internal workspace dependency)
  • typebox

@earendil-works/pi-coding-agent

The CLI-driven coding assistant in packages/coding-agent/package.json has the most extensive dependency list:

  • @agentclientprotocol/sdk
  • @earendil-works/pi-agent-core
  • @earendil-works/pi-ai
  • @earendil-works/pi-tui
  • @silvia-odwyer/photon-node
  • chalk
  • cli-highlight
  • diff
  • extract-zip
  • file-type
  • glob
  • hosted-git-info
  • ignore
  • jiti
  • marked
  • minimatch
  • proper-lockfile
  • strip-ansi
  • typebox
  • undici
  • uuid
  • yaml
  • zeromq

This package also declares @mariozechner/clipboard as an optionalDependency, enabling system clipboard integration when available without failing installation when absent.

@earendil-works/pi-tui

The text-based UI package in packages/tui/package.json depends on shared internal libraries. Its exact dependency list is defined in its respective package.json.

Dependency Resolution Flow

The prime-agent dependency graph operates through three mechanisms:

  1. Workspace linking — npm automatically symlinks internal @earendil-works/* packages during npm install
  2. Provider aggregation — all LLM-dependent packages consume @earendil-works/pi-ai, which centralizes provider SDKs
  3. Optional feature loading — clipboard support loads conditionally via optionalDependency semantics

Installation commands follow standard npm workspace patterns:


# Install all dependencies across root and packages

npm install

# Run the coding agent CLI

npm run dev --workspace=packages/coding-agent

# Execute tests across all packages

npm test --workspaces

# Type-check a specific package

npx tsc --noEmit --project packages/ai/tsconfig.json

Key Configuration Files

File Path Purpose
package.json Root workspace definition, shared devDependencies
packages/ai/package.json LLM provider SDK configuration
packages/agent/package.json Core agent abstractions
packages/coding-agent/package.json CLI tool integrations, optionalDependencies
packages/tui/package.json Terminal UI dependencies

Summary

  • PrimeIntellect-ai/prime-agent uses npm workspaces to manage four interconnected packages
  • Runtime dependencies are minimized at the root and declared per-package based on functionality needs
  • @earendil-works/pi-ai centralizes LLM provider SDKs (Anthropic, OpenAI, Google, Mistral, AWS Bedrock)
  • @earendil-works/pi-coding-agent contains the most dependencies, including optional clipboard support
  • All packages share TypeScript, Biome, Vitest, and tsx for development workflows

Frequently Asked Questions

How do I install all dependencies in the prime-agent repository?

Run npm install from the repository root. The workspaces configuration automatically installs dependencies for all packages in packages/*.

What LLM providers does prime-agent support out of the box?

The @earendil-works/pi-ai package includes SDKs for Anthropic, OpenAI, Google Gemini, Mistral AI, and AWS Bedrock Runtime. Provider selection is handled automatically based on model identifiers.

Why is clipboard support optional in the coding agent?

The @mariozechner/clipboard dependency is declared as an optionalDependency in packages/coding-agent/package.json. This allows the CLI to function on systems without clipboard support or where native module compilation fails, graceful degrading rather than blocking installation.

Can I use individual packages without the full monorepo?

Yes. Each package can be built and published independently. The workspace linking during development becomes standard npm dependency resolution when consuming published versions from a registry.

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 →