← All chapters

Memory and files

What an agent remembers, and what it has written down.

Memory

GET/trons/:id/memoriesThe memories of the tron by id, with who uses them and how, their size and the plan’s limit.
GET/trons/:id/memories/:memoryIdOne memory and what it holds: pages for a wiki, summary and recent messages for a buffer (?session_id=).
PUT/trons/:id/memories/:memoryId/files/<path>Writes one wiki page with the version it was read at: 409 if it changed meanwhile, 413 over the limit.
GET/trons/:id/memories/:memoryId/trashDeleted pages; POST …/trash/restore brings one back.
DELETE/trons/:id/memories/:memoryIdErases the CONTENTS, not the configuration.
GET/trons/:id/memories/:memoryId/documentsThe documents of a RAG memory. POST adds a note { title, text, format }; DELETE …/documents/:documentId removes one.
GET/trons/:id/memories/:memoryId/graphThe knowledge graph: ?entity=&depth=&kind=&q=. POST …/graph/rebuild, DELETE …/graph/relations/:relationId.
GET/v1/memories/:memoryId/documentsTron API (files:read). POST adds a note or a file in base64 (files:write); DELETE …/documents/:documentId removes one.

Libraries

GET/librariesYours, or a company's with ?org_id=, with the default preset and embedding model. POST creates one, PATCH /libraries/:id changes it.
POST/libraries/:id/documentsUploads documents (multipart). POST …/notes writes a note; …/documents/:docId/reindex reindexes one.
POST/libraries/:id/search{ query, k? }: the chunks found, with citation and why.
POST/libraries/:id/import/:sourceImports from Google Drive or Notion; …/import/:source/browse lists what can be imported. POST …/sync refreshes.
GET/libraries/:id/exportThe zip of the originals and library.json.
PUT/libraries/:id/editors{ user_ids }: the editors of a company library. Owners and admins only.
POST/trons/:id/nuclei/:nucleusId/context-filesContext files: multipart, into the agent's library (made if needed).
GET/v1/trons/:id/documentsTron API (files:read): the documents of the tron. POST /v1/trons/:id/context-files and POST /v1/libraries/:id/search (files:read) as above.

Files

GET/trons/:id/filesThe workspace, one folder per tron: { ok, path, entries: [{ name, path, is_dir, size, modified }] }. ?path= for a subfolder, &recursive=1 for everything under it. Read off the disk: it never wakes the tron.
GET/trons/:id/files/*The bytes. Needs the bearer token, so it cannot be an <img src>. ?preview=1 serves it inline.
POST/trons/:id/files-uploadmultipart/form-data, optional ?path=. Goes through the container, so the tron must have been deployed (409 tron_not_deployed otherwise).
POST/trons/:id/files-opRename and move: { op: "rename", path, to }. A new, empty folder: { op: "mkdir", path } — the folders in between are made too, an existing path is a 409, and a tron on a runtime older than 0.11.0 answers 409 runtime_update_needed (redeploy it).
DELETE/trons/:id/files/*Recursive on a folder, and there is no undo.