Create and manage projects
Deleting a project does not delete its conversations or source media.
Project summaries include counts, update times, and cover media.
See AgentProjectSummary for every field.
Manage conversations
Attach media and collections
assetId or its library assetRecordId. Library mutations use assetRecordId.
SDK artifact IDs cannot identify project attachments or library assets.
Use projects.assets.detach(projectId, assetId) or projects.collections.detach(projectId, collectionId) to remove an association.
Detaching does not delete the source asset or collection.
The resources response contains attachedMedia, collections, characters, smartEntities, and generatedMedia.
Attached media has typed identity and display fields.
The other arrays contain JSON records with product-specific fields.
Check each record before reading fields outside the declared type.
Attach a document
Upload and attach a file in one call. The server extracts PDF, DOCX, and text content. This example uses the globalFile constructor available in the quickstart’s Node.js environment.
documents.list(projectId) to check its status.
To attach a file already in fal storage, use documents.import:
documents.import to retry with its URL when available.
Supply extracted text
Usedocuments.attach(projectId, input) when you already have extracted text, including text from your own OCR process.
A project supports up to 50 documents. Each file can be at most 25 MiB.
The text can contain at most 260,000 characters. The filename contains 1–256 characters and cannot contain a null character.
pageCount is a nonnegative integer when supplied.
Accepted MIME types are application/pdf, application/vnd.openxmlformats-officedocument.wordprocessingml.document, text/plain, text/markdown, text/csv, text/tab-separated-values, and application/json.
Use assetId for subsequent document operations.
status and error in subsequent list results until processing completes.
Document states include pending, processing, ready, failed, and no_text. Treat unrecognized states as nonfinal.
A no_text document has no usable extracted text. Supply extracted text from a supported extraction method.
Use projects.documents.retry(projectId, assetId) to retry failed processing.
Use projects.documents.remove(projectId, assetId) to remove the document.
Maintain project memory
kind is decision, fact, preference, style, or entity.
Its content contains 1–500 characters after trimming.
A create result contains id and supersededId.
A non-null supersededId identifies the note that the new note replaced.
projects.memory.retrieve(projectId) returns the primer, primerUpdatedAt, and active notes.
Each note contains its ID, kind, content, pinned state, source conversation ID, and creation time.
A missing primer, source conversation, or note kind can be null.
status: "deleted" to delete a note. Set status: "active" to restore it.
Keep its ID if your application supports undo.
Handle errors
A missing or inaccessible resource returns404. An expired conversation or run can return 410.
Read the affected project resource after an uncertain write.
Project methods accept optional signal and timeoutMs options as their final argument.
See the method reference for every argument and return type.