Related guides
Endpoints
Next steps
- API overview: base URLs, authentication, and pagination
- Errors: status codes and the error format
- Editions: which endpoints each edition serves
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Read, search, edit, and restore a hosted agent’s memory files with the OneCLI API. Every change keeps a revision history.
| Endpoint | Method and path | What it does |
|---|---|---|
| List or search an agent’s memories | GET /agents/{agentId}/memories | List every memory a hosted agent keeps, or run a full-text search and get ranked hits with a snippet each. |
| Create a memory | POST /agents/{agentId}/memories | Add a memory file to a hosted agent so it starts every future conversation with that knowledge. |
| Get a memory | GET /agents/{agentId}/memories/{memoryId} | Fetch one of a hosted agent’s memories with its full content, title, and description. |
| Update a memory | PATCH /agents/{agentId}/memories/{memoryId} | Edit a hosted agent’s memory content, title, or description. |
| Delete a memory | DELETE /agents/{agentId}/memories/{memoryId} | Permanently delete a hosted agent’s memory and its whole revision history. |
| List a memory’s revisions | GET /agents/{agentId}/memories/{memoryId}/revisions | List a memory’s revision history, newest first, to see how the agent’s knowledge changed over time. |
| Get a revision | GET /agents/{agentId}/memories/{memoryId}/revisions/{revisionId} | Fetch one past revision of a hosted agent’s memory with its full content. |
| Restore a revision | POST /agents/{agentId}/memories/{memoryId}/revisions/{revisionId}/restore | Roll a hosted agent’s memory back to an earlier revision. |
| Redact a revision | POST /agents/{agentId}/memories/{memoryId}/revisions/{revisionId}/redact | Scrub the content of an old memory revision in place, for example after someone pasted a secret into the agent’s memory. |