How to Use Pi Without Losing the Plot

The opening question was whether a coding agent becomes more useful when its core does less pretending. Pi Agent Harness gives a qualified yes: its visible seams let users change models, workflows, continuity, interfaces, and deployment without rewriting the central control loop. This final synthesis reconnects those seams and turns them into a practical judgment. The reader should leave able to place a requirement in the right Pi layer, state the boundary that comes with the choice, and avoid inferring guarantees the source does not make.

Pi is easiest to misunderstand in two opposite ways. It can look like only a terminal command, so the reader misses the agent runtime, provider layer, session model, and host interfaces. Or it can look like a complete platform whose extensions, sessions, and remote services automatically solve every operational problem. The repository supports neither simplification. It presents a layered harness whose value depends on keeping ownership clear.

The seams are the operating model

The most important architectural fact is not that Pi has many packages. It is that each package answers a different question about a model-driven coding task. The agent core coordinates a turn: it holds an extensible message state, projects context for a provider, streams an assistant response, validates tool calls, runs effects, and emits lifecycle events. The coding-agent layer turns that mechanism into a usable local session with resources, built-in tools, persistence, compaction, and run-mode bindings.

The provider layer answers how a request reaches a model. pi-ai routes through a provider that owns its catalog, authentication, and stream behavior, while model metadata retains capabilities and limits that affect request formation. A model switch can therefore preserve the general turn sequence while changing message serialization, reasoning controls, credentials, cache behavior, or cost accounting. Portability is not the disappearance of differences; it is the ability to carry a common request across differences that remain named and inspectable.

The workflow layer answers what the model can ask for and under what policy. A tool is a callable effect with a schema. A hook can block or reshape a call. A skill, prompt template, or context file can change what the model is told. A renderer can change what a person sees. A package can distribute those choices. Because those jobs have separate timing and ownership, a project can add a protected-path rule without altering provider serialization, or add a local search capability without modifying the session engine.

The continuity layer answers how work remains coherent after one turn. The established coding-agent session keeps a tree of entries, moves an active leaf among alternatives, and projects that path into the next provider context. Compaction reduces that projection while preserving the underlying record. The newer durable AgentHarness answers a harder question: what operation was admitted, what process-owned effect is unresolved, and how can a later driver recover without treating a partial response as proof of completion?

Finally, the host boundary answers where the effects and policies live. TUI, SDK, JSON, and RPC expose related machinery to different callers. Chord can compose service facets and replicated state across worker and presentation environments. The experimental protocol can route opaque strict-JSON payloads, but it does not provide peer authentication or business semantics. Security containment, credential scope, network policy, and telemetry export remain application or deployment choices.

That is why the seams are the primary value rather than incidental modularity. Modularity merely says that code is split. A seam says what crosses the split and who owns the decision on either side. In Pi, the agent core does not need to understand every provider wire format. The provider does not need to own a repository's workflow policy. A session record does not need to become a raw prompt. A transport does not need to understand the meaning of a transcript snapshot. Those constraints make replacement possible without making the system conceptually shapeless.

The same design also explains the cost. A built-in feature can hide a policy choice by making one workflow the default. Pi exposes the choice instead. The user or host must decide whether a model is available, whether a tool is appropriate, whether a summary retains enough context, whether a package is trusted, whether a remote operation can be replayed, whether a mounted directory is safe, and which telemetry fields may leave the process. The core is smaller because the surrounding decisions are more explicit.

Match the need to its owner

The following map is more useful than a feature inventory because it starts with the change a person wants to make.

If the need is simply to run a coding task, start with the coding-agent CLI and its AgentSession orchestration. It supplies the ordinary local workflow: a model, selected tools, a resource loader, a session, and a presentation mode. This is the shortest path from a project directory to a useful turn. Its boundary is also the most permissive by default: built-in tools and extensions operate with the permissions of the Pi process, and the workspace may be modified directly. The CLI solves interaction and orchestration, not containment.

If the need is to change the model or provider, use the model runtime and pi-ai provider surface rather than editing the agent loop. A built-in provider can use stored or ambient credentials. A custom model can point at a local server or proxy that speaks a supported API. Model metadata should describe reasoning, input types, context and output limits, cost, sampling, and compatibility. The trade-off is that a model choice carries more than a label.