Skip to main content

Module agent_cx

Module agent_cx 

Source
Expand description

Capability-scoped async context for Pi.

Pi builds on asupersync which provides a capability-based asupersync::Cx for cancellation, budgeting, and deterministic testing hooks. Historically this codebase has sometimes passed raw Cx instances around ad-hoc (or constructed them at call sites), which makes it harder to audit the intended capability boundary between subsystems.

AgentCx is a thin, explicit wrapper used at API boundaries (agent loop โ†” tools โ†” sessions โ†” RPC). It is intentionally small: it does not try to introduce a new runtime or replace asupersync::Cx; it just centralizes how Pi threads context through async code.

Structsยง

AgentCx
A capability-scoped context for agent operations.
AgentFs
Filesystem-related operations.
AgentHttp
HTTP-related operations.
AgentProcess
Process-related operations.
AgentTime
Time-related operations.