Documents are containers for retained content. Every piece of content you retain is associated with a document — either one you name with aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/vectorize-io/hindsight/llms.txt
Use this file to discover all available pages before exploring further.
document_id or one Hindsight creates automatically with a random UUID. Documents give you traceability (knowing which source a memory came from), update semantics (re-retaining with the same document_id replaces the old content), and bulk deletion (removing a document removes all memories extracted from it).
When you retain content, Hindsight also stores the original text chunks that were used for fact extraction. These chunks are available on demand when you need the raw source text alongside the extracted facts.
Retain with a document ID
Associate retained content with a stable document ID by includingdocument_id in your retain request. Hindsight upserts the document — if a document with that ID already exists, it and all its memories are deleted before the new content is processed.
Get a document
Response fields
The document ID.
The memory bank this document belongs to.
The full original text retained into this document.
Hash of the content, used for delta retain to detect unchanged chunks.
Total number of memory facts extracted from this document.
Breakdown of extracted facts by type.
Tags attached to this document.
ISO 8601 creation timestamp.
ISO 8601 last-updated timestamp.
Example
List documents
Query parameters
Case-insensitive substring match on document ID.
"report" matches "report-2024", "annual-report", and so on.Filter by document tags. Accepts multiple values.
How to match tags.
| Mode | Behaviour |
|---|---|
any_strict (default) | Document must have at least one of the specified tags. Untagged docs excluded. |
any | Same as any_strict but includes untagged documents. |
all_strict | Document must have all specified tags. Untagged docs excluded. |
all | Same as all_strict but includes untagged documents. |
Maximum number of documents to return.
Pagination offset.
Example
Update a document
tags.
New tags for the document. Replaces the existing tags entirely. Pass an empty list to remove all tags.
When tags change, any consolidated observations derived from the document’s memories are invalidated and queued for re-consolidation under the new tags.
Example
Delete a document
Example
Upload files
Example
Uploaded files are stored server-side. Configure storage via
HINDSIGHT_API_FILE_STORAGE_TYPE — defaults to PostgreSQL, with S3, GCS, and Azure Blob Storage available for production.