Feature · Durable agent sessions
Durable agent sessions for PHP, TypeScript and Python: threads, reconstructed session state, persisted provider, model and mode selection, exclusive locking and human approvals.
A bounded agent runtime runs nested subagents that carry their own budgets. Use it for agents that need persistent conversations, configurable modes, tool execution and approvals across requests.
Capabilities
01
A session is one participant's live runtime: the active mode, provider and model, and the thread it is bound to. It is resolved from the store on every request, so any worker can continue it.
02
A thread is a stored conversation, addressed by participant and scope. Each run records the resulting exchange, including tool calls, tool results and approval decisions.
$result = $session->send('Help with my order');
echo $result->text();
$result->awaitingApproval(); // true when a tool is waiting for a person03
A mode defines the instructions, tools, approvals and limits for a run: a system prompt, a tool allowlist, approvals, skills, subagents and a step limit.
04
A mode names the tools a person must approve. A turn that calls one stops and returns its pending approvals; unanswered approvals are denied, never run.
05
A subagent is a nested run the parent calls like a tool. It runs in its own mode and session, with authority it was given rather than inherited, on a budget drawn from the parent's.
06
Threads, pending approvals and task lists live in the durable store, so another worker can continue a task list after a crash, a restart or a deploy. A store that reports itself as volatile is refused for durable state.
How it fits
The PHP Harness builds on Prism core; in TypeScript and Python the runtime calls a model client you supply once per step. For individual model requests without session state, use Prism core directly.
A Harness session has a key, so it can own a Workspace, a Browser attachment or a Human+ attachment. PHP integrates with Laravel; TypeScript and Python run independently of any framework.
Install
particle-academy/prism-harness PHP
@particle-academy/prism-harness TypeScript
prism-ai-harness Python
Next
Related features
Context recall
Memory
Store what was said and recall the records that bear on a new question, sized to the token budget you have.
Agent file storage
Workspace
A directory of its own for an agent, where every path is checked before it touches the disk.
Agents in shared surfaces
Human+
An agent joins a live Fancy surface as a named participant, and confirmation stays with the human.