Overview
Prime Agent treats model-assisted repository work as a programmable, persistent process rather than a single chat exchange. Its Python RLM coordinates files, commands, state, skills, and child-agent admissions while the TypeScript host owns provider calls, sessions, queues, lifecycles, and policy. Recursive delegation divides separable questions; durable workers, artifacts, branching, and lossy compaction support continuity; scoped harness state preserves tested patterns; and goals, triggers, and bounded gates support continued work. These mechanisms provide composability, not guaranteed correctness: the repository documents architecture and limits, not universal quality, reliability, or economic advantage. Because the kernel runs with worker operating-system permissions, untrusted code requires external restriction.
Learning outcomes
- Prime Agent's main unit of value is a persistent, programmable work process, not a longer chat transcript.
- The Python RLM coordinates present work; the TypeScript host remains authoritative for execution, sessions, and policy.
- Child sessions, durable artifacts, and compaction extend work across subtasks and interruptions, but they do not certify correctness.
- Refinement and autonomy should stay scoped and bounded; untrusted code still requires an external sandbox.
Keywords
Preview every chapter · Unlock full text, audio, and video from chapter 4
PlansFAQ
What makes Prime Agent different from a coding chatbot?
Prime Agent differs by treating model-assisted work as a programmable, persistent process with working state, delegation, durable sessions, and host-managed policy rather than a single chat exchange.
How does Prime Agent preserve context during long tasks?
Prime Agent preserves working context in a persistent Python namespace and durable session records, while compaction rebuilds a usable path from summaries and recent messages. Compaction is lossy, so decisive evidence should live in inspectable artifacts.
How does delegation work in Prime Agent?
Prime Agent's `rlm.spawn` admits a named child runtime and returns a handle, not its eventual answer. Findings later arrive through an agent message or file, after which the parent must reconcile and verify them.
Is Prime Agent a security sandbox?
Prime Agent is not a security sandbox. Its Python kernel and project commands run with the worker's operating-system permissions; process separation supports lifecycle containment, so untrusted code needs an external restricted environment.
Can Prime Agent continue work without a person at the terminal?
Prime Agent can continue work unattended when goals, triggers, budgets, and gates are configured, but another continuation or a passing gate does not prove the objective is complete.