Agent Files — /api/agent/files*
The agent's workspace. Backs the Files tab in the Workbench and the agent's tool-callable read_file / write_file operations. Every write emits a row on the machine's entangled state, so file history is tamper-evident.
Concept: Pulse Workbench · Agents.
Source: shared/api-core/src/routes/agentFiles.ts.
Endpoints
| Method | Path | Auth | Notes |
|---|---|---|---|
GET | /api/agent/files/list | ZID-bound | List files. Query: agentZid, optional role (skill | plan | build | note …). |
GET | /api/agent/files/read | ZID-bound | Read one file. Query: agentZid, path. |
GET | /api/agent/files/history | ZID-bound | Version history for a path. Query: agentZid, path. |
POST | /api/agent/files/write | ZID-bound | Write a file. Body: { agentZid, path, role, content }. |
ZID-bound = authenticated via authenticateZeqAuth; the caller must be the agent's ZID or the owner of its machine. The machine's zsm_ admin key also authenticates when no session is alive.