pagentv4
pagentv4 is the newer typed API in this repository.
Use these pages if you want:
Providerinstead ofLLMMessage/Messagesinstead ofSessionRunnerfor thread-based orchestration, persistence, and sandbox workspaces- A sandbox (companion computer) with file and command tools
- Optional Thread and Skill support for long-lived REPL-style apps
Module layout
text
core/ AgentCore, Message, Provider, Tool, Event
ithread/ IThread Protocol + ThreadSpec
runtime/ loop_core, LoopAdapter, BaseRunner, Runner, VanillaRunner, Thread
conversation/ ConversationStore implementations used through Thread
sandbox/ Backend, Sandbox, built-in file/command tools
tools/ reusable tool functions
adapters/ ACP encode/decode
skills/ SKILL.md discovery and on-demand loadingThere are several layers inside runtime/:
loop_coredefines the shared run / turn / tool loop semanticsLoopAdaptercarries the shared loop skeleton, and each runner layers on capabilities:VanillaRunner(LoopAdapter)— minimal in-memory environmentBaseRunner(LoopAdapter)— adds thread, conversation store, sandbox, skillsRunner(BaseRunner)— adds inbound control (steer/cancel/permit) and tool hooks
Pages
Status
New work should use pagentv4 and app (terminal REPL). The top-level pagent package still documents the older Session + LLM API for now.