rag
List Documents
List the organization's documents, newest first. Use when showing the document library, or checking for an existing one before uploading. Changes nothing.
query Parameters
statusList Documents › Responses
Successful Response
byte_sizechunk_countcreated_aterrorfilenameidmedia_typeorg_idstatusWhere a document is between "uploaded" and "searchable".
failed is a state, not an exception (DECISIONS.md D7): a PDF that will
not parse stays in the library with a reason the client can read, because
they uploaded a file and a file that vanishes is worse than one that says
what went wrong.
updated_atUpload Document
Upload a document into the organization's library and start ingesting it. Use when adding a new document for an agent to ground on.
A filename the library already has is 409 unless replace is true; with
it, that document keeps its id (and every agent reading it) and takes the new
file, processed again from scratch.
The row is committed before the job is deferred, so a queue that refuses
leaves a document in pending with nothing coming for it. That is the
reingest route's case, and it is this way round deliberately: the reverse
would defer a job for a document that does not exist.
query Parameters
replaceUpload Document › Responses
Successful Response
byte_sizechunk_countcreated_aterrorfilenameidmedia_typeorg_idstatusWhere a document is between "uploaded" and "searchable".
failed is a state, not an exception (DECISIONS.md D7): a PDF that will
not parse stays in the library with a reason the client can read, because
they uploaded a file and a file that vanishes is worse than one that says
what went wrong.
updated_atSearch Documents
Search one agent's attached documents and return the passages that match. Use when a person, not a running conversation, wants to try what an agent's documents answer for a query — a running conversation retrieves through the built-in instead.
The live version's documents, because this is a person asking. A running
conversation asks the pinned version's instead, through the built-in.
Propagates agents.NotFound — a 404 — for an agent this organization cannot
see, raised by the binding rather than by this slice.
Search Documents › Request Body
agent_idquerylimitSearch Documents › Responses
Successful Response
contentdocument_idfilenameseqGet Document
Read one document's details and how far its ingestion has got. Use when checking a specific document's status by id. Changes nothing.
path Parameters
document_idGet Document › Responses
Successful Response
byte_sizechunk_countcreated_aterrorfilenameidmedia_typeorg_idstatusWhere a document is between "uploaded" and "searchable".
failed is a state, not an exception (DECISIONS.md D7): a PDF that will
not parse stays in the library with a reason the client can read, because
they uploaded a file and a file that vanishes is worse than one that says
what went wrong.
updated_atReingest Document
Run ingestion again for a document that failed or was never ingested. Use when a document is stuck in a failed or pending state and needs another attempt, without re-uploading the file.
path Parameters
document_idReingest Document › Responses
Successful Response
byte_sizechunk_countcreated_aterrorfilenameidmedia_typeorg_idstatusWhere a document is between "uploaded" and "searchable".
failed is a state, not an exception (DECISIONS.md D7): a PDF that will
not parse stays in the library with a reason the client can read, because
they uploaded a file and a file that vanishes is worse than one that says
what went wrong.
updated_at