GoodMem
ReferenceAPIgRPC API

Memory

Memory service API reference

Services

MemoryService Service


CRUD & batch RPC surface

Provides services for creating, retrieving, and managing memories.

Authentication: All methods require API key authentication.

Global errors: All RPCs may return DEADLINE_EXCEEDED, CANCELLED, UNAVAILABLE, RESOURCE_EXHAUSTED, INTERNAL.

Permissions model:

  • *_MEMORY_OWN: Allows operations on memories within spaces owned by the caller.
  • *_MEMORY_ANY: Allows operations on memories in any space (requires elevated role).

CreateMemory

Creates a new Memory in a specified Space.

Type
Requestgoodmem.v1.CreateMemoryRequest
Responsegoodmem.v1.Memory

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: CREATE_MEMORY_OWN or CREATE_MEMORY_ANY

Side Effects:

  • Creates a new Memory record with status PENDING
  • Enqueues a background job to process the memory (chunking and embedding)

Error Codes:

  • UNAUTHENTICATED: Missing or invalid auth token
  • PERMISSION_DENIED: Caller lacks permission to create memories in the specified space
  • INVALID_ARGUMENT: space_id, original_content, or content_type is missing or invalid
  • NOT_FOUND: The specified space_id does not exist

Idempotency: Not idempotent. Clients should not retry on unknown errors.

GetMemory

Retrieves a single Memory by its ID.

Type
Requestgoodmem.v1.GetMemoryRequest
Responsegoodmem.v1.Memory

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: READ_MEMORY_OWN or READ_MEMORY_ANY

Note: For users with only READ_MEMORY_OWN, access is granted if they own the parent space OR if the parent space is public.

Error Codes:

  • UNAUTHENTICATED: Missing or invalid auth token
  • PERMISSION_DENIED: Caller lacks permission to read the memory
  • INVALID_ARGUMENT: memory_id is invalid
  • NOT_FOUND: The specified memory or its parent space does not exist

Idempotency: Read-only; safe to retry.

ListMemoryPageImages

Lists extracted page-image renditions for a single Memory.

Type
Requestgoodmem.v1.ListMemoryPageImagesRequest
Responsegoodmem.v1.ListMemoryPageImagesResponse

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: READ_MEMORY_OWN or READ_MEMORY_ANY

Pagination: max_results defaults to 50 and is clamped to [1, 500]. next_token is an opaque URL-safe Base64 string without padding; do not parse or construct it. The encoding may change without notice.

Error Codes:

  • UNAUTHENTICATED: Missing or invalid auth token
  • PERMISSION_DENIED: Caller lacks permission to read the memory
  • INVALID_ARGUMENT: Request filters are invalid (e.g., negative page index, malformed token)
  • NOT_FOUND: The specified memory does not exist

Idempotency: Read-only; safe to retry.

GetMemoryPageImageContent

Retrieves inline bytes for one page-image rendition.

page_index is required. dpi and content_type are optional filters: if omitted, the server resolves the unique rendition for that page. If multiple renditions match, the request fails with INVALID_ARGUMENT and the caller must disambiguate by providing one or both filters.

Type
Requestgoodmem.v1.GetMemoryPageImageContentRequest
Responsegoodmem.v1.GetMemoryPageImageContentResponse

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: READ_MEMORY_OWN or READ_MEMORY_ANY

Error Codes:

  • UNAUTHENTICATED: Missing or invalid auth token
  • PERMISSION_DENIED: Caller lacks permission to read the memory
  • INVALID_ARGUMENT: Request fields are missing/invalid, or multiple renditions match
  • NOT_FOUND: Memory or requested page-image rendition does not exist

Idempotency: Read-only; safe to retry.

BatchGetMemoryPageImageContent

Retrieves inline bytes for multiple page-image renditions.

This is a partial-success operation. The response preserves request order and each element is either a successful page-image content payload or an error status.

Type
Requestgoodmem.v1.BatchGetMemoryPageImageContentRequest
Responsegoodmem.v1.BatchGetMemoryPageImageContentResponse

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: READ_MEMORY_OWN or READ_MEMORY_ANY

Error Codes (top-level):

  • UNAUTHENTICATED: Missing or invalid auth token
  • PERMISSION_DENIED: Caller lacks permission to read memories
  • INTERNAL: Unexpected server or database error while processing the batch

Per-item error codes: Returned in each results[i].status

  • INVALID_ARGUMENT: Request fields are missing/invalid, or multiple renditions match
  • NOT_FOUND: Memory or requested page-image rendition does not exist
  • PERMISSION_DENIED: Caller lacks permission to read that memory

Idempotency: Read-only; safe to retry.

ListMemories

Lists all Memories within a given Space.

Type
Requestgoodmem.v1.ListMemoriesRequest
Responsegoodmem.v1.ListMemoriesResponse

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: LIST_MEMORY_OWN or LIST_MEMORY_ANY

Pagination: max_results defaults to 50 and is clamped to [1, 500]. next_token is an opaque URL-safe Base64 string without padding; do not parse or construct it. The encoding may change without notice.

Error Codes:

  • UNAUTHENTICATED: Missing or invalid auth token
  • PERMISSION_DENIED: Caller lacks permission to list memories in the specified space
  • INVALID_ARGUMENT: space_id is invalid
  • NOT_FOUND: The specified space does not exist

Idempotency: Read-only; safe to retry.

DeleteMemory

Permanently deletes a Memory and its associated chunks.

Type
Requestgoodmem.v1.DeleteMemoryRequest
Responsegoogle.protobuf.Empty

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: DELETE_MEMORY_OWN or DELETE_MEMORY_ANY

Error Codes:

  • UNAUTHENTICATED: Missing or invalid auth token
  • PERMISSION_DENIED: Caller lacks permission to delete the memory
  • INVALID_ARGUMENT: memory_id is invalid
  • NOT_FOUND: The specified memory does not exist

Idempotency: Safe to retry; may return NOT_FOUND if already deleted.

BatchCreateMemory

Creates multiple Memories in a single request.

This is a partial-success operation. The response will contain a result for each requested creation, indicating either success (with the new Memory) or an error status.

Type
Requestgoodmem.v1.BatchCreateMemoryRequest
Responsegoodmem.v1.BatchCreateMemoryResponse

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: CREATE_MEMORY_OWN or CREATE_MEMORY_ANY

Idempotency: Not idempotent - each call may create new memories.

BatchGetMemory

Retrieves multiple Memories by their IDs in a single request.

This is a partial-success operation. The response will contain a result for each requested memory.

Type
Requestgoodmem.v1.BatchGetMemoryRequest
Responsegoodmem.v1.BatchGetMemoryResponse

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: READ_MEMORY_OWN or READ_MEMORY_ANY

Idempotency: Read-only; safe to retry.

BatchDeleteMemory

Deletes multiple memory selections in a single request.

Each selection can target either:

  • a specific memory ID, or
  • a scoped filtered set of memories within a specific space.

This is a partial-success operation. The response reports one result per requested selection.

Type
Requestgoodmem.v1.BatchDeleteMemoryRequest
Responsegoodmem.v1.BatchDeleteMemoryResponse

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: DELETE_MEMORY_OWN or DELETE_MEMORY_ANY

Idempotency: Safe to retry; ID-based selectors may return NOT_FOUND if already deleted.

RetrieveMemory

Performs a semantic search over one or more Spaces and streams back results.

This is a server-streaming RPC that provides a rich, event-based view of the retrieval process, including ranked chunks, full memory definitions, and optional LLM-generated summaries.

Type
Requestgoodmem.v1.RetrieveMemoryRequest
Responsestream goodmem.v1.RetrieveMemoryEvent

Auth: gRPC metadata authorization: Bearer <api-key>

Permissions Required: READ_MEMORY_OWN or READ_MEMORY_ANY

Error Codes:

  • Fails fast with INVALID_ARGUMENT, NOT_FOUND, or PERMISSION_DENIED if any initial validation of the request parameters (e.g., space IDs) fails
  • During the stream, non-fatal warnings are sent via GoodMemStatus events

Idempotency: Read-only; safe to retry.

Messages

Memory


Memory & MemoryChunk

A logical “memory” – a unit of content with associated metadata.

This is the primary object clients interact with. It represents the original, unprocessed content. The server processes this content asynchronously to create one or more MemoryChunks with vector embeddings.

FieldTypeDescription
memory_idbytesOUTPUT_ONLY; UUID (16 bytes) of the memory.
space_idbytesOUTPUT_ONLY; UUID of the parent space.
original_contentbytesWRITE_ONLY; The raw payload of the memory. Not returned in read RPCs unless explicitly requested.
original_content_refstringOptional URI pointing to the external source of the content.
original_content_lengthint64OUTPUT_ONLY; Size in bytes of original_content when stored inline.
original_content_sha256bytesOUTPUT_ONLY; SHA-256 digest of original_content (binary form).
content_typestringREQUIRED; MIME type of the content (e.g., "text/plain", "application/pdf").
metadatagoogle.protobuf.StructOptional, arbitrary JSON-like metadata associated with the memory.
chunking_configgoodmem.v1.ChunkingConfigOptional chunking strategy that overrides the space's default.
processing_statusgoodmem.v1.ProcessingStatusOUTPUT_ONLY; The current status of the asynchronous processing pipeline.
processing_historygoodmem.v1.ProcessingHistoryOUTPUT_ONLY; Populated when requested via Get/List flags.
page_image_statusgoodmem.v1.ProcessingStatusOUTPUT_ONLY; Status of optional page-image extraction.
page_image_countint32OUTPUT_ONLY; Number of extracted page-image renditions.
created_atgoogle.protobuf.Timestamp--- Audit ---------------------------------------------------------------
OUTPUT_ONLY; Timestamp of creation.
updated_atgoogle.protobuf.TimestampOUTPUT_ONLY; Timestamp of last update.
created_by_idbytesOUTPUT_ONLY; UUID of the user who created the memory.
updated_by_idbytesOUTPUT_ONLY; UUID of the user who last updated the memory.

MemoryChunk

A single chunk derived from a Memory, paired with its vector embedding. Mostly internal, but exposed for advanced diagnostics.

FieldTypeDescription
chunk_idbytesOUTPUT_ONLY; UUID of the chunk.
memory_idbytesOUTPUT_ONLY; UUID of the parent memory.
chunk_sequence_numberint32OUTPUT_ONLY; The 0-based position of this chunk within the parent memory.
chunk_textstringThe text content of the chunk.
embedding_vectorfloatFor internal use; not reliably populated in retrieval responses.
vector_statusgoodmem.v1.ProcessingStatusOUTPUT_ONLY; The generation status of the embedding vector.
start_offsetint32OUTPUT_ONLY; Byte offset in UTF-8 of the chunk start in original content.
end_offsetint32OUTPUT_ONLY; Byte offset in UTF-8 of the chunk end (exclusive).
metadatagoogle.protobuf.StructOptional per-chunk metadata payload.
created_atgoogle.protobuf.Timestamp--- Audit ---------------------------------------------------------------
OUTPUT_ONLY; Timestamp of creation.
updated_atgoogle.protobuf.TimestampOUTPUT_ONLY; Timestamp of last update.
created_by_idbytesOUTPUT_ONLY; UUID of the user who created the chunk.
updated_by_idbytesOUTPUT_ONLY; UUID of the user who last updated the chunk.

MemoryPageImage

Metadata for one extracted page-image rendition associated with a Memory.

Binary image bytes are intentionally excluded from this message and are fetched via GetMemoryPageImageContent.

FieldTypeDescription
memory_idbytesOUTPUT_ONLY; UUID of the parent memory.
page_indexint32OUTPUT_ONLY; 0-based page index in the source document.
dpiint32OUTPUT_ONLY; Render DPI used for this rendition.
content_typestringOUTPUT_ONLY; MIME type (e.g., image/png, image/jpeg).
image_content_lengthint64OUTPUT_ONLY; Size in bytes of inline image content.
image_content_sha256bytesOUTPUT_ONLY; SHA-256 digest of image content (binary form).
created_atgoogle.protobuf.Timestamp--- Audit ---------------------------------------------------------------
OUTPUT_ONLY; Timestamp of creation.
updated_atgoogle.protobuf.TimestampOUTPUT_ONLY; Timestamp of last update.
created_by_idbytesOUTPUT_ONLY; UUID of the user who created the rendition.
updated_by_idbytesOUTPUT_ONLY; UUID of the user who last updated the rendition.

MemoryOrStatus


Helper union for batch RPCs

A union type for batch operations that can return either a Memory or an error Status.

FieldTypeDescription
memorygoodmem.v1.MemoryA successfully retrieved or created Memory.
statusgoogle.rpc.StatusAn error status for a failed operation on a single item.

RetrieveMemoryRequest


RetrieveMemory – request & streaming response

Defines the parameters for a semantic search query.

FieldTypeDescription
messagestring--- Core query parameters ----------------------------------------------
REQUIRED; The user's natural language query or prompt.
context...rieveMemoryRequest.ContextItemOptional; Extra context to provide alongside the query.
space_ids...RetrieveMemoryRequest.SpaceKeyREQUIRED; The list of spaces to search within.
requested_sizeint32The maximum number of results requested.
hnsw...rieveMemoryRequest.HnswOptionsOptional; Request-level overrides for HNSW search parameters.
output_budget...rieveMemoryRequest.TokenBudget--- Soft resource caps --------------------------------------------------
Optional; A hint for the maximum number of tokens in the final reply.
compute_budget...rieveMemoryRequest.TokenBudgetOptional; A hint for the overall computational effort.
fetch_memorybool--- Response shaping flags ---------------------------------------------
If omitted, defaults to true. If explicitly set to false, `memory_definition` events will not be streamed.
fetch_memory_contentboolIf true, includes the raw content in streamed `memory_definition` events. Requires `fetch_memory` to be true.
post_processor...eveMemoryRequest.PostProcessorOptional; A post-processor to apply to the results (e.g., for summarization).
logging...veMemoryRequest.LoggingOptionsOptional; Opt-in durable request logging metadata. Logging is enabled only when this message is set and enabled=true.

RetrieveMemoryRequest.TokenBudget

A hint to the server about the desired token budget for a response.

FieldTypeDescription
tokensuint32The desired number of tokens.

RetrieveMemoryRequest.BinaryContent

Represents a piece of binary content provided as context.

FieldTypeDescription
content_typestringThe MIME type of the content.
databytesThe raw binary data.

RetrieveMemoryRequest.ContextItem

A single item of context provided to augment the user's query.

FieldTypeDescription
textstringTextual context.
binary...eveMemoryRequest.BinaryContentBinary context (e.g., an image).

RetrieveMemoryRequest.PostProcessor

Defines a post-processor to be run on the retrieval results.

FieldTypeDescription
namestringThe fully-qualified class name of the post-processor to run.
configgoogle.protobuf.StructOptional JSON-like configuration for the post-processor.

RetrieveMemoryRequest.EmbedderWeight

Specifies a custom weight for an embedder during a query.

FieldTypeDescription
embedder_idbytesThe UUID of the embedder to apply the weight to.
weightfloatThe relevance weight for this embedder.

RetrieveMemoryRequest.SpaceKey

Specifies a space to search in, with optional per-embedder weighting.

FieldTypeDescription
space_idbytesREQUIRED; The UUID of the space to search.
embedder_weights...veMemoryRequest.EmbedderWeightOptional; Overrides default weights for embedders in this space.
filterstringOptional; Only memories that satisfy this filter expression are included in the results.

RetrieveMemoryRequest.HnswOptions

Request-level overrides for HNSW search behavior.

All fields are optional; unset fields inherit the server defaults. Ranges mirror pgvector's GUC bounds:

  • ef_search: 1..1000 (int)
  • max_scan_tuples: 1..INT_MAX (int)
  • scan_mem_multiplier: 1..1000 (float)
  • iterative_scan: enum (off/relaxed_order/strict_order)

These are applied only to the HNSW index scans for the request.

FieldTypeDescription
ef_searchuint32Optional; 1..1000. Size of the candidate list during search.
iterative_scan...uest.HnswOptions.IterativeScanOptional; Mode for iterative scans; see enum for semantics.
max_scan_tuplesuint32Optional; 1..INT_MAX. Max tuples to visit during iterative scans.
scan_mem_multiplierdoubleOptional; 1..1000. Multiplier on work_mem for iterative scans.

RetrieveMemoryRequest.LoggingOptions

Opt-in durable request logging metadata for retrieval requests.

FieldTypeDescription
enabledboolREQUIRED to be true to enable durable request logging for this request.
caller_attributes...gOptions.CallerAttributesEntryOptional; Caller-supplied flat scalar attributes for downstream slicing/filtering. ≤32 entries; keys [a-z][a-z0-9_]{0,63}; reserved prefix `goodmem_`; string values ≤256 UTF-8 bytes; total serialized size ≤8 KiB.

RetrieveMemoryRequest.LoggingOptions.CallerAttributesEntry

FieldTypeDescription
keystring
valuegoodmem.v1.ScalarValue

RetrieveMemoryEvent

A single event in the streaming response of a RetrieveMemory RPC.

The stream is a sequence of these events. The client is responsible for assembling the final results based on the event types. Events for different result sets may interleave, but within a given result set, the server emits BEGIN → items → END in order.

FieldTypeDescription
result_set_boundary...eMemoryEvent.ResultSetBoundaryMarks the beginning or end of a logical set of results.
retrieved_item...rieveMemoryEvent.RetrievedItemA single retrieved item, part of a result set.
abstract_reply...rieveMemoryEvent.AbstractReplyAn LLM-generated summary or answer.
memory_definitiongoodmem.v1.MemoryA full memory definition, provided for client-side caching.
statusgoodmem.v1.GoodMemStatusA non-fatal warning or status update.

RetrieveMemoryEvent.ResultSetBoundary

Marks the BEGIN or END of a logical result set (e.g., from vector search or reranking).

Every RetrievedItem between a BEGIN and END boundary will share the same result_set_id.

FieldTypeDescription
result_set_idbytesA unique UUID for this result set.
kind...ryEvent.ResultSetBoundary.KindWhether this marks the beginning or end of the set.
stage_namestringA human-readable name for the pipeline stage (e.g., "vector-search", "rerank").
expected_itemsuint32A hint for the total number of items in this set. A value of 0 means the total is not specified.

RetrieveMemoryEvent.AbstractReply

An LLM-generated textual summary or answer based on the retrieved items.

FieldTypeDescription
textstringThe generated text.
relevance_scoredoubleThe relevance score of the abstract itself.
result_set_idbytesOptional; The result set this abstract was generated from.

RetrieveMemoryEvent.RetrievedItem

A single item retrieved from a search, belonging to a specific result set.

FieldTypeDescription
memorygoodmem.v1.MemoryThe server does not use this field in the current implementation.
Full memory definitions are sent via the `memory_definition` event.
chunk...t.RetrievedItem.ChunkReferenceA reference to a specific chunk within a memory.

RetrieveMemoryEvent.RetrievedItem.ChunkReference

A reference to a specific chunk, its relevance score, and a pointer to its parent memory definition within the stream.

FieldTypeDescription
result_set_idbytesThe ID of the result set this chunk belongs to.
chunkgoodmem.v1.MemoryChunkThe chunk data itself.
memory_indexint32The index of this chunk's parent memory in the client-side cache of `Memory` definitions.
relevance_scoredoubleThe relevance score of this chunk to the query.

CreateMemoryRequest


Create / Batch-create

FieldTypeDescription
memory_idbytesOptional: client-provided UUID (16 bytes); server generates if omitted; returns ALREADY_EXISTS if ID exists
space_idbytesREQUIRED: The UUID of the space to create the memory in.
original_contentbytesREQUIRED: The raw content of the memory.
original_content_refstringOptional: A URI pointing to the external source of the content.
content_typestringREQUIRED: The MIME type of the content.
metadatagoogle.protobuf.StructOptional: Arbitrary JSON-like metadata.
chunking_configgoodmem.v1.ChunkingConfigOptional; Overrides the default chunking config of the space.
extract_page_imagesboolOptional; If true, enqueue page-image extraction for eligible formats (e.g., PDFs).

BatchCreateMemoryRequest

FieldTypeDescription
requestsgoodmem.v1.CreateMemoryRequest

BatchCreateMemoryResponse

FieldTypeDescription
resultsgoodmem.v1.MemoryOrStatus

GetMemoryRequest


Get / Batch-get

FieldTypeDescription
memory_idbytesREQUIRED; The UUID of the memory to retrieve.
include_contentboolIf true, the `original_content` field of the memory will be populated.
include_processing_historyboolIf true, populates the `processing_history` field.

BatchGetMemoryRequest

FieldTypeDescription
memory_idsbytesThe list of memory UUIDs to retrieve.
include_contentboolIf true, populates the `original_content` field for all retrieved memories.
include_processing_historyboolIf true, populates the `processing_history` field for all memories.

BatchGetMemoryResponse

FieldTypeDescription
resultsgoodmem.v1.MemoryOrStatus

ListMemoryPageImagesRequest


Page-image listing / content

FieldTypeDescription
memory_idbytesREQUIRED; The UUID of the memory to list page-image renditions for.
start_page_indexint32Optional; 0-based inclusive page start filter.
end_page_indexint32Optional; 0-based inclusive page end filter.
dpiint32Optional; Exact DPI filter.
content_typestringOptional; MIME type filter (e.g., image/png).
max_resultsint32Optional; Max results per page; defaults to 50; clamped to [1, 500].
next_tokenstringOptional; Opaque pagination token for the next page. URL-safe Base64 without padding.

ListMemoryPageImagesResponse

FieldTypeDescription
page_imagesgoodmem.v1.MemoryPageImageA page of page-image renditions.
next_tokenstringOpaque pagination token for next page; omitted on final page.

ListMemoryPageImagesNextPageToken

Internal cursor for ListMemoryPageImages pagination. Not for client use. Clients MUST treat next_token as opaque and MUST NOT parse or construct it. The current encoding uses URL-safe Base64 without padding and may change without notice.

FieldTypeDescription
startint32The starting offset for the next page.
memory_idbytesThe memory_id from the original request.
start_page_indexint32The start_page_index from the original request.
end_page_indexint32The end_page_index from the original request.
dpiint32The dpi filter from the original request.
content_typestringThe content_type filter from the original request.
requestor_idbytesThe UUID of the authenticated user for token validation.

GetMemoryPageImageContentRequest

FieldTypeDescription
memory_idbytesREQUIRED; The UUID of the memory owning the rendition.
page_indexint32REQUIRED; 0-based page index in the source document.
dpiint32Optional; Render DPI filter for the requested rendition.
content_typestringOptional; MIME type filter for the requested rendition.

GetMemoryPageImageContentResponse

FieldTypeDescription
memory_idbytesOUTPUT_ONLY; UUID of the parent memory.
page_indexint32OUTPUT_ONLY; 0-based page index in the source document.
dpiint32OUTPUT_ONLY; Render DPI of this rendition.
content_typestringOUTPUT_ONLY; MIME type of image_content.
image_contentbytesOUTPUT_ONLY; Raw inline image bytes.
image_content_lengthint64OUTPUT_ONLY; Size in bytes of image_content.
image_content_sha256bytesOUTPUT_ONLY; SHA-256 digest of image_content (binary form).

MemoryPageImageContentOrStatus

One batch item result for BatchGetMemoryPageImageContent.

Exactly one field in result is set.

FieldTypeDescription
page_image_content...MemoryPageImageContentResponseSuccessful rendition fetch.
statusgoogle.rpc.StatusPer-item failure details.

BatchGetMemoryPageImageContentRequest

Batch request for retrieving multiple page-image renditions by page plus optional rendition hints.

FieldTypeDescription
requests...tMemoryPageImageContentRequestItems to fetch in request order.

BatchGetMemoryPageImageContentResponse

Batch response for retrieving multiple page-image renditions.

FieldTypeDescription
results...MemoryPageImageContentOrStatusResult list aligned with request order.

ListMemoriesRequest


List with pagination

FieldTypeDescription
space_idbytesREQUIRED; The UUID of the space to list memories from.
status_filtergoodmem.v1.ProcessingStatusOptional; Filters memories by their processing status.
max_resultsint32Optional; Max results per page; defaults to 50; clamped to [1, 500].
next_tokenstringOptional; Opaque pagination token for the next page. URL-safe Base64 without padding.
sort_bystringOptional; Field to sort by (e.g., "created_at"). Behavior for unsupported fields is not defined.
sort_ordergoodmem.v1.SortOrderOptional; The direction to sort (ASCENDING or DESCENDING).
include_contentboolOptional; If true, populates the `original_content` field.
include_processing_historyboolIf true, populates the `processing_history` field for each memory.
filterstringOptional; Metadata filter expression. Uses the same filter language as RetrieveMemoryRequest.SpaceKey.filter.

ListMemoriesResponse

FieldTypeDescription
memoriesgoodmem.v1.MemoryA page of memory results.
next_tokenstringOpaque pagination token for next page; omitted on final page. URL-safe Base64 without padding.

ListMemoriesNextPageToken

Internal cursor for ListMemories pagination. Not for client use. Clients MUST treat next_token as opaque and MUST NOT parse or construct it. The current encoding uses URL-safe Base64 without padding and may change without notice.

FieldTypeDescription
startint32The starting offset for the next page.
space_idbytesThe space_id from the original request.
status_filtergoodmem.v1.ProcessingStatusThe status_filter from the original request.
sort_bystringThe sort_by field from the original request.
sort_ordergoodmem.v1.SortOrderThe sort_order from the original request.
requestor_idbytesThe UUID of the authenticated user for token validation.
include_contentboolThe include_content flag from the original request.
include_processing_historyboolThe include_processing_history flag from the original request.
filterstringThe metadata filter expression from the original request.

DeleteMemoryRequest


Delete / Batch-delete

FieldTypeDescription
memory_idbytesREQUIRED; The UUID of the memory to delete.

FilteredDeleteMemorySelector

FieldTypeDescription
space_idbytesREQUIRED; Restricts deletion to this space.
status_filtergoodmem.v1.ProcessingStatusOptional; If set, only memories with this status are eligible for deletion.
filterstringOptional; Metadata filter expression. Uses the same filter language as RetrieveMemoryRequest.SpaceKey.filter.

DeleteMemorySelector

FieldTypeDescription
memory_idbytesDeletes one specific memory by ID.
filter_selector...1.FilteredDeleteMemorySelectorDeletes all memories in a space that match the selector.

BatchDeleteMemoryRequest

FieldTypeDescription
requests...oodmem.v1.DeleteMemorySelectorList of delete selections to execute.

DeleteResult

The result of one batch-delete selection.

FieldTypeDescription
request_indexuint320-based index into BatchDeleteMemoryRequest.requests.
deleted_countuint32Number of rows deleted by this selector.
errorgoogle.rpc.StatusIf selector execution failed, contains error details.

BatchDeleteMemoryResponse

FieldTypeDescription
resultsgoodmem.v1.DeleteResultOne result per request selector.
total_deleteduint32Sum of deleted_count across successful selectors.

Enums

RetrieveMemoryRequest.HnswOptions.IterativeScan

NameValueDescription
ITERATIVE_SCAN_UNSPECIFIED0Use server default.
ITERATIVE_SCAN_OFF1Disable iterative scans.
ITERATIVE_SCAN_RELAXED_ORDER2Prefer recall over strict ordering.
ITERATIVE_SCAN_STRICT_ORDER3Maintain strict ordering; may reduce recall with filters.

RetrieveMemoryEvent.ResultSetBoundary.Kind

NameValueDescription
BEGIN0
END1

ProcessingStatus


Common enums

Pipeline status for any process that can be queued, run and finish/fail.

NameValueDescription
PROCESSING_STATUS_UNSPECIFIED0The default value. Invalid on writes.
PENDING1The job is queued and waiting to be processed.
PROCESSING2The job is actively being processed.
COMPLETED3The job finished successfully.
FAILED4The job ended with an error.

On this page

ServicesMemoryService ServiceCRUD & batch RPC surfaceCreateMemoryGetMemoryListMemoryPageImagesGetMemoryPageImageContentBatchGetMemoryPageImageContentListMemoriesDeleteMemoryBatchCreateMemoryBatchGetMemoryBatchDeleteMemoryRetrieveMemoryMessagesMemoryMemory & MemoryChunkMemoryChunkMemoryPageImageMemoryOrStatusHelper union for batch RPCsRetrieveMemoryRequestRetrieveMemory – request & streaming responseRetrieveMemoryRequest.TokenBudgetRetrieveMemoryRequest.BinaryContentRetrieveMemoryRequest.ContextItemRetrieveMemoryRequest.PostProcessorRetrieveMemoryRequest.EmbedderWeightRetrieveMemoryRequest.SpaceKeyRetrieveMemoryRequest.HnswOptionsRetrieveMemoryRequest.LoggingOptionsRetrieveMemoryRequest.LoggingOptions.CallerAttributesEntryRetrieveMemoryEventRetrieveMemoryEvent.ResultSetBoundaryRetrieveMemoryEvent.AbstractReplyRetrieveMemoryEvent.RetrievedItemRetrieveMemoryEvent.RetrievedItem.ChunkReferenceCreateMemoryRequestCreate / Batch-createBatchCreateMemoryRequestBatchCreateMemoryResponseGetMemoryRequestGet / Batch-getBatchGetMemoryRequestBatchGetMemoryResponseListMemoryPageImagesRequestPage-image listing / contentListMemoryPageImagesResponseListMemoryPageImagesNextPageTokenGetMemoryPageImageContentRequestGetMemoryPageImageContentResponseMemoryPageImageContentOrStatusBatchGetMemoryPageImageContentRequestBatchGetMemoryPageImageContentResponseListMemoriesRequestList with paginationListMemoriesResponseListMemoriesNextPageTokenDeleteMemoryRequestDelete / Batch-deleteFilteredDeleteMemorySelectorDeleteMemorySelectorBatchDeleteMemoryRequestDeleteResultBatchDeleteMemoryResponseEnumsRetrieveMemoryRequest.HnswOptions.IterativeScanRetrieveMemoryEvent.ResultSetBoundary.KindProcessingStatusCommon enums