Overview
TheMemoryClient is the Room API for room-scoped structured memory. Use it to build shared context that agents can ingest, query, and recall across workflows.
Why use the Memory API?
- Preserve structured knowledge across tasks instead of reconstructing it from chat history each time.
- Ingest text, files, images, tables, and room storage content into a shared memory.
- Recall the most relevant entities and relationships when building prompts or workflows.
How it works
A memory is a named dataset inside a room. You can create it, ingest data into it, inspect or query it directly, and use recall to retrieve relevant context. Some operations work at the entity and relationship level so you can maintain graph-like memory over time.Current implementation: MeshAgent room memory is currently backed by Lance Graph, which stores entities and relationships in a graph-oriented format. Lance Graph is a Cypher-capable graph query engine.
Permissions and grants
If a deployed service needs to use room memory, its participant token needs the appropriate Room API grants. See API Scopes and Packaging and Deploying Services.CLI and SDK availability
- CLI: full room-memory command set (
list,create,drop,inspect,query,recall,ingest,optimize, and more). - Python: full
MemoryClientAPI. - Dart:
list,create, anddrophelpers. - TypeScript/.NET: use the CLI or the generic invoke API (
room.invoke(...)/room.Invoke(...)) for memory operations.
Core API Methods
list
- Description: List memory names in a namespace.
create
- Description: Create a memory.
- Parameters:
name, optionalnamespace,overwrite,ignore_exists.
drop
- Description: Delete a memory.
- Parameters:
name, optionalnamespace,ignore_missing.
Advanced Methods
These examples use the full PythonMemoryClient API. The CLI exposes matching room-memory commands for the same operations.
inspect
- Description: Return
MemoryDetailsincluding the memory path and dataset summaries.
query
- Description: Run a graph query against a memory and return rows.
upsert_table
- Description: Upsert arbitrary rows into a named memory dataset.
upsert_nodes
- Description: Upsert entity nodes using
MemoryEntityRecord.
upsert_relationships
- Description: Upsert edges using
MemoryRelationshipRecord.
ingest_text
- Description: Extract memory from inline text.
ingest_image
- Description: Extract memory from an image and optional caption.
ingest_file
- Description: Extract memory from a file path visible to the room server, or from inline text.
ingest_from_table
- Description: Extract memory from room database rows.
ingest_from_storage
- Description: Extract memory from one or more room storage paths.
recall
- Description: Semantic recall using a natural-language query.
delete_entities
- Description: Remove entities and their related edges.
delete_relationships
- Description: Remove relationships using
MemoryRelationshipSelector.
optimize
- Description: Compact and clean up memory datasets.