AACFlow

Mem0

Agent memory management

Usage Instructions

Integrate Mem0 into the workflow. Can add, search, and retrieve memories.

Tools

mem0_add_memories

Input

ParameterTypeRequiredDescription
userIdstringYesUser ID associated with the memory (e.g., "user_123", "alice@example.com")
messagesjsonYesArray of message objects with role and content (e.g., [{"role": "user", "content": "Hello"}])
apiKeystringYesNo description

Output

ParameterTypeDescription
idsarrayArray of memory IDs that were created
memoriesarrayArray of memory objects that were created
idstringUnique identifier for the memory
memorystringThe content of the memory
eventstringEvent type indicating operation performed (ADD, UPDATE, DELETE, NOOP)
metadatajsonCustom metadata associated with the memory

mem0_search_memories

Input

ParameterTypeRequiredDescription
userIdstringYesUser ID to search memories for (e.g., "user_123", "alice@example.com")
querystringYesSearch query to find relevant memories (e.g., "What are my favorite foods?")
limitnumberNoNo description
apiKeystringYesNo description

Output

ParameterTypeDescription
searchResultsarrayArray of search results with memory data and similarity scores
idstringUnique identifier for the memory
memorystringThe content of the memory
user_idstringUser ID associated with this memory
agent_idstringAgent ID associated with this memory
app_idstringApp ID associated with this memory
run_idstringRun/session ID associated with this memory
hashstringHash of the memory content
metadatajsonCustom metadata associated with the memory
categoriesjsonAuto-assigned categories for the memory
created_atstringISO 8601 timestamp when the memory was created
updated_atstringISO 8601 timestamp when the memory was last updated
scorenumberSimilarity score from vector search
idsarrayArray of memory IDs found in the search results

mem0_get_memories

Input

ParameterTypeRequiredDescription
userIdstringYesUser ID to retrieve memories for (e.g., "user_123", "alice@example.com")
memoryIdstringNoSpecific memory ID to retrieve (e.g., "mem_abc123")
startDatestringNoStart date for filtering by created_at (e.g., "2024-01-15")
endDatestringNoEnd date for filtering by created_at (e.g., "2024-12-31")
limitnumberNoNo description
apiKeystringYesNo description

Output

ParameterTypeDescription
memoriesarrayArray of retrieved memory objects
idstringUnique identifier for the memory
memorystringThe content of the memory
user_idstringUser ID associated with this memory
agent_idstringAgent ID associated with this memory
app_idstringApp ID associated with this memory
run_idstringRun/session ID associated with this memory
hashstringHash of the memory content
metadatajsonCustom metadata associated with the memory
categoriesjsonAuto-assigned categories for the memory
created_atstringISO 8601 timestamp when the memory was created
updated_atstringISO 8601 timestamp when the memory was last updated
ownerstringOwner of the memory
organizationstringOrganization associated with the memory
immutablebooleanWhether the memory can be modified
expiration_datestringExpiration date after which memory is not retrieved
idsarrayArray of memory IDs that were retrieved

On this page

Start building today
Trusted by over 100,000 builders.
The SaaS platform to build AI agents and run your agentic workforce.
Get started