AACFlow

Zep

Long-term memory for AI agents

Usage Instructions

Integrate Zep for long-term memory management. Create threads, add messages, retrieve context with AI-powered summaries and facts extraction.

Tools

zep_create_thread

Input

ParameterTypeRequiredDescription
threadIdstringYesUnique identifier for the thread (e.g., "thread_abc123")
userIdstringYesUser ID associated with the thread (e.g., "user_123")
apiKeystringYesNo description

Output

ParameterTypeDescription
threadIdstringThread identifier
userIdstringAssociated user ID
uuidstringInternal UUID
createdAtstringCreation timestamp (ISO 8601)
projectUuidstringProject UUID

zep_get_threads

Input

ParameterTypeRequiredDescription
pageSizenumberNoNo description
pageNumbernumberNoNo description
orderBystringNoNo description
ascbooleanNoNo description
apiKeystringYesNo description

Output

ParameterTypeDescription
threadsarrayArray of thread objects
threadIdstringThread identifier
userIdstringAssociated user ID
uuidstringInternal UUID
createdAtstringCreation timestamp (ISO 8601)
updatedAtstringLast update timestamp (ISO 8601)
projectUuidstringProject UUID
metadataobjectCustom metadata (dynamic key-value pairs)
responseCountnumberNumber of items in this response
totalCountnumberTotal number of items available

zep_delete_thread

Input

ParameterTypeRequiredDescription
threadIdstringYesThread ID to delete (e.g., "thread_abc123")
apiKeystringYesNo description

Output

ParameterTypeDescription
deletedbooleanWhether the thread was deleted

zep_get_context

Input

ParameterTypeRequiredDescription
threadIdstringYesThread ID to get context from (e.g., "thread_abc123")
modestringNoContext mode: "summary" (natural language) or "basic" (raw facts)
minRatingnumberNoNo description
apiKeystringYesNo description

Output

ParameterTypeDescription
contextstringThe context string (summary or basic mode)

zep_get_messages

Input

ParameterTypeRequiredDescription
threadIdstringYesThread ID to get messages from (e.g., "thread_abc123")
limitnumberNoNo description
cursorstringNoNo description
lastnnumberNoNo description
apiKeystringYesNo description

Output

ParameterTypeDescription
messagesarrayArray of message objects
uuidstringMessage UUID
rolestringMessage role (user, assistant, system, tool)
roleTypestringRole type (AI, human, tool)
contentstringMessage content
namestringSender name
createdAtstringTimestamp (RFC3339 format)
metadataobjectMessage metadata (dynamic key-value pairs)
processedbooleanWhether message has been processed
rowCountnumberNumber of rows returned
totalCountnumberTotal number of items available

zep_add_messages

Input

ParameterTypeRequiredDescription
threadIdstringYesThread ID to add messages to (e.g., "thread_abc123")
messagesjsonYesArray of message objects with role and content (e.g., [{"role": "user", "content": "Hello"}])
apiKeystringYesNo description

Output

ParameterTypeDescription
threadIdstringThread identifier
addedbooleanWhether messages were added successfully
messageIdsarrayArray of added message UUIDs

zep_add_user

Input

ParameterTypeRequiredDescription
userIdstringYesUnique identifier for the user (e.g., "user_123")
emailstringNoNo description
firstNamestringNoNo description
lastNamestringNoNo description
metadatajsonNoAdditional metadata as JSON object (e.g., {"key": "value"})
apiKeystringYesNo description

Output

ParameterTypeDescription
userIdstringUser identifier
emailstringUser email address
firstNamestringUser first name
lastNamestringUser last name
uuidstringInternal UUID
createdAtstringCreation timestamp (ISO 8601)
metadataobjectUser metadata (dynamic key-value pairs)

zep_get_user

Input

ParameterTypeRequiredDescription
userIdstringYesUser ID to retrieve (e.g., "user_123")
apiKeystringYesNo description

Output

ParameterTypeDescription
userIdstringUser identifier
emailstringUser email address
firstNamestringUser first name
lastNamestringUser last name
uuidstringInternal UUID
createdAtstringCreation timestamp (ISO 8601)
updatedAtstringLast update timestamp (ISO 8601)
metadataobjectUser metadata (dynamic key-value pairs)

zep_get_user_threads

Input

ParameterTypeRequiredDescription
userIdstringYesUser ID to get threads for (e.g., "user_123")
limitnumberNoNo description
apiKeystringYesNo description

Output

ParameterTypeDescription
threadsarrayArray of thread objects
threadIdstringThread identifier
userIdstringAssociated user ID
uuidstringInternal UUID
createdAtstringCreation timestamp (ISO 8601)
updatedAtstringLast update timestamp (ISO 8601)
projectUuidstringProject UUID
metadataobjectCustom metadata (dynamic key-value pairs)
totalCountnumberTotal number of items available

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