Prime Agent

Type: kb/types/note.md

Evidence basis: source code and shipped documentation at commit 514633727bf26d74f39f3119c2b0e31a5ceb2a9d, analysed on 2026-09-05; no target execution or efficacy experiment.

Prime Agent is a coding and research runtime built around persistent Python and mutable supplemental harness state. Its Recursive Language Model interface makes tool use and child-agent work programmable from IPython. Its Continual Harness retains prompts, memories, skill descriptions and subagent specifications for later use. The inspected code supports persistent execution and context adaptation; it does not establish that an individual refinement improves performance. Claimed work, refinement admission.

Execution and control

A daemon supervisor routes clients to session workers. The session assembles context, calls the selected provider model, executes requested tools, and handles steering, follow-up and continuation. IPython is the default active SDK tool and can run Python, shell commands, imports and subprocesses. Tool-name and argument checks plus optional extension hooks govern admission; the worker/kernel processes run with user permissions and do not supply a security sandbox. Session setup, loop, trust boundary.

Child spawning returns a handle when work is admitted. Completion and explicit replies arrive later. Children have their own sessions and local state, while inheriting tool grants and sharing global harness access. Recursion depth is enforced at the host API, not across arbitrary Python execution. If a worker dies after a potentially effectful operation, recovery marks interrupted work and avoids replaying uncertain commands; it does not undo earlier effects. Child admission and completion, recovery.

Retained context

Continuity uses several stores: branch-selected JSONL history, compaction and branch summaries, supplemental harness entries, kernel snapshots and retained children. History assembly uses entry identities to select delivered material. Harness prompt assembly supplies a bounded catalog; requesting a complete entry is a separate read. Persistence therefore does not imply that the full entry reaches the model. Kernel revival restores arbitrary serialized values, so readable name manifests cannot establish every payload's form or authority. History selection, catalog, namespace revival.

Compaction summaries, branch summaries and refinement each implement automatic trace-fed production of retained guidance for later model calls. This meets the analysis's trace-learning criterion without establishing benefit. The task horizon remains uncertain across session/branch alternatives; a session can contain multiple tasks. Raw logging, namespace copying and independent skill authorship are distinct from those learning transformations. Compaction application, branch continuation.

What refinement checks

The refiner proposes edits from bounded conversation and harness history. Optional automatic review decides whether to attempt refinement; structural checks then admit or reject each edit. Checks cover permitted fields, the reserved base-prompt target, entry existence and changes since planning. Recorded before/after entries support inverse edits. These checks do not test factual truth, the behavior of a referenced skill, or realized improvement. Direct Python harness writes and arbitrary executable extensions are separate admission paths. Planner and checks, application.

One evidential distinction is easy to lose: the refiner's expectedOutcome is stored and later displayed as an outcome. It remains a prediction. Autonomous quality gates are a separate mechanism: the host executes configured commands and uses their exit/error/timeout results to stop or request repair. No inspected route makes those task gates an independent test of each harness refinement. Prediction storage, gate execution.

Scope

This is a bounded whole-system code analysis, not an exhaustive inspection of every adapter, extension, UI or installer path. Remote provider internals, deployed grants, actual recalled-content dependence, measured improvement and causal effects remain uninspected. The selected checkout revision was not verified as the latest upstream commit. Candidate-linked runs and controlled comparisons would be needed to strengthen the assessment.

The exact result retains the canonical records, both lenses, comparison profile, source boundaries and limitations.