# Prime Agent Documentation > Technical reference for the Prime Agent monorepo: RLM control plane, continual harness, sessions, skills, daemon and ACP modes, multi-provider auth, and the coding-agent SDK surface. This is a Grok-Wiki source-grounded repository documentation set. Use the complete Markdown link when an agent needs the full repo context. ## Context Links - [Complete Markdown docs](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/llms-full.txt) - [Complete Markdown alias](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1.md) - [Human interactive docs](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1) - [GitHub repository](https://github.com/PrimeIntellect-ai/prime-agent) ## Repository - Repository: PrimeIntellect-ai/prime-agent - Generated: 2026-08-06T19:56:30.584Z - Updated: 2026-08-06T19:56:44.564Z - Runtime: Grok CLI - Format: Documentation - Pages: 25 ## Pages - [Overview](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/01-overview.md): What Prime Agent exposes, primary entry points (CLI, SDK, modes), runtime assumptions, and the first docs routes to follow. - [Installation](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/02-installation.md): Stable install command, release checksum flow, prime-agent binary placement, IPython runtime prep, and first-launch success signals. - [Quickstart](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/03-quickstart.md): Start prime-agent in a project directory, complete onboarding, run a first task, and verify interactive session health. - [Authentication and providers](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/04-authentication-and-providers.md): Login and API-key paths, multi-provider selection, OAuth examples, auth error recovery, and BYOK provider boundaries. - [RLM control plane](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/05-rlm-control-plane.md): Recursive Language Model model: persistent IPython as the control tool, prompt-as-variable context, and rlm(...) subagent calls. - [Continual Harness](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/06-continual-harness.md): Durable harness state (prompts, memories, skill specs, subagent specs), refine boundaries, immutable base prompt, and rollback snapshots. - [Sessions and runtime](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/07-sessions-and-runtime.md): Agent session lifecycle, session services, runtime events, queueing, tree navigation, and session-scoped vs durable state. - [Skills model](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/08-skills-model.md): Skills as importable Python packages, SKILL.md frontmatter constraints, collision precedence, and project vs personal skill scope. - [Subagents and messaging](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/09-subagents-and-messaging.md): rlm-spawned child agents, agent-message skill surface, direct agent-to-agent communication, and multi-agent orchestration constraints. - [Run daemon-backed sessions](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/10-run-daemon-backed-sessions.md): Background daemon client modes, active session state, detach and reattach, resume selectors, and worker recovery verification. - [Create and install skills](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/11-create-and-install-skills.md): Author a skill package with skill-creator, required SKILL.md fields, Python package layout, and load-path verification. - [Refine harness state](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/12-refine-harness-state.md): Run /refine against the current trajectory, apply evidence-backed harness updates, serialize refine, and use snapshots for rollback. - [Long-running tasks](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/13-long-running-tasks.md): Goals, compaction, heartbeats, autonomous mode, and retained subagents that keep multi-turn work progressing across disconnects. - [Use ACP mode](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/14-use-acp-mode.md): Run the Agent Client Protocol mode, map cold CLI launch, feature flags, stop reasons, and cwd constraints for editor integrations. - [Extensions and custom tools](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/15-extensions-and-custom-tools.md): Register extensions, custom tools, plan-mode and subagent extension samples, allowlists, and dynamic resource patterns. - [Session configuration reference](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/16-session-configuration-reference.md): Agent session config keys, defaults, reload behavior, in-memory settings, and config surfaces used by runtime services. - [Settings and provider keys](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/17-settings-and-provider-keys.md): Provider registration, model selection, API key and OAuth wiring, dynamic provider updates, and 401 stale-provider recovery. - [Built-in skills reference](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/18-built-in-skills-reference.md): Catalog of shipped skills (goal, refine, compact, heartbeat, observe, message, edit, integrations) with entry modules and invocation roles. - [Agent connection modes](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/19-agent-connection-modes.md): Daemon, in-process, and snapshot connection paths; agents-view mode; active session state and transfer idempotency constraints. - [ACP protocol reference](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/20-acp-protocol-reference.md): ACP mode entrypoints, event types, meta fields, stop reasons, kernel features, and protocol-facing constraints from source and tests. - [Minimal SDK agent](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/21-minimal-sdk-agent.md): Copy-paste minimal SDK bootstrap, custom prompt and model wiring, and expected first-run output from examples. - [Skills, tools, and extensions](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/22-skills-tools-and-extensions.md): SDK recipes for loading skills, registering tools, extensions, context files, prompt templates, and subagent extension wiring. - [Sessions and full control](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/23-sessions-and-full-control.md): SDK session management, settings injection, session runtime hooks, and the full-control composition example. - [Troubleshooting](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/24-troubleshooting.md): Auth failures, invalid resume selectors, provider 401s, network retry, worker recovery, and connection-mode failure probes. - [Develop from source](https://grok-wiki.com/public/docs/primeintellect-ai-prime-agent-3367c32760b1/pages/25-develop-from-source.md): Monorepo workspaces, build and check scripts, package boundaries (ai, agent, coding-agent, tui), and contributor conventions from AGENTS.md. ## Source Files - `AGENTS.md` - `package.json` - `packages/agent/README.md` - `packages/agent/src/agent-loop.ts` - `packages/agent/src/agent.ts` - `packages/ai/README.md` - `packages/ai/src/providers/amazon-bedrock.ts` - `packages/coding-agent/docs/acp.md` - `packages/coding-agent/docs/agent-connection.md` - `packages/coding-agent/examples/extensions/dynamic-resources/SKILL.md` - `packages/coding-agent/examples/extensions/plan-mode/README.md` - `packages/coding-agent/examples/extensions/README.md` - `packages/coding-agent/examples/extensions/subagent/agents.ts` - `packages/coding-agent/examples/extensions/subagent/README.md` - `packages/coding-agent/examples/README.md` - `packages/coding-agent/examples/sdk/01-minimal.ts` - `packages/coding-agent/examples/sdk/02-custom-model.ts` - `packages/coding-agent/examples/sdk/03-custom-prompt.ts` - `packages/coding-agent/examples/sdk/04-skills.ts` - `packages/coding-agent/examples/sdk/05-tools.ts` - `packages/coding-agent/examples/sdk/06-extensions.ts` - `packages/coding-agent/examples/sdk/07-context-files.ts` - `packages/coding-agent/examples/sdk/08-prompt-templates.ts` - `packages/coding-agent/examples/sdk/09-api-keys-and-oauth.ts` - `packages/coding-agent/examples/sdk/10-settings.ts` - `packages/coding-agent/examples/sdk/11-sessions.ts` - `packages/coding-agent/examples/sdk/12-full-control.ts` - `packages/coding-agent/examples/sdk/13-session-runtime.ts` - `packages/coding-agent/examples/sdk/README.md` - `packages/coding-agent/README.md` - `packages/coding-agent/skills/agent-message/SKILL.md` - `packages/coding-agent/skills/agent-observe/SKILL.md` - `packages/coding-agent/skills/compact/SKILL.md` - `packages/coding-agent/skills/edit/SKILL.md` - `packages/coding-agent/skills/edit/src/edit/__init__.py` - `packages/coding-agent/skills/goal/SKILL.md` - `packages/coding-agent/skills/refine/SKILL.md` - `packages/coding-agent/skills/refine/src/refine/__init__.py` - `packages/coding-agent/skills/rlm-heartbeat/SKILL.md` - `packages/coding-agent/skills/skill-creator/SKILL.md` - `packages/coding-agent/src/core/agent-messages.ts` - `packages/coding-agent/src/core/agent-session-config.ts` - `packages/coding-agent/src/core/agent-session-runtime.ts` - `packages/coding-agent/src/core/agent-session-services.ts` - `packages/coding-agent/src/core/agent-session.ts` - `packages/coding-agent/src/modes/acp/acp-events.ts` - `packages/coding-agent/src/modes/acp/acp-meta.ts` - `packages/coding-agent/src/modes/acp/acp-mode.ts` - `packages/coding-agent/src/modes/acp/acp-stop-reason.ts` - `packages/coding-agent/src/modes/agents-view/agents-view-mode.ts` - `packages/coding-agent/src/modes/daemon/active-session-state.ts` - `packages/coding-agent/test/acp-cold-cli.test.ts` - `packages/coding-agent/test/acp-events.test.ts` - `packages/coding-agent/test/acp-rlm-subagents.test.ts` - `packages/coding-agent/test/agent-connection-daemon.test.ts` - `packages/coding-agent/test/agent-connection-in-process.test.ts` - `packages/coding-agent/test/agent-connection-snapshot.test.ts` - `packages/coding-agent/test/agent-session-config.test.ts` - `packages/coding-agent/test/agent-session-dynamic-provider.test.ts` - `packages/coding-agent/test/fixtures/skills/missing-description/SKILL.md` - `packages/coding-agent/test/fixtures/skills/python-skill/SKILL.md` - `packages/coding-agent/test/fixtures/skills/python-skill/src/python_skill/__init__.py` - `packages/coding-agent/test/fixtures/skills/valid-skill/SKILL.md` - `packages/coding-agent/test/suite/acp-mode.test.ts` - `packages/coding-agent/test/suite/agent-session-compaction.test.ts` - `packages/coding-agent/test/suite/agent-session-goal.test.ts` - `packages/coding-agent/test/suite/agent-session-model-extension.test.ts` - `packages/coding-agent/test/suite/agent-session-refine-skill.test.ts` - `packages/coding-agent/test/suite/agent-session-runtime.test.ts` - `packages/coding-agent/test/suite/agent-session-serialized-refine.test.ts` - `packages/coding-agent/test/suite/regressions/2753-reload-stale-resource-settings.test.ts` - `packages/coding-agent/test/suite/regressions/2781-skill-collision-precedence.test.ts` - `packages/coding-agent/test/suite/regressions/2835-tools-allowlist-filters-extension-tools.test.ts` - `packages/coding-agent/test/suite/regressions/3317-network-connection-lost-retry.test.ts` - `packages/coding-agent/test/suite/regressions/3616-settings-inmemory-reload.test.ts` - `packages/coding-agent/test/suite/regressions/4435-auth-error-login-guidance.test.ts` - `packages/coding-agent/test/suite/regressions/4482-heartbeat-injected-prompt.test.ts` - `packages/coding-agent/test/suite/regressions/4491-provider-stale-after-401.test.ts` - `packages/coding-agent/test/suite/regressions/4537-nonblocking-onboarding.test.ts` - `packages/coding-agent/test/suite/regressions/4573-prime-inference-login-default.test.ts` - `packages/coding-agent/test/suite/regressions/4575-model-auth-selection.test.ts` - `packages/coding-agent/test/suite/regressions/4603-worker-recovery.test.ts` - `packages/coding-agent/test/suite/regressions/4656-resume-active-session.test.ts` - `packages/coding-agent/test/suite/regressions/4658-onboarding-transitions.test.ts` - `packages/coding-agent/test/suite/regressions/4685-daemon-client-modes.test.ts` - `packages/coding-agent/test/suite/regressions/4722-invalid-resume-selector.test.ts` - `packages/coding-agent/test/suite/regressions/617-subagent-terminal-agent-message.test.ts` - `packages/coding-agent/test/suite/regressions/623-acp-canonical-cwd.test.ts` - `packages/tui/README.md` - `prime-agent-runtime/src/rlm/__init__.py` - `README.md`