Feature · Agent file storage
Prism Workspace gives an agent a directory of its own to keep its work in, in PHP, TypeScript and Python.
Every path is checked before it touches the disk, so a path the model wrote cannot read or write outside the workspace.
Capabilities
01
The same owner always resolves to the same directory, so a later request or a fresh worker finds the files an earlier run wrote.
const workspace = new Workspace('/srv/agent-workspaces', session);
await workspace.write('reports/q1.md', content);
const markdown = await workspace.read('reports/q1.md');02
Traversal, absolute and device paths, null and control characters, look-alike separators, percent-encoded dots, NTFS streams and reserved names are refused without touching the disk.
03
On local disks a second check resolves the real path and refuses one that leaves the workspace through a symbolic link or junction.
04
The escape corpus ships with the package: 134 hostile paths, each with the refusal code it must produce, written into a real workspace and checked for anything that got out.
05
Listing streams, so a directory of ten thousand files does not have to be loaded at once.
06
Authorization adds your own rule: whether this user or agent may do this operation here. In PHP it maps to Gate abilities. It is off by default.
How it fits
Workspace is a storage API for your application code. It does not register model tools and it never executes files; to let a model read or write files, define your own tools that call it.
PHP builds each workspace on a Laravel filesystem disk (local, S3 or any other Flysystem driver). TypeScript and Python have no runtime dependencies and work on the local filesystem. A Harness session can be the owner, so a resumed session finds its files again.
Install
particle-academy/prism-workspace PHP
@particle-academy/prism-workspace TypeScript
prism-ai-workspace Python
Related features
Durable agent sessions
Agent harness
Durable sessions, threads, modes, approvals and subagents with their own budgets, for agents that outlive a request.
Context recall
Memory
Store what was said and recall the records that bear on a new question, sized to the token budget you have.
Open-web automation
Guarded browser
Let an agent use a real browser within limits you set: hosts, actions, and how much of a page it may read.