Overview
Pi Agent Harness separates the agent loop, provider boundary, workflow extensions, session memory, durable operations, interfaces, security, and telemetry. The series shows where each decision belongs, how context and effects move through the system, and why portability, continuity, and remote access do not remove host-owned policy or uncertainty. The newer durable and remote surfaces remain version- and maturity-sensitive.
Learning outcomes
- Pi keeps the core loop small and exposes seams for providers, workflow policy, sessions, interfaces, and host controls.
- Provider portability preserves a common request path but not identical authentication, capabilities, reasoning formats, or history.
- Session trees and compaction preserve navigable records while making active context a selective, potentially lossy projection.
- Durability can classify unknown outcomes and prevent unsafe replay, but it cannot make remote requests or shell effects exactly once.
- Security containment, credential scope, network policy, and telemetry privacy remain host or deployment responsibilities.
Keywords
Preview every chapter · Unlock full text, audio, and video from chapter 4
PlansFAQ
What is Pi Agent Harness?
Pi Agent Harness is a layered coding-agent system that combines an agent loop, provider and model routing, sessions, tools, extensions, and host-facing interfaces. Its seams let applications change workflows without rewriting the core, while the host retains responsibility for effects and policy.
How does Pi keep model providers interchangeable?
Pi keeps providers interchangeable by routing common agent requests through provider-owned authentication, catalogs, compatibility rules, and streaming behavior. The shared surface preserves the turn sequence, but capabilities, reasoning formats, costs, and message translation can still differ.
Does Pi provide a sandbox or permission system?
Pi does not include a built-in sandbox or general permission system. Project trust controls configuration loading, while real containment must come from the operating system, a container, VM, micro-VM, or policy-controlled sandbox; hooks can add workflow gates but are not isolation.
How does Pi preserve context after branching or process loss?
Pi preserves branches in an append-only session tree and uses compaction to replace older active context with a structured summary and retained tail. The newer AgentHarness records admitted operations and unresolved effects for recovery, but its current implementation and external outcomes remain maturity- and version-sensitive.