Download OpenAPI specification:Download
HTTP API for Hindsight
Readiness check: verifies the API can reach the database. Alias of /health/ready. Use /health/live for liveness probes — this one fails whenever the database is unreachable, which must gate traffic, not restart the process.
nullReturns 200 whenever the process can serve a request. Performs no database access, so a slow or unreachable database never restarts the pod. Point livenessProbe here and readinessProbe at /health.
| status required | string (Status) Always "alive" — reaching this handler is the check Value: "alive" |
| version required | string (Version) Hindsight version this process is running |
| uptime_seconds required | number (Uptime Seconds) Seconds since the process started |
{- "status": "alive",
- "uptime_seconds": 812.4,
- "version": "0.4.0"
}Returns API version information and enabled feature flags. Use this to check which capabilities are available in this deployment.
| api_version required | string (Api Version) API version string |
required | object (FeaturesInfo) Enabled feature flags |
{- "api_version": "0.9.0",
- "features": {
- "audit_log": false,
- "bank_config_api": false,
- "bank_llm_health": true,
- "document_export_api": true,
- "document_import_api": true,
- "file_upload_api": true,
- "llm_trace": false,
- "mcp": true,
- "observations": false,
- "store_document_text": true,
- "worker": true
}
}Retrieve graph data for visualization, optionally filtered by type (world/experience/observation).
| bank_id required | string (Bank Id) |
Type (string) or Type (null) (Type) | |
| limit | integer (Limit) >= 0 Default: 1000 |
Q (string) or Q (null) (Q) | |
Array of Tags (strings) or Tags (null) (Tags) | |
| tags_match | string (Tags Match) Default: "all_strict" |
Document Id (string) or Document Id (null) (Document Id) | |
Chunk Id (string) or Chunk Id (null) (Chunk Id) |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Nodes) |
required | Array of objects (Edges) |
required | Array of objects (Table Rows) |
| total_units required | integer (Total Units) |
| limit required | integer (Limit) |
{- "edges": [
- {
- "data": {
- "id": "1-2-semantic",
- "linkType": "semantic",
- "source": "1",
- "target": "2",
- "weight": 0.8
}
}
], - "limit": 1000,
- "nodes": [
- {
- "data": {
- "id": "1",
- "label": "Alice works at Google",
- "text": "Alice works at Google"
}
}, - {
- "data": {
- "id": "2",
- "label": "Bob went hiking",
- "text": "Bob went hiking"
}
}
], - "table_rows": [
- {
- "context": "Work info",
- "date": "2024-01-15 10:30",
- "entities": "Alice (PERSON), Google (ORGANIZATION)",
- "id": "abc12345...",
- "text": "Alice works at Google"
}
], - "total_units": 2
}List memory units with pagination and optional full-text search. Supports filtering by type, source document, and linked entity ID. Results are sorted by most recent first (mentioned_at DESC, then created_at DESC).
| bank_id required | string (Bank Id) |
Type (string) or Type (null) (Type) | |
Q (string) or Q (null) (Q) | |
Consolidation State (string) or Consolidation State (null) (Consolidation State) | |
State (string) or State (null) (State) | |
Document Id (string) or Document Id (null) (Document Id) | |
Entity Id (string) or Entity Id (null) (Entity Id) | |
Array of Tags (strings) or Tags (null) (Tags) | |
| tags_match | string (Tags Match) Default: "any" Enum: "any" "all" "any_strict" "all_strict" "exact" |
| limit | integer (Limit) >= 0 Default: 100 |
| offset | integer (Offset) >= 0 Default: 0 |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
| total required | integer (Total) |
| limit required | integer (Limit) |
| offset required | integer (Offset) |
{- "items": [
- {
- "context": "Work conversation",
- "date": "2024-01-15T10:30:00Z",
- "entities": "Alice, Google",
- "fact_type": "world",
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "metadata": {
- "channel": "engineering",
- "source": "slack"
}, - "state": "valid",
- "tags": [
- "user:alice"
], - "text": "Alice works at Google on the AI team"
}
], - "limit": 100,
- "offset": 0,
- "total": 150
}Preview what the retain step would extract from text WITHOUT changing the bank — no entity resolution, links, embeddings, or persistence. Returns the candidate facts and the LLM token usage. Every prompt-affecting setting (retain mission, extraction mode, chunk size, …) is overridable in the body to A/B a candidate config against the bank's current one. This is a read-only tool: nothing is stored.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| content required | string (Content) Text to extract facts from (e.g. a document or a single chunk). |
| context | string (Context) Default: "" Optional context about the content. |
Timestamp (string) or Timestamp (null) (Timestamp) Reference timestamp for resolving relative times (ISO 8601). | |
Agent Name (string) or Agent Name (null) (Agent Name) Deprecated Deprecated: describe the speaker in | |
Strategy (string) or Strategy (null) (Strategy) Name of a retain strategy to extract under (a key of the bank's | |
Retain Mission (string) or Retain Mission (null) (Retain Mission) | |
Retain Extraction Mode (string) or Retain Extraction Mode (null) (Retain Extraction Mode) | |
Retain Custom Instructions (string) or Retain Custom Instructions (null) (Retain Custom Instructions) | |
Retain Extract Causal Links (boolean) or Retain Extract Causal Links (null) (Retain Extract Causal Links) | |
Retain Chunk Size (integer) or Retain Chunk Size (null) (Retain Chunk Size) | |
Array of Entity Labels (objects) or Entity Labels (null) (Entity Labels) Controlled vocabulary for entity labels (overrides the bank's config for this call) | |
Entities Allow Free Form (boolean) or Entities Allow Free Form (null) (Entities Allow Free Form) | |
Llm Output Language (string) or Llm Output Language (null) (Llm Output Language) |
Array of objects (Facts) Candidate facts the retain step would extract. | |
Array of objects (Chunks) The chunks the input was cut into before extraction. Already computed on every path; returned because | |
object (TokenUsage) Aggregated token usage across the extraction LLM calls. |
{- "content": "string",
- "context": "",
- "timestamp": "2019-08-24T14:15:22Z",
- "agent_name": "string",
- "strategy": "string",
- "retain_mission": "string",
- "retain_extraction_mode": "string",
- "retain_custom_instructions": "string",
- "retain_extract_causal_links": true,
- "retain_chunk_size": 0,
- "entity_labels": [
- {
- "key": "string",
- "description": "",
- "type": "value",
- "optional": true,
- "tag": false,
- "values": [ ],
- "fields": { }
}
], - "entities_allow_free_form": true,
- "llm_output_language": "string"
}{- "facts": [
- {
- "text": "string",
- "fact_type": "string",
- "occurred_start": "string",
- "occurred_end": "string",
- "entities": [
- "string"
], - "chunk_index": 0
}
], - "chunks": [
- {
- "text": "string",
- "fact_count": 0
}
], - "usage": {
- "input_tokens": 1500,
- "output_tokens": 500,
- "total_tokens": 2000
}
}Get a single memory unit by ID with all its metadata including entities and tags. Note: the 'history' field is deprecated and always returns an empty list - use GET /memories/{memory_id}/history instead.
| bank_id required | string (Bank Id) |
| memory_id required | string (Memory Id) |
Authorization (string) or Authorization (null) (Authorization) |
nullEdit a memory's text and/or change its curation state (invalidate / revert). Invalidated memories are excluded from recall, consolidation, and graph maintenance but kept for audit (reversible). Only world/experience facts can be curated; observations are derived.
| bank_id required | string (Bank Id) |
| memory_id required | string (Memory Id) |
Authorization (string) or Authorization (null) (Authorization) |
Text (string) or Text (null) (Text) New fact text. Re-embeds the memory, drops its derived observations and links, and triggers re-consolidation. | |
Context (string) or Context (null) (Context) New context for the fact. '' clears it; omit to leave unchanged. | |
Occurred Start (string) or Occurred Start (null) (Occurred Start) New occurred-range start (ISO 8601). '' clears it; omit to leave unchanged. | |
Occurred End (string) or Occurred End (null) (Occurred End) New occurred-range end (ISO 8601). '' clears it; omit to leave unchanged. | |
Fact Type (string) or Fact Type (null) (Fact Type) Reclassify the fact: 'world' or 'experience'. Omit to leave unchanged. | |
Array of Entities (strings) or Entities (null) (Entities) Replace the fact's entities. How each name is matched to an entity is governed by 'resolve_entities'. '[]' detaches all entities. Omit to leave unchanged. | |
| resolve_entities | boolean (Resolve Entities) Default: true Whether the names in 'entities' are resolved against the entities already in the bank. True (default) is what retain does: a similar existing entity is reused when it scores above the match threshold, so a name close to one already in the bank may resolve to that one instead of the one you wrote. False takes the names literally — an existing entity is reused only on a case-insensitive name match, any other name creates a new entity, and names in the same request are never merged with each other. Use False for hand-authored corrections, where the name you sent is the answer rather than a guess. Ignored when 'entities' is omitted. |
State (string) or State (null) (State) Curation state: 'invalidated' to soft-retire the memory (excluded from recall/consolidation, links and derived observations pruned, moved to the archive) or 'valid' to revert. Reversible. | |
Reason (string) or Reason (null) (Reason) Optional free-text reason recorded when invalidating. |
{- "reason": "superseded: server decommissioned 2026-06-01",
- "state": "invalidated"
}nullGet the full history of an observation, with each change's source facts resolved to their text.
| bank_id required | string (Bank Id) |
| memory_id required | string (Memory Id) |
Authorization (string) or Authorization (null) (Authorization) |
nullRecall memory using semantic similarity and spreading activation.
The types parameter is optional and may contain any of:
world: General knowledge about people, places, events, and things that happenexperience: Memories about experience, conversations, actions taken, and tasks performedobservation: Consolidated knowledge synthesized from factsIf types is omitted, all fact types are recalled.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| query required | string (Query) |
Array of Types (strings) or Types (null) (Types) List of fact types to recall: 'world', 'experience', 'observation'. Defaults to all fact types if not specified. | |
| prefer_observations | boolean (Prefer Observations) Default: false When recalling raw facts ('world'/'experience') together with 'observation', drop any raw fact that an observation in the results was consolidated from, so the observation supersedes it and you don't get duplicate content. The freed slots are backfilled with the next results, keeping the result count at the requested budget. Disabled by default; set to true to enable. No effect unless 'observation' and at least one raw type are both requested. |
| budget | string (Budget) Default: "mid" Enum: "low" "mid" "high" Budget levels for recall/reflect operations. |
| max_tokens | integer (Max Tokens) Default: 4096 |
| trace | boolean (Trace) Default: false |
Query Timestamp (string) or Query Timestamp (null) (Query Timestamp) ISO format date string (e.g., '2023-05-30T23:40:00'). Used as the query-time anchor for relative temporal expressions and recency scoring. | |
object (IncludeOptions) Default: {} Options for including additional data (entities are included by default) | |
Array of Tags (strings) or Tags (null) (Tags) Filter memories by tags. If not specified, all memories are returned. Omitting tags (or passing []) together with tags_match='exact' filters to untagged/global observations only (the scope written by observation_scopes='shared'). | |
| tags_match | string (Tags Match) Default: "any" Enum: "any" "all" "any_strict" "all_strict" "exact" How to match tags: 'any' (OR, includes untagged), 'all' (AND, includes untagged), 'any_strict' (OR, excludes untagged), 'all_strict' (AND, excludes untagged), 'exact' (set-equality on the full scope, excludes untagged). With 'exact' and no tags (or []), the empty global scope is selected and only untagged memories match. |
(Array of Tag Groups (TagGroupLeaf (object) or TagGroupAnd (object) or TagGroupOr (object) or TagGroupNot (object))) or Tag Groups (null) (Tag Groups) Compound tag filter using boolean groups. Groups in the list are AND-ed. Each group is a leaf {tags, match} or compound {and: [...]}, {or: [...]}, {not: ...}. A leaf may set resolve='fuzzy' to match its tags against the bank's tags by trigram similarity instead of literally, so a query that says 'typsecript' still reaches memories tagged 'typescript'. | |
MinScores (object) or null Optional per-stage score floors, each inclusive ( | |
TemporalWindow (object) or null Window for the temporal retrieval arm, supplied instead of extracting dates from |
required | Array of objects (Results) |
Trace (object) or Trace (null) (Trace) | |
Entities (object) or Entities (null) (Entities) Entity states for entities mentioned in results | |
Chunks (object) or Chunks (null) (Chunks) Chunks for facts, keyed by chunk_id | |
Source Facts (object) or Source Facts (null) (Source Facts) Source facts for observation-type results, keyed by fact ID | |
Source Facts Truncated (boolean) or Source Facts Truncated (null) (Source Facts Truncated) Whether the source_facts map was cut short by the token budget. When true, some IDs in results[].source_fact_ids have no entry in source_facts — the budget ran out, the references are not dangling. Only set when source facts were requested. |
{- "budget": "mid",
- "include": {
- "entities": {
- "max_tokens": 500
}
}, - "max_tokens": 4096,
- "query": "What did Alice say about machine learning?",
- "query_timestamp": "2023-05-30T23:40:00",
- "tags": [
- "user_a"
], - "tags_match": "any",
- "temporal_window": {
- "end": "2023-06-30T23:59:59Z",
- "start": "2023-04-01T00:00:00Z"
}, - "trace": true,
- "types": [
- "world",
- "experience"
]
}{- "chunks": {
- "456e7890-e12b-34d5-a678-901234567890": {
- "chunk_index": 0,
- "id": "456e7890-e12b-34d5-a678-901234567890",
- "text": "Alice works at Google on the AI team. She's been there for 3 years..."
}
}, - "entities": {
- "Alice": {
- "canonical_name": "Alice",
- "entity_id": "123e4567-e89b-12d3-a456-426614174001",
- "observations": [
- {
- "mentioned_at": "2024-01-15T10:30:00Z",
- "text": "Alice works at Google on the AI team"
}
]
}
}, - "results": [
- {
- "chunk_id": "456e7890-e12b-34d5-a678-901234567890",
- "context": "work info",
- "entities": [
- "Alice",
- "Google"
], - "id": "123e4567-e89b-12d3-a456-426614174000",
- "occurred_end": "2024-01-15T10:30:00Z",
- "occurred_start": "2024-01-15T10:30:00Z",
- "text": "Alice works at Google on the AI team",
- "type": "world"
}
], - "trace": {
- "num_results": 1,
- "query": "What did Alice say about machine learning?",
- "time_seconds": 0.123
}
}Reflect and formulate an answer using bank identity, world facts, observations, and mental models.
This endpoint:
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| query required | string (Query) |
| budget | string (Budget) Default: "low" Enum: "low" "mid" "high" Budget levels for recall/reflect operations. |
Context (string) or Context (null) (Context) Deprecated DEPRECATED: Additional context is now concatenated with the query. Pass context directly in the query field instead. If provided, it will be appended to the query for backward compatibility. | |
| max_tokens | integer (Max Tokens) Default: 4096 Maximum tokens for the response |
object (ReflectIncludeOptions) Options for including additional data (disabled by default) | |
Response Schema (object) or Response Schema (null) (Response Schema) Optional JSON Schema for structured output. When provided, the response will include a 'structured_output' field with the LLM response parsed according to this schema. | |
Array of Tags (strings) or Tags (null) (Tags) Scope raw facts, observations, mental models, and tagged directives during reflection. With no tags, memory retrieval is unfiltered while only untagged/global directives are loaded. Use tags=[] with tags_match='exact' to select the untagged/global scope. | |
| tags_match | string (Tags Match) Default: "any" Enum: "any" "all" "any_strict" "all_strict" "exact" How to match tags: 'any' (OR, includes untagged), 'all' (AND, includes untagged), 'any_strict' (OR, excludes untagged), 'all_strict' (AND, excludes untagged), or 'exact' (set equality). Untagged directives remain global in every mode. |
(Array of Tag Groups (TagGroupLeaf (object) or TagGroupAnd (object) or TagGroupOr (object) or TagGroupNot (object))) or Tag Groups (null) (Tag Groups) Compound tag filter using boolean groups. Groups in the list are AND-ed. Each group is a leaf {tags, match} or compound {and: [...]}, {or: [...]}, {not: ...}. Mutually exclusive with tags. A leaf may set resolve='fuzzy' to match its tags against the bank's tags by trigram similarity instead of literally, so a query that says 'typsecript' still reaches memories tagged 'typescript'. | |
| apply_all_directives | boolean (Apply All Directives) Default: false Apply every active directive regardless of tags. By default directives are scoped like memories: untagged directives always apply, and tagged directives apply only when the request's tags match them. Set true to apply all active directives, ignoring tag scope. |
Array of Fact Types (strings) or Fact Types (null) (Fact Types) Filter which fact types are retrieved during reflect. None means all types (world, experience, observation). | |
| exclude_mental_models | boolean (Exclude Mental Models) Default: false If true, exclude all mental models from the reflect loop (skip search_mental_models tool). |
Array of Exclude Mental Model Ids (strings) or Exclude Mental Model Ids (null) (Exclude Mental Model Ids) Exclude specific mental models by ID from the reflect loop. |
| text required | string (Text) The reflect response as well-formatted markdown (headers, lists, bold/italic, code blocks, etc.) |
ReflectBasedOn (object) or null Evidence used to generate the response. Only present when include.facts is set. | |
Structured Output (object) or Structured Output (null) (Structured Output) Structured output parsed according to the request's response_schema. Only present when response_schema was provided in the request. | |
Structured Output Error (string) or Structured Output Error (null) (Structured Output Error) Why structured output could not be produced. Present only when a response_schema was given and the extraction call failed (provider error, timeout, unparseable output). A missing structured_output without this field means the answer held nothing matching the schema — the reflect itself still succeeded either way. | |
TokenUsage (object) or null Token usage metrics for LLM calls during reflection. | |
ReflectTrace (object) or null Execution trace of tool and LLM calls. Only present when include.tool_calls is set. |
{- "budget": "low",
- "include": {
- "facts": { }
}, - "max_tokens": 4096,
- "query": "What do you think about artificial intelligence?",
- "response_schema": {
- "properties": {
- "summary": {
- "type": "string"
}, - "key_points": {
- "items": {
- "type": "string"
}, - "type": "array"
}
}, - "required": [
- "summary",
- "key_points"
], - "type": "object"
}, - "tags": [
- "user_a"
], - "tags_match": "any"
}{- "based_on": {
- "memories": [
- {
- "id": "123",
- "text": "AI is used in healthcare",
- "type": "world"
}, - {
- "id": "456",
- "text": "I discussed AI applications last week",
- "type": "experience"
}
]
}, - "structured_output": {
- "key_points": [
- "Used in healthcare",
- "Discussed recently"
], - "summary": "AI is transformative"
}, - "text": "## AI Overview\n\nBased on my understanding, AI is a **transformative technology**:\n\n- Used extensively in healthcare\n- Discussed in recent conversations\n- Continues to evolve rapidly",
- "trace": {
- "llm_calls": [
- {
- "duration_ms": 1200,
- "scope": "agent_1"
}
], - "observations": [
- {
- "id": "obs-1",
- "name": "AI Technology",
- "subtype": "structural",
- "type": "concept"
}
], - "tool_calls": [
- {
- "duration_ms": 150,
- "input": {
- "query": "AI"
}, - "tool": "recall"
}
]
}, - "usage": {
- "input_tokens": 1500,
- "output_tokens": 500,
- "total_tokens": 2000
}
}Serve the bytes of an attachment retained as inline content. The id is the one inside a placeholder token, and is returned on attachments[].url by recall and by the document/chunk/memory reads — so an agent can show or reason over the original behind an attachment-derived fact.
Bytes are served with the Content-Type the caller declared at retain. Access is authorized against the bank; a missing attachment and an invisible bank both return 404, so the endpoint cannot be used to probe what a bank holds.
| bank_id required | string (Bank Id) |
| attachment_id required | string (Attachment Id) |
Authorization (string) or Authorization (null) (Authorization) |
nullEnumerate the distinct scopes across a bank's observations. Each observation lives under a scope: the exact set of tags it was consolidated with. Returns every distinct scope (tag order normalized) with the number of observations in it; the empty tag list is the global/untagged scope. Use a returned scope with the graph endpoint (tags=total reports every distinct scope in the bank.
| bank_id required | string (Bank Id) |
| limit | integer (Limit) [ 0 .. 1000 ] Default: 100 Maximum number of scopes to return |
| offset | integer (Offset) >= 0 Default: 0 Offset for pagination |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Scopes) Distinct observation scopes, most populous first |
| total required | integer (Total) Total number of distinct scopes in the bank (ignores limit/offset) |
| limit required | integer (Limit) Maximum number of scopes returned in this page |
| offset required | integer (Offset) Offset this page started at |
{- "limit": 100,
- "offset": 0,
- "scopes": [
- {
- "count": 12,
- "tags": [
- "user:alice"
]
}, - {
- "count": 4,
- "tags": [
- "user:alice",
- "project:apollo"
]
}, - {
- "count": 2,
- "tags": [ ]
}
], - "total": 3
}Delete all observations derived from a specific memory and reset it for re-consolidation. The memory itself is not deleted. A consolidation job is triggered automatically so the memory will produce fresh observations on the next consolidation run.
| bank_id required | string (Bank Id) |
| memory_id required | string (Memory Id) |
Authorization (string) or Authorization (null) (Authorization) |
| deleted_count required | integer (Deleted Count) |
{- "deleted_count": 3
}Retain memory items with automatic fact extraction.
This is the main endpoint for storing memories. It supports both synchronous and asynchronous processing via the async parameter.
Features:
The system automatically:
When async=true: Returns immediately after queuing. Use the operations endpoint to monitor progress.
When async=false (default): Waits for processing to complete.
Note: If a memory item has a document_id that already exists, the old document and its memory units will be deleted before creating new ones (upsert behavior).
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
| async | boolean (Async) Default: false If true, process asynchronously in background. If false, wait for completion (default: false) |
Array of Document Tags (strings) or Document Tags (null) (Document Tags) Deprecated Deprecated. Use item-level tags instead. | |
Operation Id (string) or Operation Id (null) (Operation Id) Optional client-supplied UUID used as the identity of an async retain operation. Re-submitting with the same operation_id returns the original operation and creates no new work, so retrying after a lost or timed-out acknowledgement will not enqueue a duplicate. Reusing an id that belongs to a different operation returns HTTP 409. Ignored for synchronous retain. |
| success required | boolean (Success) |
| bank_id required | string (Bank Id) |
| items_count required | integer (Items Count) |
| async required | boolean (Async) Whether the operation was processed asynchronously |
Operation Id (string) or Operation Id (null) (Operation Id) Operation ID for tracking async operations. Use GET /v1/default/banks/{bank_id}/operations to list operations. Only present when async=true. When items use different per-item strategies, use operation_ids instead. | |
Array of Operation Ids (strings) or Operation Ids (null) (Operation Ids) Operation IDs when items were submitted as multiple strategy groups (async=true with mixed per-item strategies). operation_id is set to the first entry for backward compatibility. | |
TokenUsage (object) or null Token usage metrics for LLM calls during fact extraction (only present for synchronous operations) |
{- "async": false,
- "items": [
- {
- "content": "Alice works at Google",
- "context": "work",
- "document_id": "conversation_123"
}, - {
- "content": "Bob went hiking yesterday",
- "document_id": "conversation_123",
- "timestamp": "2024-01-15T10:00:00Z"
}
]
}{- "async": false,
- "bank_id": "user123",
- "items_count": 2,
- "success": true,
- "usage": {
- "input_tokens": 500,
- "output_tokens": 100,
- "total_tokens": 600
}
}Delete memory units for a memory bank. Optionally filter by type (world, experience, observation) to delete only specific types. This is a destructive operation that cannot be undone. The bank profile (disposition and background) will be preserved.
| bank_id required | string (Bank Id) |
Type (string) or Type (null) (Type) Optional fact type filter (world, experience, observation) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
Message (string) or Message (null) (Message) | |
Deleted Count (integer) or Deleted Count (null) (Deleted Count) |
{- "deleted_count": 10,
- "message": "Deleted successfully",
- "success": true
}Render the exact system and user messages retain, consolidation or reflect would send for this bank, without calling an LLM, reading memories, or changing anything. Everything that shapes the prompt comes from the bank; the runtime data an operation would be given is a fixed placeholder. Both messages are returned: retain and consolidation keep their system prompt bank-agnostic (one provider-side cache serves every bank) and carry the mission in the user message instead.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| operation | string (Operation) Default: "retain" Enum: "retain" "consolidation" "reflect" Which operation's prompts to render. |
Strategy (string) or Strategy (null) (Strategy) Name of a retain strategy to render under (a key of the bank's |
Array of objects (Messages) Request messages, in send order. Each is given as the blocks it is built from. | |
Strategy (string) or Strategy (null) (Strategy) The retain strategy these prompts were rendered under, if any. | |
| strategies | Array of strings (Strategies) Names of the bank's retain strategies, so a client can offer them without a second call. |
Array of objects (Run Settings) Settings that shape the operation without appearing in its prompt, such as chunk sizes. | |
Response Schema (object) or Response Schema (null) (Response Schema) JSON schema the response is constrained to, when the operation constrains it. | |
Skipped Reason (string) or Skipped Reason (null) (Skipped Reason) Why no prompt is sent, when the configuration means none is. |
{- "operation": "retain"
}{- "messages": [
- {
- "role": "system",
- "blocks": [
- {
- "text": "string",
- "source": "config",
- "field": "",
- "section": "",
- "heading": "",
- "active": true,
- "value": "string",
- "kind": "text",
- "choices": [
- "string"
], - "editable": false
}
]
}
], - "strategy": "string",
- "strategies": [
- "string"
], - "run_settings": [
- {
- "field": "string",
- "value": "string",
- "kind": "text",
- "editable": false
}
], - "response_schema": { },
- "skipped_reason": "string"
}List banks with their profiles and summary stats, most recently written first (last_write_at descending), with pagination and optional search.
Q (string) or Q (null) (Q) Case-insensitive substring filter on bank ID or name (e.g. 'alice') | |
| limit | integer (Limit) >= 0 Default: 100 Maximum number of banks to return |
| offset | integer (Offset) >= 0 Default: 0 Offset for pagination |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Banks) |
| total required | integer (Total) Total number of banks visible to the caller, ignoring |
| limit required | integer (Limit) |
| offset required | integer (Offset) |
{- "banks": [
- {
- "bank_id": "user123",
- "created_at": "2024-01-15T10:30:00Z",
- "disposition": {
- "empathy": 3,
- "literalism": 3,
- "skepticism": 3
}, - "fact_count": 156,
- "last_document_at": "2024-01-16T14:20:00Z",
- "last_write_at": "2024-01-17T09:05:00Z",
- "mission": "I am a software engineer helping my team ship quality code",
- "name": "Alice",
- "updated_at": "2024-01-16T14:20:00Z"
}
], - "limit": 100,
- "offset": 0,
- "total": 50
}Get statistics about nodes and links for a specific agent
| bank_id required | string (Bank Id) |
| refresh | boolean (Refresh) Default: false Force a fresh recompute, bypassing the cached value (and refreshing the cache). |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) |
| total_nodes required | integer (Total Nodes) |
| total_links required | integer (Total Links) |
| total_documents required | integer (Total Documents) |
required | object (Nodes By Fact Type) |
required | object (Links By Link Type) |
required | object (Links By Fact Type) |
required | object (Links Breakdown) |
| pending_operations required | integer (Pending Operations) |
| failed_operations required | integer (Failed Operations) |
object (Operations By Status) Async operations grouped by status (pending, processing, completed, failed, cancelled). | |
Last Consolidated At (string) or Last Consolidated At (null) (Last Consolidated At) When consolidation last ran (ISO format) | |
Last Memory Write At (string) or Last Memory Write At (null) (Last Memory Write At) When a memory was last written in this bank — stored, edited, or consolidated (ISO format). Null if the bank has no memories. A mental model whose | |
| pending_consolidation | integer (Pending Consolidation) Default: 0 Number of source memories (world/experience) still queued for consolidation into observations. Excludes memories whose consolidation permanently failed — those are counted only in failed_consolidation — so this drains to 0 when the consolidator catches up. |
| failed_consolidation | integer (Failed Consolidation) Default: 0 Number of source memories (world/experience) whose consolidation permanently failed and can be retried via the consolidation recovery endpoint. |
| total_observations | integer (Total Observations) Default: 0 Total number of observations |
{- "bank_id": "user123",
- "failed_consolidation": 0,
- "failed_operations": 0,
- "last_consolidated_at": "2024-01-15T10:30:00Z",
- "last_memory_write_at": "2024-01-15T11:05:00Z",
- "links_breakdown": {
- "fact": {
- "entity": 40,
- "semantic": 60,
- "temporal": 100
}
}, - "links_by_fact_type": {
- "fact": 200,
- "observation": 40,
- "preference": 60
}, - "links_by_link_type": {
- "entity": 50,
- "semantic": 100,
- "temporal": 150
}, - "nodes_by_fact_type": {
- "fact": 100,
- "observation": 20,
- "preference": 30
}, - "pending_consolidation": 0,
- "pending_operations": 2,
- "total_documents": 10,
- "total_links": 300,
- "total_nodes": 150,
- "total_observations": 45
}Probe the LLMs this bank would use for retain / consolidation / reflect with one minimal call each (configs shared across operations are probed once), so you can discover 'not configured / unreachable' instead of a silent stall. Deliberate action (makes a real provider call); not for polling. Returns status only — never the provider, model, endpoint, API key, or raw error. Disable with HINDSIGHT_API_ENABLE_BANK_LLM_HEALTH=false.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) Bank identifier |
required | Array of objects (Operations) Connectivity status per operation (retain, consolidation, reflect) |
{- "bank_id": "user123",
- "operations": [
- {
- "latency_ms": 412,
- "ok": true,
- "operation": "retain",
- "status": "connected"
}, - {
- "latency_ms": 412,
- "ok": true,
- "operation": "consolidation",
- "status": "connected"
}, - {
- "ok": false,
- "operation": "reflect",
- "status": "not_configured"
}
]
}Memories ingested over a period, bucketed by time and broken down by fact type.
| bank_id required | string (Bank Id) |
| period | string (Period) Default: "7d" |
| time_field | string (Time Field) Default: "created_at" Timestamp column to bucket on. |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) |
| period required | string (Period) One of: 1h, 12h, 1d, 7d, 30d, 90d. |
| trunc required | string (Trunc) Bucket granularity: minute, hour, day. |
| time_field | string (Time Field) Default: "created_at" Timestamp column used to assign each row to a bucket. |
Array of objects (Buckets) Per-bucket counts, always returned fully padded for the requested period. |
{- "bank_id": "string",
- "period": "string",
- "trunc": "string",
- "time_field": "created_at",
- "buckets": [
- {
- "time": "string",
- "world": 0,
- "experience": 0,
- "observation": 0
}
]
}Removed. The bank profile endpoints have been removed. Disposition traits and the reflect mission are bank configuration: read them from GET /v1/default/banks/{bank_id}/config as disposition_skepticism, disposition_literalism, disposition_empathy and reflect_mission, and write them with PATCH /v1/default/banks/{bank_id}/config. The name field this endpoint also returned was a display-only label; read it from GET /v1/default/banks.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
required | object (DispositionTraits) Disposition traits that influence how memories are formed and interpreted. |
| mission required | string (Mission) The agent's mission - who they are and what they're trying to accomplish |
Background (string) or Background (null) (Background) Deprecated: use mission instead |
{- "bank_id": "user123",
- "disposition": {
- "empathy": 3,
- "literalism": 3,
- "skepticism": 3
}, - "mission": "I am a software engineer helping my team stay organized and ship quality code",
- "name": "Alice"
}Removed. The bank profile endpoints have been removed. Disposition traits and the reflect mission are bank configuration: read them from GET /v1/default/banks/{bank_id}/config as disposition_skepticism, disposition_literalism, disposition_empathy and reflect_mission, and write them with PATCH /v1/default/banks/{bank_id}/config. The name field this endpoint also returned was a display-only label; read it from GET /v1/default/banks.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
required | object (DispositionTraits) Disposition traits that influence how memories are formed and interpreted. | ||||||
| |||||||
| bank_id required | string (Bank Id) |
| name required | string (Name) |
required | object (DispositionTraits) Disposition traits that influence how memories are formed and interpreted. |
| mission required | string (Mission) The agent's mission - who they are and what they're trying to accomplish |
Background (string) or Background (null) (Background) Deprecated: use mission instead |
{- "disposition": {
- "empathy": 3,
- "literalism": 3,
- "skepticism": 3
}
}{- "bank_id": "user123",
- "disposition": {
- "empathy": 3,
- "literalism": 3,
- "skepticism": 3
}, - "mission": "I am a software engineer helping my team stay organized and ship quality code",
- "name": "Alice"
}Removed. The bank background was folded into the reflect mission. Write it with PATCH /v1/default/banks/{bank_id}/config as reflect_mission. That call replaces the value rather than merging into it, so read the current mission from GET .../config first if you relied on this endpoint's append behaviour.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| content required | string (Content) New background information to add or merge |
| update_disposition | boolean (Update Disposition) Default: true Deprecated - disposition is no longer auto-inferred from mission |
| mission required | string (Mission) |
Background (string) or Background (null) (Background) Deprecated: same as mission | |
DispositionTraits (object) or null |
{- "content": "I was born in Texas",
- "update_disposition": true
}{- "mission": "I was born in Texas. I am a software engineer with 10 years of experience."
}Create a new agent or update existing agent with disposition and mission. Auto-fills missing fields with defaults.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
Name (string) or Name (null) (Name) Deprecated: display label only, not advertised | |
DispositionTraits (object) or null Deprecated: use update_bank_config instead | |
Disposition Skepticism (integer) or Disposition Skepticism (null) (Disposition Skepticism) Deprecated: use update_bank_config instead | |
Disposition Literalism (integer) or Disposition Literalism (null) (Disposition Literalism) Deprecated: use update_bank_config instead | |
Disposition Empathy (integer) or Disposition Empathy (null) (Disposition Empathy) Deprecated: use update_bank_config instead | |
Mission (string) or Mission (null) (Mission) Deprecated: use update_bank_config with reflect_mission instead | |
Background (string) or Background (null) (Background) Deprecated: use update_bank_config with reflect_mission instead | |
Reflect Mission (string) or Reflect Mission (null) (Reflect Mission) Mission/context for Reflect operations. Guides how Reflect interprets and uses memories. | |
Retain Mission (string) or Retain Mission (null) (Retain Mission) Steers what gets extracted during retain(). Injected alongside built-in extraction rules. | |
Retain Extraction Mode (string) or Retain Extraction Mode (null) (Retain Extraction Mode) Fact extraction mode: 'concise' (default), 'verbose', 'custom', 'verbatim', or 'chunks'. | |
Retain Custom Instructions (string) or Retain Custom Instructions (null) (Retain Custom Instructions) Custom extraction prompt. Only active when retain_extraction_mode is 'custom'. | |
Retain Chunk Size (integer) or Retain Chunk Size (null) (Retain Chunk Size) Target maximum characters for each content chunk during retain. | |
Retain Structured Chunk Size (integer) or Retain Structured Chunk Size (null) (Retain Structured Chunk Size) Maximum characters for a single JSONL line or conversation turn to keep whole during retain. Defaults to retain_chunk_size when unset. | |
Retain Max Attachments Per Chunk (integer) or Retain Max Attachments Per Chunk (null) (Retain Max Attachments Per Chunk) Maximum inline attachments one extraction chunk may carry. retain_chunk_size budgets text only — a placeholder costs the characters it occupies and nothing more — so this is what bounds attachments. Match it to the provider's per-request limit. | |
Enable Observations (boolean) or Enable Observations (null) (Enable Observations) Toggle automatic observation consolidation after retain(). | |
Observations Mission (string) or Observations Mission (null) (Observations Mission) Controls what gets synthesised into observations. Replaces built-in consolidation rules entirely. | |
Enable Text Search (boolean) or Enable Text Search (null) (Enable Text Search) Toggle the keyword (BM25) retrieval arm during recall. Disabling leaves pure vector search: the arm is left out of the query entirely rather than filtered to nothing, so none of its cost is paid. Also drops the keyword arm from knowledge-page search. | |
Enable Temporal Retrieval (boolean) or Enable Temporal Retrieval (null) (Enable Temporal Retrieval) Toggle the temporal retrieval arm during recall, together with the date-aware query analysis that feeds it. Useful for banks whose content carries no meaningful dates. | |
Enable Graph Retrieval (boolean) or Enable Graph Retrieval (null) (Enable Graph Retrieval) Toggle the entity/link graph traversal arm during recall. Disabling trades relational recall for latency on banks whose content has little entity structure. | |
Enable Reranking (boolean) or Enable Reranking (null) (Enable Reranking) Toggle cross-encoder reranking during recall. Disabling returns the RRF-fused ordering directly, which is faster but less precise. |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
required | object (DispositionTraits) Disposition traits that influence how memories are formed and interpreted. |
| mission required | string (Mission) The agent's mission - who they are and what they're trying to accomplish |
Background (string) or Background (null) (Background) Deprecated: use mission instead |
{- "observations_mission": "Observations are stable facts about people and projects. Always include preferences and skills.",
- "retain_mission": "Always include technical decisions and architectural trade-offs. Ignore meeting logistics."
}{- "bank_id": "user123",
- "disposition": {
- "empathy": 3,
- "literalism": 3,
- "skepticism": 3
}, - "mission": "I am a software engineer helping my team stay organized and ship quality code",
- "name": "Alice"
}Partially update an agent's profile. Only provided fields will be updated.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
Name (string) or Name (null) (Name) Deprecated: display label only, not advertised | |
DispositionTraits (object) or null Deprecated: use update_bank_config instead | |
Disposition Skepticism (integer) or Disposition Skepticism (null) (Disposition Skepticism) Deprecated: use update_bank_config instead | |
Disposition Literalism (integer) or Disposition Literalism (null) (Disposition Literalism) Deprecated: use update_bank_config instead | |
Disposition Empathy (integer) or Disposition Empathy (null) (Disposition Empathy) Deprecated: use update_bank_config instead | |
Mission (string) or Mission (null) (Mission) Deprecated: use update_bank_config with reflect_mission instead | |
Background (string) or Background (null) (Background) Deprecated: use update_bank_config with reflect_mission instead | |
Reflect Mission (string) or Reflect Mission (null) (Reflect Mission) Mission/context for Reflect operations. Guides how Reflect interprets and uses memories. | |
Retain Mission (string) or Retain Mission (null) (Retain Mission) Steers what gets extracted during retain(). Injected alongside built-in extraction rules. | |
Retain Extraction Mode (string) or Retain Extraction Mode (null) (Retain Extraction Mode) Fact extraction mode: 'concise' (default), 'verbose', 'custom', 'verbatim', or 'chunks'. | |
Retain Custom Instructions (string) or Retain Custom Instructions (null) (Retain Custom Instructions) Custom extraction prompt. Only active when retain_extraction_mode is 'custom'. | |
Retain Chunk Size (integer) or Retain Chunk Size (null) (Retain Chunk Size) Target maximum characters for each content chunk during retain. | |
Retain Structured Chunk Size (integer) or Retain Structured Chunk Size (null) (Retain Structured Chunk Size) Maximum characters for a single JSONL line or conversation turn to keep whole during retain. Defaults to retain_chunk_size when unset. | |
Retain Max Attachments Per Chunk (integer) or Retain Max Attachments Per Chunk (null) (Retain Max Attachments Per Chunk) Maximum inline attachments one extraction chunk may carry. retain_chunk_size budgets text only — a placeholder costs the characters it occupies and nothing more — so this is what bounds attachments. Match it to the provider's per-request limit. | |
Enable Observations (boolean) or Enable Observations (null) (Enable Observations) Toggle automatic observation consolidation after retain(). | |
Observations Mission (string) or Observations Mission (null) (Observations Mission) Controls what gets synthesised into observations. Replaces built-in consolidation rules entirely. | |
Enable Text Search (boolean) or Enable Text Search (null) (Enable Text Search) Toggle the keyword (BM25) retrieval arm during recall. Disabling leaves pure vector search: the arm is left out of the query entirely rather than filtered to nothing, so none of its cost is paid. Also drops the keyword arm from knowledge-page search. | |
Enable Temporal Retrieval (boolean) or Enable Temporal Retrieval (null) (Enable Temporal Retrieval) Toggle the temporal retrieval arm during recall, together with the date-aware query analysis that feeds it. Useful for banks whose content carries no meaningful dates. | |
Enable Graph Retrieval (boolean) or Enable Graph Retrieval (null) (Enable Graph Retrieval) Toggle the entity/link graph traversal arm during recall. Disabling trades relational recall for latency on banks whose content has little entity structure. | |
Enable Reranking (boolean) or Enable Reranking (null) (Enable Reranking) Toggle cross-encoder reranking during recall. Disabling returns the RRF-fused ordering directly, which is faster but less precise. |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
required | object (DispositionTraits) Disposition traits that influence how memories are formed and interpreted. |
| mission required | string (Mission) The agent's mission - who they are and what they're trying to accomplish |
Background (string) or Background (null) (Background) Deprecated: use mission instead |
{- "observations_mission": "Observations are stable facts about people and projects. Always include preferences and skills.",
- "retain_mission": "Always include technical decisions and architectural trade-offs. Ignore meeting logistics."
}{- "bank_id": "user123",
- "disposition": {
- "empathy": 3,
- "literalism": 3,
- "skepticism": 3
}, - "mission": "I am a software engineer helping my team stay organized and ship quality code",
- "name": "Alice"
}Delete an entire memory bank including all memories, entities, documents, and the bank profile itself. This is a destructive operation that cannot be undone.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
Message (string) or Message (null) (Message) | |
Deleted Count (integer) or Deleted Count (null) (Deleted Count) |
{- "deleted_count": 10,
- "message": "Deleted successfully",
- "success": true
}Delete all observations for a memory bank. This is useful for resetting the consolidated knowledge.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
Message (string) or Message (null) (Message) | |
Deleted Count (integer) or Deleted Count (null) (Deleted Count) |
{- "deleted_count": 10,
- "message": "Deleted successfully",
- "success": true
}Reset all memories that were permanently marked as failed during consolidation (after exhausting all LLM retries and adaptive batch splitting) so they are picked up again on the next consolidation run. Does not delete any observations.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| retried_count required | integer (Retried Count) |
{- "retried_count": 42
}Get fully resolved configuration for a bank including all hierarchical overrides (global → tenant → bank). The 'config' field contains all resolved config values. The 'overrides' field shows only bank-specific overrides. Always available: HINDSIGHT_API_ENABLE_BANK_CONFIG_API gates only the write operations on this resource.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) Bank identifier |
required | object (Config) Fully resolved configuration with all hierarchical overrides applied (Python field names) |
required | object (Overrides) Bank-specific configuration overrides only (Python field names) |
{- "bank_id": "my-bank",
- "config": {
- "retain_chunk_size": 3000,
- "retain_extraction_mode": "verbose"
}, - "overrides": {
- "retain_extraction_mode": "verbose"
}
}Update configuration overrides for a bank. Only hierarchical behavioral settings can be overridden (retention parameters, recall settings, etc.). Keys can be provided in Python field format (retain_extraction_mode) or environment variable format (HINDSIGHT_API_RETAIN_EXTRACTION_MODE).
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
required | object (Updates) Configuration overrides. Keys can be in Python field format (retain_extraction_mode) or environment variable format (HINDSIGHT_API_RETAIN_EXTRACTION_MODE). Only hierarchical fields can be overridden per-bank. | ||
| |||
| bank_id required | string (Bank Id) Bank identifier |
required | object (Config) Fully resolved configuration with all hierarchical overrides applied (Python field names) |
required | object (Overrides) Bank-specific configuration overrides only (Python field names) |
{- "updates": {
- "retain_custom_instructions": "Extract technical details carefully",
- "retain_extraction_mode": "custom"
}
}{- "bank_id": "my-bank",
- "config": {
- "retain_chunk_size": 3000,
- "retain_extraction_mode": "verbose"
}, - "overrides": {
- "retain_extraction_mode": "verbose"
}
}Reset bank configuration to defaults by removing all bank-specific overrides. The bank will then use global and tenant-level configuration only.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) Bank identifier |
required | object (Config) Fully resolved configuration with all hierarchical overrides applied (Python field names) |
required | object (Overrides) Bank-specific configuration overrides only (Python field names) |
{- "bank_id": "my-bank",
- "config": {
- "retain_chunk_size": 3000,
- "retain_extraction_mode": "verbose"
}, - "overrides": {
- "retain_extraction_mode": "verbose"
}
}Run memory consolidation to create/update observations from recent memories.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
Array of Observation Scopes (strings) or Observation Scopes (null) (Observation Scopes) Optional list of tag scopes to consolidate. Each scope is a list of tags. Only unconsolidated memories whose tags contain all tags in at least one scope will be processed. If omitted, all unconsolidated memories are processed. | |
Any of Array Array string | |
| operation_id required | string (Operation Id) ID of the async consolidation operation |
| deduplicated | boolean (Deduplicated) Default: false True if an existing pending task was reused |
{- "observation_scopes": [
- [
- "string"
]
]
}{- "operation_id": "string",
- "deduplicated": false
}List all entities (people, organizations, etc.) known by the bank, ordered by mention count. Supports pagination.
| bank_id required | string (Bank Id) |
| limit | integer (Limit) >= 0 Default: 100 Maximum number of entities to return |
| offset | integer (Offset) >= 0 Default: 0 Offset for pagination |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
| total required | integer (Total) |
| limit required | integer (Limit) |
| offset required | integer (Offset) |
{- "items": [
- {
- "canonical_name": "John",
- "first_seen": "2024-01-15T10:30:00Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "last_seen": "2024-02-01T14:00:00Z",
- "mention_count": 15
}
], - "limit": 100,
- "offset": 0,
- "total": 150
}Return a graph of entities (nodes) and their co-occurrences (edges) for visualization.
| bank_id required | string (Bank Id) |
| limit | integer (Limit) >= 0 Default: 1000 Maximum number of co-occurrence edges to return |
| min_count | integer (Min Count) Default: 1 Minimum cooccurrence_count to include an edge |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Nodes) |
required | Array of objects (Edges) |
| total_entities required | integer (Total Entities) |
| total_edges required | integer (Total Edges) |
| limit required | integer (Limit) |
{- "edges": [
- {
- "data": {
- "color": "#ffd700",
- "id": "uuid-1-uuid-2",
- "lastCooccurred": "2024-02-01T14:00:00Z",
- "lineStyle": "solid",
- "linkType": "cooccurrence",
- "source": "uuid-1",
- "target": "uuid-2",
- "weight": 5
}
}
], - "limit": 1000,
- "nodes": [
- {
- "data": {
- "color": "#42a5f5",
- "id": "uuid-1",
- "label": "Alice",
- "mentionCount": 12
}
}, - {
- "data": {
- "color": "#42a5f5",
- "id": "uuid-2",
- "label": "Google",
- "mentionCount": 8
}
}
], - "total_edges": 1,
- "total_entities": 2
}Get detailed information about an entity including observations (mental model).
| bank_id required | string (Bank Id) |
| entity_id required | string (Entity Id) |
Authorization (string) or Authorization (null) (Authorization) |
| id required | string (Id) |
| canonical_name required | string (Canonical Name) |
| mention_count required | integer (Mention Count) |
First Seen (string) or First Seen (null) (First Seen) | |
Last Seen (string) or Last Seen (null) (Last Seen) | |
Metadata (object) or Metadata (null) (Metadata) | |
required | Array of objects (Observations) |
{- "canonical_name": "John",
- "first_seen": "2024-01-15T10:30:00Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "last_seen": "2024-02-01T14:00:00Z",
- "mention_count": 15,
- "observations": [
- {
- "mentioned_at": "2024-01-15T10:30:00Z",
- "text": "John works at Google"
}
]
}This endpoint is deprecated. Entity observations have been replaced by mental models.
| bank_id required | string (Bank Id) |
| entity_id required | string (Entity Id) |
Authorization (string) or Authorization (null) (Authorization) |
| id required | string (Id) |
| canonical_name required | string (Canonical Name) |
| mention_count required | integer (Mention Count) |
First Seen (string) or First Seen (null) (First Seen) | |
Last Seen (string) or Last Seen (null) (Last Seen) | |
Metadata (object) or Metadata (null) (Metadata) | |
required | Array of objects (Observations) |
{- "canonical_name": "John",
- "first_seen": "2024-01-15T10:30:00Z",
- "id": "123e4567-e89b-12d3-a456-426614174000",
- "last_seen": "2024-02-01T14:00:00Z",
- "mention_count": 15,
- "observations": [
- {
- "mentioned_at": "2024-01-15T10:30:00Z",
- "text": "John works at Google"
}
]
}List user-curated living documents that stay current.
| bank_id required | string (Bank Id) |
Array of Tags (strings) or Tags (null) (Tags) Filter by tags | |
| tags_match | string (Tags Match) Default: "any" Enum: "any" "all" "exact" How to match tags |
| detail | string (Detail) Default: "metadata" Enum: "metadata" "content" "full" Detail level: 'metadata' (names/tags/staleness — the default), 'content' (adds content/config), 'full' (includes reflect_response). Content is opt-in: it is returned only when explicitly requested. |
| limit | integer (Limit) [ 1 .. 1000 ] Default: 100 |
| offset | integer (Offset) >= 0 Default: 0 |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
| total required | integer (Total) Total number of mental models matching the filter (not just this page) |
| limit required | integer (Limit) Page size that was applied |
| offset required | integer (Offset) Offset that was applied |
{- "items": [
- {
- "id": "string",
- "bank_id": "string",
- "name": "string",
- "source_query": "string",
- "content": "string",
- "tags": [ ],
- "max_tokens": 0,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}, - "last_refreshed_at": "string",
- "last_memory_seen_at": "string",
- "created_at": "string",
- "reflect_response": { },
- "is_stale": true
}
], - "total": 0,
- "limit": 0,
- "offset": 0
}Create a mental model by running reflect with the source query in the background. Returns an operation ID to track progress. The content is auto-generated by the reflect endpoint. Use the operations endpoint to check completion status.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
Id (string) or Id (null) (Id) Optional custom ID for the mental model (alphanumeric lowercase with hyphens) | |
| name required | string (Name) Human-readable name for the mental model |
| source_query required | string (Source Query) The query to run to generate content |
| tags | Array of strings (Tags) Default: [] Tags for scoped visibility |
| max_tokens | integer (Max Tokens) [ 256 .. 8192 ] Default: 2048 Maximum tokens for generated content |
object (MentalModelTrigger-Input) Default: {} Trigger settings |
Mental Model Id (string) or Mental Model Id (null) (Mental Model Id) ID of the created mental model | |
| operation_id required | string (Operation Id) Operation ID to track refresh progress |
{- "id": "team-communication",
- "max_tokens": 2048,
- "name": "Team Communication Preferences",
- "source_query": "How does the team prefer to communicate?",
- "tags": [
- "team"
], - "trigger": {
- "refresh_after_consolidation": false
}
}{- "mental_model_id": "string",
- "operation_id": "string"
}Get a specific mental model by ID.
| bank_id required | string (Bank Id) |
| mental_model_id required | string (Mental Model Id) |
| detail | string (Detail) Default: "full" Enum: "metadata" "content" "full" Detail level: 'metadata' (names/tags only), 'content' (adds content/config), 'full' (includes reflect_response) |
Authorization (string) or Authorization (null) (Authorization) |
| id required | string (Id) |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
Source Query (string) or Source Query (null) (Source Query) | |
Content (string) or Content (null) (Content) The mental model content as well-formatted markdown (auto-generated from reflect endpoint) | |
| tags | Array of strings (Tags) Default: [] |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
MentalModelTrigger (object) or null | |
Last Refreshed At (string) or Last Refreshed At (null) (Last Refreshed At) When a refresh last finished for this model — wall-clock, in ISO format. Advances on every refresh that completes, including one that found nothing new and preserved the content, and on a direct edit of | |
Last Memory Seen At (string) or Last Memory Seen At (null) (Last Memory Seen At) How far through the bank's memories this model is written — the newest in-scope memory the last refresh saw, in ISO format. Stands still when nothing in the model's scope has been written, however often it is refreshed. At or after the bank's | |
Created At (string) or Created At (null) (Created At) | |
Reflect Response (object) or Reflect Response (null) (Reflect Response) Full reflect API response payload including based_on facts and observations | |
Is Stale (boolean) or Is Stale (null) (Is Stale) True when memories matching this mental model's tag/fact_type scope have been written since last_memory_seen_at — the same check that decides whether a scheduled refresh does any work, so a model flagged here is one a refresh would actually rewrite. Populated on both the single read and the list. Deletions are not observed: removing an in-scope memory leaves no write behind, so it does not raise this flag. |
{- "id": "string",
- "bank_id": "string",
- "name": "string",
- "source_query": "string",
- "content": "string",
- "tags": [ ],
- "max_tokens": 0,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}, - "last_refreshed_at": "string",
- "last_memory_seen_at": "string",
- "created_at": "string",
- "reflect_response": { },
- "is_stale": true
}Update a mental model's name and/or source query.
| bank_id required | string (Bank Id) |
| mental_model_id required | string (Mental Model Id) |
Authorization (string) or Authorization (null) (Authorization) |
Name (string) or Name (null) (Name) New name for the mental model | |
Source Query (string) or Source Query (null) (Source Query) New source query for the mental model | |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) Maximum tokens for generated content | |
Array of Tags (strings) or Tags (null) (Tags) Tags for scoped visibility | |
MentalModelTrigger (object) or null Trigger settings |
| id required | string (Id) |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
Source Query (string) or Source Query (null) (Source Query) | |
Content (string) or Content (null) (Content) The mental model content as well-formatted markdown (auto-generated from reflect endpoint) | |
| tags | Array of strings (Tags) Default: [] |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
MentalModelTrigger (object) or null | |
Last Refreshed At (string) or Last Refreshed At (null) (Last Refreshed At) When a refresh last finished for this model — wall-clock, in ISO format. Advances on every refresh that completes, including one that found nothing new and preserved the content, and on a direct edit of | |
Last Memory Seen At (string) or Last Memory Seen At (null) (Last Memory Seen At) How far through the bank's memories this model is written — the newest in-scope memory the last refresh saw, in ISO format. Stands still when nothing in the model's scope has been written, however often it is refreshed. At or after the bank's | |
Created At (string) or Created At (null) (Created At) | |
Reflect Response (object) or Reflect Response (null) (Reflect Response) Full reflect API response payload including based_on facts and observations | |
Is Stale (boolean) or Is Stale (null) (Is Stale) True when memories matching this mental model's tag/fact_type scope have been written since last_memory_seen_at — the same check that decides whether a scheduled refresh does any work, so a model flagged here is one a refresh would actually rewrite. Populated on both the single read and the list. Deletions are not observed: removing an in-scope memory leaves no write behind, so it does not raise this flag. |
{- "max_tokens": 4096,
- "name": "Updated Team Communication Preferences",
- "source_query": "How does the team prefer to communicate?",
- "tags": [
- "team",
- "communication"
], - "trigger": {
- "refresh_after_consolidation": true
}
}{- "id": "string",
- "bank_id": "string",
- "name": "string",
- "source_query": "string",
- "content": "string",
- "tags": [ ],
- "max_tokens": 0,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}, - "last_refreshed_at": "string",
- "last_memory_seen_at": "string",
- "created_at": "string",
- "reflect_response": { },
- "is_stale": true
}Delete a mental model.
| bank_id required | string (Bank Id) |
| mental_model_id required | string (Mental Model Id) |
Authorization (string) or Authorization (null) (Authorization) |
nullGet the refresh history of a mental model, showing content changes over time.
| bank_id required | string (Bank Id) |
| mental_model_id required | string (Mental Model Id) |
Authorization (string) or Authorization (null) (Authorization) |
nullSubmit an async task to re-run the source query through reflect and update the content.
| bank_id required | string (Bank Id) |
| mental_model_id required | string (Mental Model Id) |
Authorization (string) or Authorization (null) (Authorization) |
| operation_id required | string (Operation Id) |
| status required | string (Status) |
{- "operation_id": "550e8400-e29b-41d4-a716-446655440000",
- "status": "queued"
}Preview what a refresh would do to this mental model WITHOUT changing it — no content, structured document, watermark, or last_refreshed_at is written. Returns the mode the refresh ran in and why (delta silently falls back to full when there is no baseline or the source query changed), the resolved tag scope and time window it read, how many facts retrieval returned versus how many the reflect agent actually used, the delta operations it emitted, and a unified diff from the stored content to the content it would write.
This is the production refresh pipeline with two writes skipped — the content and the watermark — and nothing about it is configurable, so what it reports is what the next refresh will do. Because nothing is persisted, a delta dry run reads exactly the window the next real refresh would, and repeating it reads that same window again.
It costs the same LLM tokens as a refresh and is validated the same way.
| bank_id required | string (Bank Id) |
| mental_model_id required | string (Mental Model Id) |
Authorization (string) or Authorization (null) (Authorization) |
| mental_model_id required | string (Mental Model Id) The mental model previewed. |
| name required | string (Name) Display name of the mental model. |
| requested_mode required | string (Requested Mode) Enum: "full" "delta" The mode asked for (from the model's trigger, or overridden). |
| effective_mode required | string (Effective Mode) Enum: "full" "delta" The mode the refresh actually ran in. |
Mode Fallback Reason (string) or Mode Fallback Reason (null) (Mode Fallback Reason) Why delta was requested but not applied, if that happened. | |
| outcome required | string (Outcome) Enum: "content_written" "content_unchanged" "content_preserved_no_new_facts" "refresh_failed_empty_candidate" "refresh_failed_delta_not_applied" What a real refresh would do with the document. |
| would_persist required | boolean (Would Persist) Whether a real refresh would write new content. |
required | object (MentalModelRefreshScope) The resolved memory scope. |
required | object (MentalModelRefreshWindow) The snapshot window read from. |
required | object (MentalModelFactCounts) Facts retrieved versus actually used. |
object (Based On) The evidence this run would ground the document on, keyed by fact type — the same shape a refresh persists under reflect_response.based_on. Returned so a preview can show its sources without having to write them anywhere. | |
| current_content required | string (Current Content) The model's content as it stands now. |
| candidate_content required | string (Candidate Content) Raw reflect synthesis, before any delta operations. |
| preview_content required | string (Preview Content) The content a real refresh would store: the delta-edited document, or the candidate in full mode. |
| diff required | string (Diff) Unified diff from current_content to preview_content. Empty when identical. |
MentalModelDeltaOperations (object) or null Structured operations emitted, in delta mode. | |
MentalModelRetraction (object) or null Facts the document cites that no longer exist, and what a real refresh would do about them. | |
required | object (MentalModelRefreshTrace) Execution trace of the run, always included for a dry run. |
object (TokenUsage) Token usage across the run's LLM calls. | |
| duration_ms | integer (Duration Ms) Default: 0 Wall-clock duration of the run. |
| warnings | Array of strings (Warnings) Conditions worth a human's attention, in plain language. |
{- "effective_mode": "full",
- "facts": {
- "retrieved": {
- "observation": 12
}, - "used": {
- "observation": 4
}
}, - "mental_model_id": "coding-style",
- "mode_fallback_reason": "source_query_changed",
- "name": "Coding Style",
- "outcome": "content_written",
- "requested_mode": "delta",
- "warnings": [ ],
- "would_persist": true
}Clear a mental model's content so the next refresh performs a full re-synthesis. This is useful for delta-mode models that have accumulated drift over many incremental refreshes. After clearing, call the /refresh endpoint to trigger a clean full rebuild.
| bank_id required | string (Bank Id) |
| mental_model_id required | string (Mental Model Id) |
Authorization (string) or Authorization (null) (Authorization) |
| id required | string (Id) |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
Source Query (string) or Source Query (null) (Source Query) | |
Content (string) or Content (null) (Content) The mental model content as well-formatted markdown (auto-generated from reflect endpoint) | |
| tags | Array of strings (Tags) Default: [] |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
MentalModelTrigger (object) or null | |
Last Refreshed At (string) or Last Refreshed At (null) (Last Refreshed At) When a refresh last finished for this model — wall-clock, in ISO format. Advances on every refresh that completes, including one that found nothing new and preserved the content, and on a direct edit of | |
Last Memory Seen At (string) or Last Memory Seen At (null) (Last Memory Seen At) How far through the bank's memories this model is written — the newest in-scope memory the last refresh saw, in ISO format. Stands still when nothing in the model's scope has been written, however often it is refreshed. At or after the bank's | |
Created At (string) or Created At (null) (Created At) | |
Reflect Response (object) or Reflect Response (null) (Reflect Response) Full reflect API response payload including based_on facts and observations | |
Is Stale (boolean) or Is Stale (null) (Is Stale) True when memories matching this mental model's tag/fact_type scope have been written since last_memory_seen_at — the same check that decides whether a scheduled refresh does any work, so a model flagged here is one a refresh would actually rewrite. Populated on both the single read and the list. Deletions are not observed: removing an in-scope memory leaves no write behind, so it does not raise this flag. |
{- "id": "string",
- "bank_id": "string",
- "name": "string",
- "source_query": "string",
- "content": "string",
- "tags": [ ],
- "max_tokens": 0,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}, - "last_refreshed_at": "string",
- "last_memory_seen_at": "string",
- "created_at": "string",
- "reflect_response": { },
- "is_stale": true
}Return the knowledge base as a nested tree of folders and pages.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Roots) | ||||||||||||||||||||||||
Array
| |||||||||||||||||||||||||
{- "roots": [
- {
- "id": "string",
- "kind": "folder",
- "name": "string",
- "parent_id": "string",
- "mental_model_id": "string",
- "managed": false,
- "description": "string",
- "tags": [ ],
- "timestamp": "string",
- "is_stale": true,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}, - "children": [ ]
}
]
}Create a folder, optionally nested under a parent folder.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| name required | string (Name) |
Parent Id (string) or Parent Id (null) (Parent Id) |
| id required | string (Id) |
| kind required | string (Kind) Enum: "folder" "page" |
| name required | string (Name) |
Parent Id (string) or Parent Id (null) (Parent Id) | |
Mental Model Id (string) or Mental Model Id (null) (Mental Model Id) Backing mental model id (pages only). | |
| managed | boolean (Managed) Default: false Client-set flag: true = system-owned, false = hand-authored. |
Description (string) or Description (null) (Description) Page source query (the page's | |
| tags | Array of strings (Tags) Default: [] |
Timestamp (string) or Timestamp (null) (Timestamp) Last refresh (page) or last update (folder). | |
Is Stale (boolean) or Is Stale (null) (Is Stale) Pages only, populated by the tree endpoint. True when a memory in this page's scope — its tags and fact types — has been written since the page last read the memories. That is the same check a scheduled refresh runs before spending an LLM call, so a flagged page is one a refresh would actually rewrite. Deletions are not observed: removing an in-scope memory leaves no write behind, so it does not raise this flag. | |
MentalModelTrigger (object) or null Pages only: the page's refresh settings — when it rebuilds itself ( | |
| children | Array of objects (Children) Default: [] |
{- "name": "string",
- "parent_id": "string"
}{- "id": "string",
- "kind": "folder",
- "name": "string",
- "parent_id": "string",
- "mental_model_id": "string",
- "managed": false,
- "description": "string",
- "tags": [ ],
- "timestamp": "string",
- "is_stale": true,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}, - "children": [ ]
}Create a page (a mental model + tree node). Content is generated asynchronously; use the returned operation_id to track completion.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| name required | string (Name) |
| source_query required | string (Source Query) |
Parent Id (string) or Parent Id (null) (Parent Id) | |
Array of Tags (strings) or Tags (null) (Tags) Tags that SCOPE which memories this page is built from — not labels. Every tag here, including a | |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
MentalModelTrigger (object) or null |
| page_id required | string (Page Id) |
| mental_model_id required | string (Mental Model Id) |
Operation Id (string) or Operation Id (null) (Operation Id) |
{- "name": "string",
- "source_query": "string",
- "parent_id": "string",
- "tags": [
- "string"
], - "max_tokens": 0,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}
}{- "page_id": "string",
- "mental_model_id": "string",
- "operation_id": "string"
}Return a portable markdown bundle: a nested index.md, one
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Files) | ||||
Array
| |||||
{- "files": [
- {
- "path": "string",
- "content": "string"
}
]
}Doc-level hybrid search across a bank's knowledge pages: a full-text (BM25) match and a vector-similarity match, Reciprocal-Rank-Fusion fused. No reranker — tuned for latency.
| bank_id required | string (Bank Id) |
| q required | string (Q) non-empty Search query |
| limit | integer (Limit) [ 1 .. 50 ] Default: 10 Maximum results to return |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Results) |
| total required | integer (Total) |
{- "results": [
- {
- "id": "string",
- "name": "string",
- "mental_model_id": "string",
- "snippet": "string",
- "score": 0,
- "updated_at": "string"
}
], - "total": 0
}Return a single page as a markdown document (frontmatter + markdown body).
| bank_id required | string (Bank Id) |
| page_id required | string (Page Id) |
Authorization (string) or Authorization (null) (Authorization) |
| id required | string (Id) |
| name required | string (Name) |
| type required | string (Type) Page type — from a |
Description (string) or Description (null) (Description) The source query that rebuilds the page. | |
| tags | Array of strings (Tags) Default: [] |
Timestamp (string) or Timestamp (null) (Timestamp) Last refresh time (falls back to creation). | |
Body (string) or Body (null) (Body) The page's synthesized markdown body. | |
| markdown required | string (Markdown) The full markdown document: YAML frontmatter + markdown body. |
{- "id": "string",
- "name": "string",
- "type": "string",
- "description": "string",
- "tags": [ ],
- "timestamp": "string",
- "body": "string",
- "markdown": "string"
}Rename a node (set name), move it under another folder (set parent_id, null for the root), and/or update a page's options (source_query, tags, max_tokens, trigger). Changing source_query schedules an async refresh so the page rebuilds against the new question. trigger is applied as a patch: the fields you send are updated and the rest keep the page's current values.
| bank_id required | string (Bank Id) |
| node_id required | string (Node Id) |
Authorization (string) or Authorization (null) (Authorization) |
Name (string) or Name (null) (Name) | |
Parent Id (string) or Parent Id (null) (Parent Id) | |
Source Query (string) or Source Query (null) (Source Query) | |
Array of Tags (strings) or Tags (null) (Tags) Replaces the page's tags, which SCOPE which memories it is built from. Pass | |
Max Tokens (integer) or Max Tokens (null) (Max Tokens) | |
MentalModelTrigger (object) or null Refresh settings to change. Applied as a patch: only the fields present in this object are updated, and the rest keep the page's current values — so moving a page onto a schedule does not reset how it refreshes. Setting refresh_cron clears refresh_after_consolidation and vice versa, since a page refreshes on one or the other, never both. |
| id required | string (Id) |
| kind required | string (Kind) Enum: "folder" "page" |
| name required | string (Name) |
Parent Id (string) or Parent Id (null) (Parent Id) | |
Mental Model Id (string) or Mental Model Id (null) (Mental Model Id) Backing mental model id (pages only). | |
| managed | boolean (Managed) Default: false Client-set flag: true = system-owned, false = hand-authored. |
Description (string) or Description (null) (Description) Page source query (the page's | |
| tags | Array of strings (Tags) Default: [] |
Timestamp (string) or Timestamp (null) (Timestamp) Last refresh (page) or last update (folder). | |
Is Stale (boolean) or Is Stale (null) (Is Stale) Pages only, populated by the tree endpoint. True when a memory in this page's scope — its tags and fact types — has been written since the page last read the memories. That is the same check a scheduled refresh runs before spending an LLM call, so a flagged page is one a refresh would actually rewrite. Deletions are not observed: removing an in-scope memory leaves no write behind, so it does not raise this flag. | |
MentalModelTrigger (object) or null Pages only: the page's refresh settings — when it rebuilds itself ( | |
| children | Array of objects (Children) Default: [] |
{- "name": "string",
- "parent_id": "string",
- "source_query": "string",
- "tags": [
- "string"
], - "max_tokens": 0,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}
}{- "id": "string",
- "kind": "folder",
- "name": "string",
- "parent_id": "string",
- "mental_model_id": "string",
- "managed": false,
- "description": "string",
- "tags": [ ],
- "timestamp": "string",
- "is_stale": true,
- "trigger": {
- "mode": "full",
- "refresh_after_consolidation": false,
- "refresh_cron": "string",
- "min_refresh_interval_seconds": 0,
- "fact_types": [
- "world"
], - "exclude_mental_models": false,
- "exclude_mental_model_ids": [
- "string"
], - "tags_match": "any",
- "tag_groups": [
- {
- "tags": [
- "string"
], - "match": "any",
- "resolve": "exact"
}
], - "include_chunks": true,
- "recall_max_tokens": 0,
- "recall_chunks_max_tokens": 0,
- "response_schema": { },
- "keep_trace": false
}, - "children": [ ]
}Delete a folder or page and its whole subtree (pages' mental models are removed too).
| bank_id required | string (Bank Id) |
| node_id required | string (Node Id) |
Authorization (string) or Authorization (null) (Authorization) |
nullList directive definitions. Unlike reflect, an omitted tag filter returns all directives.
| bank_id required | string (Bank Id) |
Array of Tags (strings) or Tags (null) (Tags) Filter directives by execution scope. Omit or pass [] to list all directives. | |
| tags_match | string (Tags Match) Default: "any" Enum: "any" "all" "exact" How tagged directives match the requested scope. Untagged/global directives are included. |
| active_only | boolean (Active Only) Default: true Only return active directives |
| limit | integer (Limit) [ 1 .. 1000 ] Default: 100 |
| offset | integer (Offset) >= 0 Default: 0 |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
| total required | integer (Total) Total number of directives matching the filter (not just this page) |
| limit required | integer (Limit) Page size that was applied |
| offset required | integer (Offset) Offset that was applied |
{- "items": [
- {
- "id": "string",
- "bank_id": "string",
- "name": "string",
- "content": "string",
- "priority": 0,
- "is_active": true,
- "tags": [ ],
- "created_at": "string",
- "updated_at": "string"
}
], - "total": 0,
- "limit": 0,
- "offset": 0
}Create a global or tag-scoped hard rule for reflect prompts.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| name required | string (Name) Human-readable name for the directive |
| content required | string (Content) The directive text to inject into prompts |
| priority | integer (Priority) Default: 0 Higher priority directives are injected first |
| is_active | boolean (Is Active) Default: true Whether this directive is active |
| tags | Array of strings (Tags) Default: [] Directive execution scope. Empty means global; non-empty requires a matching reflect scope. |
| id required | string (Id) |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
| content required | string (Content) |
| priority | integer (Priority) Default: 0 |
| is_active | boolean (Is Active) Default: true |
| tags | Array of strings (Tags) Default: [] |
Created At (string) or Created At (null) (Created At) | |
Updated At (string) or Updated At (null) (Updated At) |
{- "name": "string",
- "content": "string",
- "priority": 0,
- "is_active": true,
- "tags": [ ]
}{- "id": "string",
- "bank_id": "string",
- "name": "string",
- "content": "string",
- "priority": 0,
- "is_active": true,
- "tags": [ ],
- "created_at": "string",
- "updated_at": "string"
}Get a specific directive by ID.
| bank_id required | string (Bank Id) |
| directive_id required | string (Directive Id) |
Authorization (string) or Authorization (null) (Authorization) |
| id required | string (Id) |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
| content required | string (Content) |
| priority | integer (Priority) Default: 0 |
| is_active | boolean (Is Active) Default: true |
| tags | Array of strings (Tags) Default: [] |
Created At (string) or Created At (null) (Created At) | |
Updated At (string) or Updated At (null) (Updated At) |
{- "id": "string",
- "bank_id": "string",
- "name": "string",
- "content": "string",
- "priority": 0,
- "is_active": true,
- "tags": [ ],
- "created_at": "string",
- "updated_at": "string"
}Update a directive's properties.
| bank_id required | string (Bank Id) |
| directive_id required | string (Directive Id) |
Authorization (string) or Authorization (null) (Authorization) |
Name (string) or Name (null) (Name) New name | |
Content (string) or Content (null) (Content) New content | |
Priority (integer) or Priority (null) (Priority) New priority | |
Is Active (boolean) or Is Active (null) (Is Active) New active status | |
Array of Tags (strings) or Tags (null) (Tags) New tags |
| id required | string (Id) |
| bank_id required | string (Bank Id) |
| name required | string (Name) |
| content required | string (Content) |
| priority | integer (Priority) Default: 0 |
| is_active | boolean (Is Active) Default: true |
| tags | Array of strings (Tags) Default: [] |
Created At (string) or Created At (null) (Created At) | |
Updated At (string) or Updated At (null) (Updated At) |
{- "name": "string",
- "content": "string",
- "priority": 0,
- "is_active": true,
- "tags": [
- "string"
]
}{- "id": "string",
- "bank_id": "string",
- "name": "string",
- "content": "string",
- "priority": 0,
- "is_active": true,
- "tags": [ ],
- "created_at": "string",
- "updated_at": "string"
}Delete a directive.
| bank_id required | string (Bank Id) |
| directive_id required | string (Directive Id) |
Authorization (string) or Authorization (null) (Authorization) |
nullList documents with pagination and optional search, most recently written first (updated_at descending). Documents are the source content from which memory units are extracted.
| bank_id required | string (Bank Id) |
Q (string) or Q (null) (Q) Case-insensitive substring filter on document ID (e.g. 'report' matches 'report-2024') | |
Array of Tags (strings) or Tags (null) (Tags) Filter documents by tags | |
| tags_match | string (Tags Match) Default: "any_strict" How to match tags: 'any', 'all', 'any_strict', 'all_strict' |
| limit | integer (Limit) >= 0 Default: 100 |
| offset | integer (Offset) >= 0 Default: 0 |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
| total required | integer (Total) |
| limit required | integer (Limit) |
| offset required | integer (Offset) |
{- "items": [
- {
- "bank_id": "user123",
- "content_hash": "abc123",
- "created_at": "2024-01-15T10:30:00Z",
- "id": "session_1",
- "memory_unit_count": 15,
- "tags": [
- "user_a",
- "session_123"
], - "text_length": 5420,
- "updated_at": "2024-01-15T10:30:00Z"
}
], - "limit": 100,
- "offset": 0,
- "total": 50
}List all chunks for a given document, ordered by chunk index.
| bank_id required | string (Bank Id) |
| document_id required | string (Document Id) |
| limit | integer (Limit) [ 1 .. 1000 ] Default: 100 Maximum number of chunks to return |
| offset | integer (Offset) >= 0 Default: 0 Offset for pagination |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
| total required | integer (Total) |
| limit required | integer (Limit) |
| offset required | integer (Offset) |
{- "items": [
- {
- "bank_id": "user123",
- "chunk_id": "user123_session_1_0",
- "chunk_index": 0,
- "chunk_text": "This is the first chunk of the document...",
- "created_at": "2024-01-15T10:30:00Z",
- "document_id": "session_1"
}
], - "total": 0,
- "limit": 0,
- "offset": 0
}Re-run the retain pipeline on an existing document without changing its content. This deletes the existing memory units and re-extracts facts using the current engine configuration. Useful when the LLM model, chunking strategy, or extraction settings have changed.
| bank_id required | string (Bank Id) |
| document_id required | string (Document Id) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
| operation_id required | string (Operation Id) |
| items_count required | integer (Items Count) |
{- "success": true,
- "operation_id": "string",
- "items_count": 0
}Get a specific document including its original text
| bank_id required | string (Bank Id) |
| document_id required | string (Document Id) |
Authorization (string) or Authorization (null) (Authorization) |
| id required | string (Id) |
| bank_id required | string (Bank Id) |
required | Original Text (string) or Original Text (null) (Original Text) |
required | Content Hash (string) or Content Hash (null) (Content Hash) |
| created_at required | string (Created At) |
| updated_at required | string (Updated At) |
| memory_unit_count required | integer (Memory Unit Count) |
Nodes By Fact Type (object) or Nodes By Fact Type (null) (Nodes By Fact Type) Memory count per fact type (world, experience, observation) | |
| tags | Array of strings (Tags) Default: [] Tags associated with this document |
Document Metadata (object) or Document Metadata (null) (Document Metadata) Document metadata | |
Retain Params (object) or Retain Params (null) (Retain Params) Parameters used during retain | |
Observation Scopes (string) or Array of Observation Scopes (strings) or Observation Scopes (null) (Observation Scopes) The observation_scopes spec configured at retain time (e.g. 'all_combinations', 'per_tag', or explicit tag-set lists), captured into retain_params. None when none was set (default 'combined' scoping) or for documents retained before this was captured. | |
Array of Attachments (objects) or Attachments (null) (Attachments) Attachments referenced by this document, when it was retained with inline content. Each carries a bank-scoped |
{- "bank_id": "user123",
- "content_hash": "abc123",
- "created_at": "2024-01-15T10:30:00Z",
- "document_metadata": {
- "channel": "#general",
- "source": "slack"
}, - "id": "session_1",
- "memory_unit_count": 15,
- "original_text": "Full document text here...",
- "retain_params": {
- "context": "Team meeting notes",
- "event_date": "2024-01-15"
}, - "tags": [
- "user_a",
- "session_123"
], - "updated_at": "2024-01-15T10:30:00Z"
}Update mutable fields on a document without re-processing its content.
Tags (tags): The array REPLACES the document's tags, it is not merged into them — send the complete set you want the document to end up with, and any tag you leave out is dropped. An empty array ([]) therefore clears every tag; only omitting the field entirely is rejected (422).
The new tags are propagated to all associated memory units. Observations derived from those units are invalidated and queued for re-consolidation under the new tags. Co-source memories from other documents that shared those observations are also reset. Tags are compared as a set, so re-sending the tags a document already has (in any order) changes nothing and queues no re-consolidation.
At least one field must be provided.
| bank_id required | string (Bank Id) |
| document_id required | string (Document Id) |
Authorization (string) or Authorization (null) (Authorization) |
Array of Tags (strings) or Tags (null) (Tags) The complete new set of tags for the document and its memory units — this REPLACES the existing tags rather than adding to them, so omitting a tag drops it and | |
Any of Array string | |
| success | boolean (Success) Default: true |
{- "tags": [
- "team-a",
- "team-b"
]
}{- "success": true
}Delete a document and all its associated memory units and links.
This will cascade delete:
This operation cannot be undone.
| bank_id required | string (Bank Id) |
| document_id required | string (Document Id) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
| message required | string (Message) |
| document_id required | string (Document Id) |
| memory_units_deleted required | integer (Memory Units Deleted) |
{- "document_id": "session_1",
- "memory_units_deleted": 5,
- "message": "Document 'session_1' and 5 associated memory units deleted successfully",
- "success": true
}Get a specific chunk by its ID
| chunk_id required | string (Chunk Id) |
Authorization (string) or Authorization (null) (Authorization) |
| chunk_id required | string (Chunk Id) |
| document_id required | string (Document Id) |
| bank_id required | string (Bank Id) |
| chunk_index required | integer (Chunk Index) |
| chunk_text required | string (Chunk Text) |
| created_at required | string (Created At) |
Array of Attachments (objects) or Attachments (null) (Attachments) Attachments referenced by this chunk's text, when it was retained with inline content. Each carries a bank-scoped |
{- "bank_id": "user123",
- "chunk_id": "user123_session_1_0",
- "chunk_index": 0,
- "chunk_text": "This is the first chunk of the document...",
- "created_at": "2024-01-15T10:30:00Z",
- "document_id": "session_1"
}Get a list of async operations for a specific agent, with optional filtering by status and operation type. Results are sorted by most recent first.
| bank_id required | string (Bank Id) |
Status (string) or Status (null) (Status) Filter by status: pending, processing, completed, failed, or cancelled | |
Type (string) or Type (null) (Type) Filter by operation type: retain, consolidation, refresh_mental_model, file_convert_retain, webhook_delivery | |
| limit | integer (Limit) [ 1 .. 100 ] Default: 20 Maximum number of operations to return |
| offset | integer (Offset) >= 0 Default: 0 Number of operations to skip |
| exclude_parents | boolean (Exclude Parents) Default: false Exclude parent batch operations from results |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) |
| total required | integer (Total) |
| limit required | integer (Limit) |
| offset required | integer (Offset) |
required | Array of objects (Operations) |
{- "bank_id": "user123",
- "limit": 20,
- "offset": 0,
- "operations": [
- {
- "created_at": "2024-01-15T10:30:00Z",
- "id": "550e8400-e29b-41d4-a716-446655440000",
- "items_count": 5,
- "status": "pending",
- "task_type": "retain"
}
], - "total": 150
}Get the status of a specific async operation. Returns 'pending', 'processing', 'completed', 'failed', or 'cancelled'. Completed operations remain queryable with their payload for the configured retention window and are pruned afterward.
| bank_id required | string (Bank Id) |
| operation_id required | string (Operation Id) |
| include_payload | boolean (Include Payload) Default: false Include the raw task payload (submission params) in the response. May be large. |
Authorization (string) or Authorization (null) (Authorization) |
| operation_id required | string (Operation Id) |
| status required | string (Status) Enum: "pending" "processing" "completed" "failed" "cancelled" "not_found" |
Operation Type (string) or Operation Type (null) (Operation Type) | |
Created At (string) or Created At (null) (Created At) | |
Updated At (string) or Updated At (null) (Updated At) | |
Completed At (string) or Completed At (null) (Completed At) | |
Error Message (string) or Error Message (null) (Error Message) | |
Retry Count (integer) or Retry Count (null) (Retry Count) Number of times this operation has been retried after failure. | |
Next Retry At (string) or Next Retry At (null) (Next Retry At) When the worker will next attempt this operation. For a pending operation, a value in the future indicates the task is parked — a refresh_mental_model held back by min_refresh_interval_seconds, or an extension raising DeferOperation — rather than awaiting immediate pickup. | |
OperationProgress (object) or null Last-known progress snapshot for a running operation; null if none was recorded. | |
Result Metadata (object) or Result Metadata (null) (Result Metadata) Internal metadata for debugging. Structure may change without notice. Not for production use. | |
RefreshMentalModelOperationDetails (object) or null Typed, per-operation-type outcome detail, discriminated by its own | |
Array of Child Operations (objects) or Child Operations (null) (Child Operations) Child operations for batch operations (if applicable) | |
Task Payload (object) or Task Payload (null) (Task Payload) Raw task payload (params the operation was submitted with). Only populated when include_payload=true. |
{- "completed_at": "2024-01-15T10:31:30Z",
- "created_at": "2024-01-15T10:30:00Z",
- "operation_id": "550e8400-e29b-41d4-a716-446655440000",
- "operation_type": "refresh_mental_model",
- "status": "completed",
- "updated_at": "2024-01-15T10:31:30Z"
}Cancel a queued or running async operation. A 'pending' operation is never started. A 'processing' one is cancelled cooperatively: the row is marked 'cancelled' immediately and the worker running it stops at its next checkpoint, so work already in flight may finish the batch it is on. This also clears operations stranded in 'processing' by a crashed worker. Returns 409 for operations that already reached a terminal state.
| bank_id required | string (Bank Id) |
| operation_id required | string (Operation Id) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
| message required | string (Message) |
| operation_id required | string (Operation Id) |
{- "message": "Operation 550e8400-e29b-41d4-a716-446655440000 cancelled",
- "operation_id": "550e8400-e29b-41d4-a716-446655440000",
- "success": true
}Re-queue a failed async operation so the worker picks it up again
| bank_id required | string (Bank Id) |
| operation_id required | string (Operation Id) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
| message required | string (Message) |
| operation_id required | string (Operation Id) |
{- "message": "Operation 550e8400-e29b-41d4-a716-446655440000 queued for retry",
- "operation_id": "550e8400-e29b-41d4-a716-446655440000",
- "success": true
}Permanently remove a failed, cancelled, or completed async operation record
| bank_id required | string (Bank Id) |
| operation_id required | string (Operation Id) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
| message required | string (Message) |
| operation_id required | string (Operation Id) |
{- "message": "Operation 550e8400-e29b-41d4-a716-446655440000 deleted",
- "operation_id": "550e8400-e29b-41d4-a716-446655440000",
- "success": true
}Import a bank template manifest to create or update a bank's configuration, mental models, and directives. If the bank does not exist it is created. Config fields are applied as per-bank overrides. Mental models are matched by id, directives by name — existing ones are updated, new ones are created. Use dry_run=true to validate the manifest without applying changes.
| bank_id required | string (Bank Id) |
| dry_run | boolean (Dry Run) Default: false Validate only, do not apply changes |
Authorization (string) or Authorization (null) (Authorization) |
| version required | string (Version) Manifest schema version (currently '1') |
BankTemplateConfig (object) or null Bank configuration to apply. Omit to leave config unchanged. | |
Array of Mental Models (objects) or Mental Models (null) (Mental Models) Mental models to create or update (matched by id). Omit to leave unchanged. | |
Array of Directives (objects) or Directives (null) (Directives) Directives to create or update (matched by name). Omit to leave unchanged. |
| bank_id required | string (Bank Id) Bank that was imported into |
| config_applied required | boolean (Config Applied) Whether bank config was updated |
| mental_models_created | Array of strings (Mental Models Created) Default: [] IDs of newly created mental models |
| mental_models_updated | Array of strings (Mental Models Updated) Default: [] IDs of updated mental models |
| directives_created | Array of strings (Directives Created) Default: [] Names of newly created directives |
| directives_updated | Array of strings (Directives Updated) Default: [] Names of updated directives |
| operation_ids | Array of strings (Operation Ids) Default: [] Operation IDs for mental model content generation (async) |
| dry_run | boolean (Dry Run) Default: false True if this was a validation-only run |
{- "bank": {
- "disposition_empathy": 5,
- "enable_observations": true,
- "reflect_mission": "You are helping a support agent remember customer interactions.",
- "retain_mission": "Extract customer issues, resolutions, and sentiment."
}, - "directives": [
- {
- "content": "Always respond with empathy and understanding.",
- "name": "Always be empathetic",
- "priority": 10
}
], - "mental_models": [
- {
- "id": "sentiment-overview",
- "name": "Customer Sentiment Overview",
- "source_query": "What is the overall sentiment trend?",
- "trigger": {
- "refresh_after_consolidation": true
}
}
], - "version": "1"
}{- "bank_id": "string",
- "config_applied": true,
- "mental_models_created": [ ],
- "mental_models_updated": [ ],
- "directives_created": [ ],
- "directives_updated": [ ],
- "operation_ids": [ ],
- "dry_run": false
}Export a bank's current configuration, mental models, and directives as a template manifest. The exported manifest can be imported into another bank to replicate the setup.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| version required | string (Version) Manifest schema version (currently '1') |
BankTemplateConfig (object) or null Bank configuration to apply. Omit to leave config unchanged. | |
Array of Mental Models (objects) or Mental Models (null) (Mental Models) Mental models to create or update (matched by id). Omit to leave unchanged. | |
Array of Directives (objects) or Directives (null) (Directives) Directives to create or update (matched by name). Omit to leave unchanged. |
{- "bank": {
- "disposition_empathy": 5,
- "enable_observations": true,
- "reflect_mission": "You are helping a support agent remember customer interactions.",
- "retain_mission": "Extract customer issues, resolutions, and sentiment."
}, - "directives": [
- {
- "content": "Always respond with empathy and understanding.",
- "name": "Always be empathetic",
- "priority": 10
}
], - "mental_models": [
- {
- "id": "sentiment-overview",
- "name": "Customer Sentiment Overview",
- "source_query": "What is the overall sentiment trend?",
- "trigger": {
- "refresh_after_consolidation": true
}
}
], - "version": "1"
}Removed. The synchronous whole-bank export loaded the entire bank into memory and held a database connection for the full request, which could exhaust memory and take down the shared API on large banks. Use the asynchronous POST /v1/default/banks/{bank_id}/document-transfer/export instead: it returns an operation_id, runs the export in the background, and exposes a download URL on completion.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
nullSubmit a transfer archive (produced by the export endpoint) for import into a bank. Runs as a background operation: facts are re-embedded with the target bank's embedding model and entities are re-resolved — no LLM extraction. Returns an operation_id; poll GET /v1/default/banks/{bank_id}/operations/{operation_id} for status and the imported/skipped counts in result_metadata. Use on_conflict to control existing document ids: skip (default), replace, or new-id.
| bank_id required | string (Bank Id) |
| on_conflict | string (On Conflict) Default: "skip" skip | replace | new-id |
Authorization (string) or Authorization (null) (Authorization) |
| file required | string <binary> (File) Transfer ZIP archive |
{- "operation_id": "string",
- "status": "pending"
}Submit an async export of a bank's documents (extracted facts, entity names, causal links, chunks) as a transfer ZIP archive. Embeddings and database ids are not included — importing re-embeds with the target bank's model and re-resolves entities. Runs as a background operation to avoid pinning the API on large banks. Returns an operation_id; poll GET /v1/default/banks/{bank_id}/operations/{operation_id}. On completion the operation's result_metadata carries download_url (fetch the ZIP from GET /v1/default/files/download/{key}), storage_key, byte_size, and filename. Pass document_id query params to export specific documents, or omit to export the whole bank; include_observations=true carries consolidated observations and include_knowledge_base=true carries Mental Models plus Knowledge Pages (all whole-bank export only).
| bank_id required | string (Bank Id) |
Array of Document Id (strings) or Document Id (null) (Document Id) Document id(s) to export; omit for all | |
| include_observations | boolean (Include Observations) Default: false Also export consolidated observations (restored on import; whole-bank only) |
| include_knowledge_base | boolean (Include Knowledge Base) Default: false Also export Mental Models and Knowledge Pages (restored on import; whole-bank only) |
Authorization (string) or Authorization (null) (Authorization) |
{- "operation_id": "string",
- "status": "pending"
}Stream a file previously written to file storage — currently the transfer ZIP produced by an async document export. The key comes from the export operation's result_metadata (storage_key / download_url). Access is authorized against the bank the key belongs to.
| key required | string (Key) |
Authorization (string) or Authorization (null) (Authorization) |
nullRegister a webhook endpoint to receive event notifications for this bank.
| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| url required | string (Url) HTTP(S) endpoint URL to deliver events to |
Secret (string) or Secret (null) (Secret) HMAC-SHA256 signing secret (optional) | |
| event_types | Array of strings (Event Types) Default: ["consolidation.completed"] List of event types to deliver. Supported: 'retain.completed', 'consolidation.completed', 'memory_defense.triggered'. |
| enabled | boolean (Enabled) Default: true Whether this webhook is active |
object (WebhookHttpConfig) HTTP delivery configuration (method, timeout, headers, params) |
| id required | string (Id) |
required | Bank Id (string) or Bank Id (null) (Bank Id) |
| url required | string (Url) |
Secret (string) or Secret (null) (Secret) Signing secret (redacted in responses) | |
| event_types required | Array of strings (Event Types) |
| enabled required | boolean (Enabled) |
object (WebhookHttpConfig) HTTP delivery configuration for a webhook. | |
Created At (string) or Created At (null) (Created At) | |
Updated At (string) or Updated At (null) (Updated At) |
{- "url": "string",
- "secret": "string",
- "event_types": [
- "consolidation.completed"
], - "enabled": true,
- "http_config": {
- "method": "POST",
- "timeout_seconds": 30,
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
}{- "id": "string",
- "bank_id": "string",
- "url": "string",
- "secret": "string",
- "event_types": [
- "string"
], - "enabled": true,
- "http_config": {
- "method": "POST",
- "timeout_seconds": 30,
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}, - "created_at": "string",
- "updated_at": "string"
}List the webhooks registered for a bank, oldest first. Paged: total reports every webhook on the bank.
| bank_id required | string (Bank Id) |
| limit | integer (Limit) [ 0 .. 1000 ] Default: 100 Maximum number of webhooks to return |
| offset | integer (Offset) >= 0 Default: 0 Offset for pagination |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
| total required | integer (Total) Total number of webhooks on the bank (ignores limit/offset) |
| limit required | integer (Limit) Maximum number of webhooks returned in this page |
| offset required | integer (Offset) Offset this page started at |
{- "items": [
- {
- "id": "string",
- "bank_id": "string",
- "url": "string",
- "secret": "string",
- "event_types": [
- "string"
], - "enabled": true,
- "http_config": {
- "method": "POST",
- "timeout_seconds": 30,
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}, - "created_at": "string",
- "updated_at": "string"
}
], - "total": 0,
- "limit": 0,
- "offset": 0
}Remove a registered webhook.
| bank_id required | string (Bank Id) |
| webhook_id required | string (Webhook Id) |
Authorization (string) or Authorization (null) (Authorization) |
| success required | boolean (Success) |
Message (string) or Message (null) (Message) | |
Deleted Count (integer) or Deleted Count (null) (Deleted Count) |
{- "deleted_count": 10,
- "message": "Deleted successfully",
- "success": true
}Update one or more fields of a registered webhook. Only provided fields are changed.
| bank_id required | string (Bank Id) |
| webhook_id required | string (Webhook Id) |
Authorization (string) or Authorization (null) (Authorization) |
Url (string) or Url (null) (Url) HTTP(S) endpoint URL | |
Secret (string) or Secret (null) (Secret) HMAC-SHA256 signing secret. Omit to keep existing; send null to clear. | |
Array of Event Types (strings) or Event Types (null) (Event Types) List of event types | |
Enabled (boolean) or Enabled (null) (Enabled) Whether this webhook is active | |
WebhookHttpConfig (object) or null HTTP delivery configuration |
| id required | string (Id) |
required | Bank Id (string) or Bank Id (null) (Bank Id) |
| url required | string (Url) |
Secret (string) or Secret (null) (Secret) Signing secret (redacted in responses) | |
| event_types required | Array of strings (Event Types) |
| enabled required | boolean (Enabled) |
object (WebhookHttpConfig) HTTP delivery configuration for a webhook. | |
Created At (string) or Created At (null) (Created At) | |
Updated At (string) or Updated At (null) (Updated At) |
{- "url": "string",
- "secret": "string",
- "event_types": [
- "string"
], - "enabled": true,
- "http_config": {
- "method": "POST",
- "timeout_seconds": 30,
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}
}{- "id": "string",
- "bank_id": "string",
- "url": "string",
- "secret": "string",
- "event_types": [
- "string"
], - "enabled": true,
- "http_config": {
- "method": "POST",
- "timeout_seconds": 30,
- "headers": {
- "property1": "string",
- "property2": "string"
}, - "params": {
- "property1": "string",
- "property2": "string"
}
}, - "created_at": "string",
- "updated_at": "string"
}Inspect delivery history for a webhook (useful for debugging).
| bank_id required | string (Bank Id) |
| webhook_id required | string (Webhook Id) |
| limit | integer (Limit) <= 200 Default: 50 Maximum number of deliveries to return |
Cursor (string) or Cursor (null) (Cursor) Pagination cursor (created_at of last item) |
Authorization (string) or Authorization (null) (Authorization) |
required | Array of objects (Items) |
Next Cursor (string) or Next Cursor (null) (Next Cursor) |
{- "items": [
- {
- "id": "string",
- "webhook_id": "string",
- "url": "string",
- "event_type": "string",
- "status": "string",
- "attempts": 0,
- "next_retry_at": "string",
- "last_error": "string",
- "last_response_status": 0,
- "last_response_body": "string",
- "last_attempt_at": "string",
- "created_at": "string",
- "updated_at": "string"
}
], - "next_cursor": "string"
}Upload files (PDF, DOCX, etc.), convert them to markdown, and retain as memories.
This endpoint handles file upload, conversion, and memory creation in a single operation.
Features:
The system automatically:
Use the operations endpoint to monitor progress.
Request format: multipart/form-data with:
files: One or more files to uploadrequest: JSON string with FileRetainRequest modelParser selection:
parser in the request body to override the server default for all files.parser inside a files_metadata entry for per-file control.['iris', 'markitdown']) to define an ordered fallback chain — each parser is tried in sequence until one succeeds.HINDSIGHT_API_FILE_PARSER) if not specified.| bank_id required | string (Bank Id) |
Authorization (string) or Authorization (null) (Authorization) |
| files required | Array of strings <binary> (Files) [ items <binary > ] Files to upload and convert |
| request required | string (Request) JSON string with FileRetainRequest model |
| operation_ids required | Array of strings (Operation Ids) Operation IDs for tracking file conversion operations. Use GET /v1/default/banks/{bank_id}/operations to list operations. |
{- "operation_ids": [
- "550e8400-e29b-41d4-a716-446655440000",
- "550e8400-e29b-41d4-a716-446655440001",
- "550e8400-e29b-41d4-a716-446655440002"
]
}List audit log entries for a bank, ordered by most recent first.
| bank_id required | string (Bank Id) |
Action (string) or Action (null) (Action) Filter by action type | |
Transport (string) or Transport (null) (Transport) Filter by transport (http, mcp, system) | |
Start Date (string) or Start Date (null) (Start Date) Filter from this ISO datetime (inclusive) | |
End Date (string) or End Date (null) (End Date) Filter until this ISO datetime (exclusive) | |
| limit | integer (Limit) [ 1 .. 500 ] Default: 50 Max items to return |
| offset | integer (Offset) >= 0 Default: 0 Offset for pagination |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) |
| total required | integer (Total) |
| limit required | integer (Limit) |
| offset required | integer (Offset) |
required | Array of objects (Items) |
{- "bank_id": "string",
- "total": 0,
- "limit": 0,
- "offset": 0,
- "items": [
- {
- "id": "string",
- "action": "string",
- "transport": "string",
- "bank_id": "string",
- "started_at": "string",
- "ended_at": "string",
- "duration_ms": 0,
- "request": { },
- "response": { },
- "metadata": { }
}
]
}Get audit log counts grouped by time bucket for charting.
| bank_id required | string (Bank Id) |
Action (string) or Action (null) (Action) Filter by action type | |
| period | string (Period) Default: "7d" Time period: 1d, 7d, or 30d |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) |
| period required | string (Period) |
| trunc required | string (Trunc) |
| start required | string (Start) |
required | Array of objects (Buckets) |
{- "bank_id": "string",
- "period": "string",
- "trunc": "string",
- "start": "string",
- "buckets": [
- {
- "time": "string",
- "actions": {
- "property1": 0,
- "property2": 0
}, - "total": 0
}
]
}List traced LLM requests for a bank, ordered by most recent first. Requires LLM request tracing to be enabled (HINDSIGHT_API_LLM_TRACE_ENABLED).
| bank_id required | string (Bank Id) |
Status (string) or Status (null) (Status) Filter by status (success, error) | |
Operation (string) or Operation (null) (Operation) Filter by operation (retain, reflect, consolidation) | |
Scope (string) or Scope (null) (Scope) Filter by call scope | |
Provider (string) or Provider (null) (Provider) Filter by LLM provider | |
Trace Id (string) or Trace Id (null) (Trace Id) Filter to one operation run (all LLM calls sharing a trace) | |
Document Id (string) or Document Id (null) (Document Id) Filter to LLM calls that processed a given document | |
Memory Id (string) or Memory Id (null) (Memory Id) Filter to the operation run(s) that produced or consumed a given memory_unit | |
| group | boolean (Group) Default: false Paginate by operation run (trace) instead of by call; returns whole runs |
Start Date (string) or Start Date (null) (Start Date) Filter from this ISO datetime (inclusive) | |
End Date (string) or End Date (null) (End Date) Filter until this ISO datetime (exclusive) | |
| limit | integer (Limit) [ 1 .. 500 ] Default: 50 Max items to return |
| offset | integer (Offset) >= 0 Default: 0 Offset for pagination |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) |
| total required | integer (Total) |
| limit required | integer (Limit) |
| offset required | integer (Offset) |
required | Array of objects (Items) |
{- "bank_id": "string",
- "total": 0,
- "limit": 0,
- "offset": 0,
- "items": [
- {
- "id": "string",
- "bank_id": "string",
- "operation": "string",
- "scope": "string",
- "trace_id": "string",
- "span_id": "string",
- "parent_span_id": "string",
- "provider": "string",
- "model": "string",
- "status": "string",
- "started_at": "string",
- "ended_at": "string",
- "duration_ms": 0,
- "input_tokens": 0,
- "output_tokens": 0,
- "cached_tokens": 0,
- "total_tokens": 0,
- "input": null,
- "output": null,
- "error": "string",
- "llm_info": { },
- "metadata": { }
}
]
}Get LLM request counts grouped by time bucket and status for charting.
| bank_id required | string (Bank Id) |
Operation (string) or Operation (null) (Operation) Filter by operation | |
| period | string (Period) Default: "7d" Time period: 1d, 7d, or 30d |
Authorization (string) or Authorization (null) (Authorization) |
| bank_id required | string (Bank Id) |
| period required | string (Period) |
| trunc required | string (Trunc) |
| start required | string (Start) |
required | Array of objects (Buckets) |
{- "bank_id": "string",
- "period": "string",
- "trunc": "string",
- "start": "string",
- "buckets": [
- {
- "time": "string",
- "statuses": {
- "property1": 0,
- "property2": 0
}, - "total": 0,
- "tokens": {
- "input": 0,
- "output": 0,
- "cached": 0,
- "total": 0
}
}
]
}