Memories
Methods on this page are called as client.memories.<method>(...) where client is either a synchronous Goodmem or asynchronous AsyncGoodmem instance initialized below:
from goodmem import Goodmem
client = Goodmem(base_url='http://localhost:8080', api_key='gm_...')from goodmem import AsyncGoodmem
client = AsyncGoodmem(base_url='http://localhost:8080', api_key='gm_...')Create a new memory
Create a memory from text content, base64-encoded content, or a local file. Content must be provided via exactly one of file_path, original_content, or original_content_b64.
- space_id (
str) — ID of the space where this memory will be stored - chunking_config (
ChunkingConfiguration, optional) — Chunking strategy for this memory (if not provided, uses space default) - content_type (
str, optional) — MIME type of the content. Auto-inferred as"text/plain"fororiginal_content, or from the file extension forfile_path. Required when usingoriginal_content_b64. - extract_page_images (
bool, optional) — Optional hint to extract page images for eligible document types (for example, PDFs) - file_path (
str, optional) — Path to a local file to upload. Mutually exclusive withoriginal_contentandoriginal_content_b64. - memory_id (
str, optional) — Optional client-provided UUID for the memory. If omitted, the server generates one. Returns ALREADY_EXISTS if the ID is already in use. - metadata (
dict[str, Any], optional) — Metadata for the memory. Any JSON-serializable dict. Can be nested. Can be used for filtering in memory list operation. (e.g.{"author": "John Doe", "tags": ["production", "urgent"]}) - original_content (
str, optional) — Original content as plain text. Mutually exclusive withfile_pathandoriginal_content_b64. - original_content_b64 (
str, optional) — Original content as base64-encoded binary data. Mutually exclusive withfile_pathandoriginal_content. - original_content_ref (
str, optional) — Reference to external content location. Functions as a metadata field. Does not make Goodmem download the content from the URL and use it to create memory.
Memory — Returns the memory.
memory = client.memories.create(
space_id="your-space-id",
original_content=(
"GoodMem stores and retrieves vectorized memories "
"for RAG applications."
),
metadata={"source": "sdk-doc-test"},
)# file_path = "path/to/your/file.txt"
memory = client.memories.create(
space_id="your-space-id",
file_path=file_path,
)import base64
content_b64 = base64.b64encode(b"Base64-encoded content.").decode()
memory = client.memories.create(
space_id="your-space-id",
original_content_b64=content_b64,
content_type="text/plain",
)Retrieve Memories
Performs a streaming semantic search across one or more memory spaces and returns matching chunks ranked by relevance as well as LLM-postprocessed results (like summarization, question-answering, etc.).
- message (
str) — Primary query/message for semantic search. - chronological_resort (
bool, optional) — A convenience shorthand forpost_processor.config.chronological_resort. Re-sort retrieved memories chronologically after semantic ranking. Defaults to true on the server. Only applies whenllm_idorreranker_idis set. Cannot be used together withpost_processor. - context (
list[ContextItem], optional) — Optional context items (text or binary) to provide additional context for the search. - fetch_memory (
bool, optional, server default=True) — IfTrue, memory definition events are streamed. Set toFalseto skip them. - fetch_memory_content (
bool, optional, server default=False) — IfTrue, includes the raw content of each memory in the response. Only applicable whenfetch_memoryisTrue. - gen_token_budget (
int, optional) — A convenience shorthand forpost_processor.config.gen_token_budget. Token budget for LLM post-processing. Must be positive. If the token budget is insufficient, the server will return an error. Defaults to 512 on the server. Only applies whenllm_idis set. Cannot be used together withpost_processor. - hnsw (
HnswOptions, optional) — Optional request-level HNSW tuning overrides. Advanced usage; available on POST retrieve. - llm_id (
str, optional) — A convenience shorthand forpost_processor.config.llm_id. The ID of the LLM to process the retrieved memories, e.g., RAG. Assembles the nested PostProcessor structure automatically. If unset, no LLM will be used. Settingllm_idorreranker_idactivates post-processing; the remaining post-processor params below (llm_temp,gen_token_budget, etc.) only take effect when at least one is set. Cannot be used together withpost_processor. - llm_temp (
float, optional) — A convenience shorthand forpost_processor.config.llm_temp. LLM temperature for post-processing. Valid range is 0.0-2.0. Defaults to 0.3 on the server. Only applies whenllm_idis set. Cannot be used together withpost_processor. - logging (
LoggingOptions, optional) — Optional durable request logging block for POST retrieve requests. Supply logging.enabled=true to opt in, and optionally attach flat scalar logging.caller_attributes for persisted experiment or tracing metadata. - max_results (
int, optional) — A convenience shorthand forpost_processor.config.max_results. Maximum number of retrieved memories to return. Must be positive. Defaults to 10 on the server. Only applies whenllm_idorreranker_idis set. Cannot be used together withpost_processor. - post_processor (
PostProcessor, optional) — Optional post-processor configuration to transform retrieval results. Can also be set via the convenience shorthandsllm_id,reranker_id,llm_temp,gen_token_budget,relevance_threshold,max_results,prompt,sys_prompt, andchronological_resort. Use eitherpost_processoror the shorthands, not both. - prompt (
str, optional) — A convenience shorthand forpost_processor.config.prompt. Custom prompt for LLM post-processing. If unset, the server's default prompt is used. Only applies whenllm_idis set. Cannot be used together withpost_processor. - relevance_threshold (
float, optional) — A convenience shorthand forpost_processor.config.relevance_threshold. Minimum relevance score for retrieved memories. Only applies whenreranker_idis set. Cannot be used together withpost_processor. - requested_size (
int, optional) — Maximum number of memories to retrieve. - reranker_id (
str, optional) — A convenience shorthand forpost_processor.config.reranker_id. The ID of the reranker to process the retrieved memories. If unset, no reranker will be used. Cannot be used together withpost_processor. - space_ids (
list[str], optional) — A convenience shorthand forspace_keys. A list of space UUID strings, converted to thespace_keysstructure the API requires. Exactly one ofspace_idsandspace_keysmust be provided. - space_keys (
list[SpaceKey], optional) — Full space configuration for retrieval — a list of SpaceKey dicts, each with a requiredspace_idand optionalembedder_weights(per-embedder weight overrides) andfilter(metadata filter expression). Use this instead ofspace_idswhen you need per-space weight tuning or filtering. Can also be set via the convenience shorthandspace_ids. Exactly one ofspace_idsandspace_keysmust be provided. - stream (
bool, optional, SDK default=True) — IfTrue(default), returns a RetrieveMemoryStream context manager that yields events as they arrive from the server. IfFalse, collects all events and returns a plainlist[RetrieveMemoryEvent]. - sys_prompt (
str, optional) — A convenience shorthand forpost_processor.config.sys_prompt. System prompt for LLM post-processing. If unset, the server's default system prompt is used. Only applies whenllm_idis set. Cannot be used together withpost_processor.
events = client.memories.retrieve(
message="What is GoodMem?",
space_ids=["your-space-id"],
requested_size=5,
stream=False,
)
for event in events:
if event.retrieved_item:
chunk = event.retrieved_item.chunk
print(chunk.chunk.chunk_text[:80], chunk.relevance_score)with client.memories.retrieve(
message="What is GoodMem?",
space_ids=["your-space-id"],
requested_size=5,
) as stream:
for event in stream:
if event.retrieved_item:
chunk = event.retrieved_item.chunk
print(chunk.chunk.chunk_text[:80], chunk.relevance_score)Get a memory by ID
Retrieves a single memory by its ID.
PERMISSION CLARIFICATION: With READ_MEMORY_OWN permission, access is granted if you own the parent space OR if the parent space is public (public_read=true). With READ_MEMORY_ANY permission, you can access any memory regardless of ownership. This is a read-only operation with no side effects and is safe to retry. Returns NOT_FOUND if the memory or its parent space does not exist.
- id (
str) — The UUID of the memory to retrieve - include_content (
bool, optional, server default=False) — Whether to include the original content in the response (defaults to false). - include_processing_history (
bool, optional, server default=False) — Whether to include background job processing history in the response (defaults to false).
Memory — Returns the memory.
memory = client.memories.get(id="your-memory-id")
print(memory.processing_status)Download memory content
Returns the original binary payload for a memory. The response uses the memory's stored content type when available. Returns 404 when the memory does not have inline content; clients can check original_content_ref from the metadata endpoint to locate external content.
- id (
str) — The UUID of the memory to download
bytescontent = client.memories.content(id="your-memory-id")
print(content[:80])List memory page images
Lists extracted page-image metadata for a memory with optional filters and pagination.
- id (
str) — Memory UUID - content_type (
str, optional) — Optional rendition filter for page-image MIME type, such as image/png. - dpi (
int, optional) — Optional rendition filter for page-image DPI. - end_page_index (
int, optional) — Optional upper bound for returned page indices, inclusive. - max_results (
int, optional) — Maximum number of results per page. - next_token (
str, optional) — Opaque pagination token for the next page. Do not parse or construct it. - start_page_index (
int, optional) — Optional lower bound for returned page indices, inclusive.
page_images = list(client.memories.pages(id="your-page-img-memory-id"))
for pi in page_images:
print(pi.page_index, pi.content_type)Download memory page image content
Downloads inline bytes for one page image. The page index is required. The optional dpi and content type query parameters act as rendition filters; if omitted, the server returns the unique rendition for that page or rejects ambiguous matches.
- id (
str) — Memory UUID - page_index (
int) — 0-based page index - content_type (
str, optional) — Optional rendition filter. MIME type of the desired page image, such as image/png. - dpi (
int, optional) — Optional rendition filter. If omitted, the unique page-image rendition for the page is returned; if multiple renditions exist, specify dpi and/or content_type.
bytesimage_bytes = client.memories.pages_image(
id="your-page-img-memory-id",
page_index=0,
)
print(f"Downloaded {len(image_bytes)} bytes")List memories in a space
Lists memories within a given space. Results are paginated — the returned Page eagerly fetches the first page. Access .data for items and .next_token to resume. Use for mem in page to auto-paginate all pages, page_size to control items per API call, and max_items to cap total results.
- space_id (
str) — The UUID of the space containing the memories - filter (
str, optional) — Metadata filter expression for list results. See Metadata Filters Guide and Filter Expressions Reference for usage. - include_content (
bool, optional, server default=False) — Whether to include the original content in the response (defaults to false). - include_processing_history (
bool, optional, server default=False) — Whether to include background job processing history in the response (defaults to false). - max_items (
int, optional) — Maximum total number of items to return across all pages. When set, iteration stops after this many items. If left unset, all pages will be fetched. - next_token (
str, optional) — Opaque pagination token for the next page. URL-safe Base64 without padding; do not parse or construct it. - page_size (
int, optional, server default=50) — Number of results per page (defaults to 50, clamped to [1, 500] by the server). A smaller value will reduce the latency of each page — so you get items faster each page, but increase the number of requests made to the server. Usemax_itemsto cap total results. - sort_by (
str, optional) — Field to sort by (e.g., 'created_at'). - sort_order (
SortOrder, optional) — Sort direction (ASCENDING or DESCENDING). - status_filter (
str, optional) — Filter memories by processing status (PENDING, PROCESSING, COMPLETED, FAILED).
for mem in client.memories.list(space_id="your-space-id"):
print(mem.memory_id, mem.processing_status)# Get first page
page = client.memories.list(space_id="your-space-id", page_size=1)
saved_token = page.next_token
# Resume from saved token later
if saved_token:
for mem in client.memories.list(
space_id="your-space-id", next_token=saved_token
):
print(mem.memory_id)Delete a memory
Permanently deletes a memory and its associated chunks. This operation cannot be undone and immediately removes the memory record from the database.
IDEMPOTENCY: This operation is safe to retry - may return NOT_FOUND if the memory was already deleted or never existed. Requires DELETE_MEMORY_OWN permission for memories in spaces you own (or DELETE_MEMORY_ANY for admin users to delete any memory). Side effects include permanent removal of the memory record and all associated chunk data.
- id (
str) — The UUID of the memory to delete
Noneclient.memories.delete(id="your-memory-id")Create multiple memories in a batch
Creates multiple memories in a single operation, with individual success/failure results.
- requests (
list[MemoryCreationRequest]) — List of memory creation requests. Import viafrom goodmem.api.memories import MemoryCreationRequest. Unlike the raw JsonMemoryCreationRequest,content_typeis optional and auto-inferred for text content.
BatchMemoryResponse — Returns per-item results for the batch operation.
from goodmem.api.memories import MemoryCreationRequest
result = client.memories.batch_create(requests=[
MemoryCreationRequest(
space_id="your-space-id",
original_content="Batch memory one.",
),
MemoryCreationRequest(
space_id="your-space-id",
original_content="Batch memory two.",
),
])Get multiple memories by ID
Retrieves multiple memories in a single operation, with individual success/failure results.
- memory_ids (
list[str]) — Array of memory IDs to retrieve - include_content (
bool, optional) — Whether to include the original content in the response - include_processing_history (
bool, optional) — Whether to include background job processing history for each memory
BatchMemoryResponse — Returns per-item results for the batch operation.
result = client.memories.batch_get(memory_ids=["your-memory-id-1", "your-memory-id-2"])
for r in result.results:
print(r.memory.memory_id, r.memory.processing_status)Delete memories in batch
Deletes memories using selector entries. Each selector can target either a specific memory ID or a filtered subset scoped to a specific space.
- requests (
list[BatchDeleteMemorySelectorRequest]) — Array of delete selectors
BatchMemoryResponse — Returns per-item results for the batch operation.
result = client.memories.batch_delete(
requests=[{"memory_id": mid} for mid in ["your-memory-id-1", "your-memory-id-2"]],
)
for r in result.results:
print(r.success)Async usage: client.memories exposes the same methods on AsyncGoodmem; use await / async for as needed.
Data Models
All data models are pydantic v2 models. Fields are shown with their Python attribute names; JSON responses use camelCase aliases (e.g., owner_id → ownerId).
Memory
Memory object containing stored content and metadata
- memory_id (
str) — Unique identifier of the memory - space_id (
str) — ID of the space containing this memory - original_content (
bytes, optional) — Original content (only included if requested) - original_content_length (
int, optional) — Size in bytes of the inline original content - original_content_sha256 (
str, optional) — SHA-256 digest of the inline original content, hex encoded - original_content_ref (
str, optional) — Reference to external content location - content_type (
str) — MIME type of the content - processing_status (
str) — Processing status of the memory - page_image_status (
str) — Processing status of page-image extraction for this memory - page_image_count (
int) — Number of extracted page-image renditions linked to this memory - metadata (
dict[str, Any], optional) — Additional metadata for the memory - created_at (
int) — Timestamp when the memory was created (milliseconds since epoch) - updated_at (
int) — Timestamp when the memory was last updated (milliseconds since epoch) - created_by_id (
str) — ID of the user who created this memory - updated_by_id (
str) — ID of the user who last updated this memory - chunking_config (
ChunkingConfiguration, optional) — Chunking strategy used for this memory - processing_history (
ProcessingHistory, optional) — Background job processing history associated with this memory
ProcessingHistory
Background job execution history associated with a memory
- latest_job (
BackgroundJobSummary, optional) — Summary of the most recent background job - attempts (
list[BackgroundJobAttempt], optional) — Attempt-level telemetry captured for the latest job
BackgroundJobSummary
Summary of the most recent background job execution for a resource
- job_id (
int) — Database identifier of the background job - job_type (
str) — Logical job type dispatched by the background job framework - status (
str) — Current status of the background job - attempts (
int) — Number of attempts started so far - max_attempts (
int) — Maximum number of attempts allowed for this job - run_at (
int, optional) — Timestamp when the job becomes eligible to run (milliseconds since epoch) - lease_until (
int, optional) — Lease expiration timestamp if the job is currently running (milliseconds since epoch) - locked_by (
str, optional) — Identifier of the worker currently holding the lease, if any - last_error (
str, optional) — Most recent short error message if the job failed - updated_at (
int, optional) — Timestamp when the job row was last updated (milliseconds since epoch)
BackgroundJobAttempt
Telemetry captured for a single execution attempt of a background job
- attempt_id (
int) — Identifier of the attempt - job_id (
int) — Identifier of the job that owns this attempt - started_at (
int, optional) — Attempt start timestamp (milliseconds since epoch) - finished_at (
int, optional) — Attempt completion timestamp (milliseconds since epoch) - ok (
bool, optional) — Indicates whether the attempt succeeded (null if still running) - worker_id (
str, optional) — Identifier of the worker processing the attempt - status_message (
str, optional) — Latest status message reported by the worker - progress_current (
int) — Current progress counter value - progress_total (
int, optional) — Total progress target when known - progress_unit (
str, optional) — Unit label associated with the progress counters - progress_updated_at (
int, optional) — Timestamp when progress was last updated (milliseconds since epoch) - error_message (
str, optional) — Short error message recorded when the attempt failed - error_stacktrace (
str, optional) — Stack trace captured when the attempt failed, if available
ContextItem
Context item with either text or binary content.
- text (
str, optional) — Text content for this context item. - binary (
BinaryContent, optional) — Binary content for this context item.
BinaryContent
Binary content with MIME type for context items.
- content_type (
str) — MIME type of the binary content. - data (
str) — Base64-encoded binary data.
SpaceKey
Space configuration for retrieval operations with optional embedder weight overrides.
- space_id (
str) — The UUID for the space to search. - embedder_weights (
list[EmbedderWeight], optional) — Optional per-embedder weight overrides for this space. If not specified, database defaults are used. - filter (
str, optional) — Optional filter expression that must evaluate to true for memories in this space.
EmbedderWeight
Per-embedder weight override for retrieval operations.
- embedder_id (
str) — The UUID for the embedder. - weight (
float) — The weight to apply to this embedder's results. Can be positive, negative, or zero.
HnswOptions
Optional request-level overrides for pgvector HNSW search settings. Unset fields inherit server defaults.
- ef_search (
int, optional) — HNSW candidate list size (1..1000). - iterative_scan (
HnswIterativeScan, optional) — HNSW iterative scan mode. Use POST retrieve for this advanced tuning control. - max_scan_tuples (
int, optional) — Maximum tuples to scan during iterative filtering (1..2147483647). - scan_mem_multiplier (
float, optional) — Multiplier on work_mem for iterative scanning (1.0..1000.0).
HnswIterativeScan
String enum: "ITERATIVE_SCAN_UNSPECIFIED" · "ITERATIVE_SCAN_OFF" · "ITERATIVE_SCAN_RELAXED_ORDER" · "ITERATIVE_SCAN_STRICT_ORDER"
PostProcessor
Post-processor configuration for transforming retrieval results. Custom processors are discovered from installed extensions and must be referenced by their fully qualified factory class name. See https://docs.goodmem.ai/docs/reference/post-processors/chat-post-processor/ for the built-in ChatPostProcessor configuration.
- name (
str) — Fully qualified factory class name of the post-processor to apply. - config (
dict[str, Any], optional) — Configuration parameters for the post-processor. Fields depend on the selected processor; see the linked documentation for the built-in ChatPostProcessor schema.
LoggingOptions
LoggingOptions
- enabled (
bool) — Opts this request in to durable server-side request logging. - caller_attributes (
dict[str, Any], optional) — Optional flat scalar attributes attached to the persisted log row. Supported value types are string, integer, floating-point, and boolean.
RetrieveMemoryStream
A synchronous context-manager / iterator that streams RetrieveMemoryEvent objects from the server as they arrive over an HTTP streaming response (NDJSON or SSE). Use it with a with statement; iterate over the stream inside the block.
- event (
RetrieveMemoryEvent) — Each iteration yields one event from the server.
RetrieveMemoryEvent
Streaming event from memory retrieval operation
- result_set_boundary (
ResultSetBoundary, optional) — Result set boundary marker (BEGIN/END) - abstract_reply (
AbstractReply, optional) — Generated abstractive reply - retrieved_item (
RetrievedItem, optional) — A retrieved memory or chunk - memory_definition (
Memory, optional) — Memory object to add to client's memories array - status (
GoodMemStatus, optional) — Warning or non-fatal status with granular codes (operation continues)
ResultSetBoundary
Boundary marker for logical result sets in streaming memory retrieval
- result_set_id (
str) — Unique identifier for this result set (UUID) - kind (
Literal['BEGIN', 'END']) — Type of boundary marker - stage_name (
str) — Free-form label describing the pipeline stage - expected_items (
int, optional) — Hint for progress tracking - expected number of items in this result set
AbstractReply
Generated abstractive reply with relevance information
- text (
str) — Generated abstractive reply text - relevance_score (
float) — Relevance score for this reply (0.0 to 1.0) - result_set_id (
str, optional) — Optional result set ID linking this abstract to a specific result set
RetrievedItem
A retrieved result that can be either a Memory or MemoryChunk
- memory (
Memory, optional) — Complete memory object (if retrieved) - chunk (
ChunkReference, optional) — Reference to a memory chunk (if retrieved)
ChunkReference
Reference to a memory chunk with pointer to its parent memory
- result_set_id (
str) — Result set ID that produced this chunk - chunk (
MemoryChunkResponse) — The memory chunk data - memory_index (
int) — Index of the chunk's memory in the client's memories array - relevance_score (
float) — Relevance score for this chunk (0.0 to 1.0)
MemoryChunkResponse
Memory chunk information
- chunk_id (
str) — Unique identifier of the memory chunk - memory_id (
str) — ID of the memory this chunk belongs to - chunk_sequence_number (
int) — Sequence number of this chunk within the memory - chunk_text (
str) — The text content of this chunk - vector_status (
str) — Status of vector processing for this chunk - start_offset (
int, optional) — Start offset of this chunk in the original content - end_offset (
int, optional) — End offset of this chunk in the original content - metadata (
dict[str, Any], optional) — Additional metadata for the memory chunk - created_at (
int) — Creation timestamp (milliseconds since epoch) - updated_at (
int) — Last update timestamp (milliseconds since epoch) - created_by_id (
str) — ID of the user who created the chunk - updated_by_id (
str) — ID of the user who last updated the chunk
ListMemoryPageImagesResponse
Page of memory page-image metadata
- page_images (
list[MemoryPageImage]) — Page-image metadata rows - next_token (
str, optional) — Opaque token for retrieving the next page
MemoryPageImage
Metadata for one memory page-image rendition
- memory_id (
str) — Memory UUID - page_index (
int) — 0-based page index - dpi (
int) — Render DPI - content_type (
str) — Image MIME type - image_content_length (
int, optional) — Image byte length - image_content_sha256 (
str, optional) — Hex-encoded SHA-256 digest of image content - created_at (
int) — Creation timestamp (milliseconds since epoch) - updated_at (
int) — Last update timestamp (milliseconds since epoch) - created_by_id (
str) — Creator user UUID - updated_by_id (
str) — Last updater user UUID
MemoryListResponse
Response containing a list of memories within a space
- memories (
list[Memory]) — Array of memories in the space - next_token (
str, optional) — Token for retrieving the next page of results
JsonMemoryCreationRequest
Request body for creating a new Memory. A Memory represents content stored in a space.
- memory_id (
str, optional) — Optional client-provided UUID for the memory. If omitted, the server generates one. Returns ALREADY_EXISTS if the ID is already in use. - space_id (
str) — ID of the space where this memory will be stored - original_content (
str, optional) — Original content as plain text (use either this or original_content_b64) - original_content_b64 (
str, optional) — Original content as base64-encoded binary data (use either this or original_content) - original_content_ref (
str, optional) — Reference to external content location - content_type (
str) — MIME type of the content - metadata (
dict[str, Any], optional) — Additional metadata for the memory - chunking_config (
ChunkingConfiguration, optional) — Chunking strategy for this memory (if not provided, uses space default) - extract_page_images (
bool, optional) — Optional hint to extract page images for eligible document types (for example, PDFs) - file_field (
str, optional) — Optional multipart file field name to bind binary content; required when multiple files are uploaded in a batch multipart request.
BatchMemoryResponse
Response containing per-item results for a batch memories operation
- results (
list[BatchMemoryResult]) — Array of per-item results - total_deleted (
int, optional) — Total number of memories deleted across all selectors
BatchMemoryResult
Individual item result for a batch memories operation
- success (
bool) — Whether this individual operation succeeded - memory_id (
str, optional) — Memory ID associated with this result (present for batch_get errors and batch_delete results) - memory (
Memory, optional) — Created or retrieved memory (present when the operation returns a memory on success) - error (
ErrorDetail, optional) — Error details when success is false - request_index (
int, optional) — 0-based index into the original batch request selectors - deleted_count (
int, optional) — Number of rows deleted by this selector
ErrorDetail
Structured error details for an individual batch operation result
- code (
int) — Numeric error code (typically an HTTP or gRPC-derived status code) - message (
str) — Human-readable error message
MemoryCreationRequest
Convenience version — content_type is optional (auto-inferred for text).
- memory_id (
str, optional) — Optional client-provided UUID for the memory. If omitted, the server generates one. Returns ALREADY_EXISTS if the ID is already in use. - space_id (
str) — ID of the space where this memory will be stored - original_content (
str, optional) — Original content as plain text (use either this or original_content_b64) - original_content_b64 (
str, optional) — Original content as base64-encoded binary data (use either this or original_content) - original_content_ref (
str, optional) — Reference to external content location - content_type (
str, optional) — MIME type of the content. Auto-inferred as 'text/plain' when original_content is a string. - metadata (
dict[str, Any], optional) — Additional metadata for the memory - chunking_config (
ChunkingConfiguration, optional) — Chunking strategy for this memory (if not provided, uses space default) - extract_page_images (
bool, optional) — Optional hint to extract page images for eligible document types (for example, PDFs) - file_field (
str, optional) — Optional multipart file field name to bind binary content; required when multiple files are uploaded in a batch multipart request.
BatchDeleteMemorySelectorRequest
A single delete selector: either memory_id or filter_selector
- memory_id (
str, optional) — Deletes one specific memory by UUID - filter_selector (
FilteredDeleteMemorySelectorRequest, optional) — Deletes a filtered set of memories within a specific space
FilteredDeleteMemorySelectorRequest
Filtered selector scoped to a specific space
- space_id (
str) — Space ID scope for the filtered delete - status_filter (
str, optional) — Optional processing status filter (PENDING, PROCESSING, COMPLETED, FAILED) - filter (
str, optional) — Optional metadata filter expression