A ferramenta Memory permite que seus agentes armazenem, recuperem e gerenciem memórias de conversa entre fluxos de trabalho. Ela atua como um armazenamento persistente que os agentes podem acessar para manter contexto, relembrar fatos ou acompanhar ações ao longo do tempo.
Com a ferramenta Memory, você pode:
- Adicionar novas memórias: Armazene informações relevantes, eventos ou histórico de conversa salvando mensagens de agente ou usuário em um banco de memória estruturado
- Recuperar memórias: Busque memórias específicas ou todas as memórias vinculadas a uma conversa, ajudando agentes a relembrar interações ou fatos anteriores
- Excluir memórias: Remova memórias desatualizadas ou incorretas do banco para manter o contexto preciso
- Anexar a conversas existentes: Atualize ou expanda threads de memória existentes anexando novas mensagens com o mesmo identificador de conversa
O bloco Memory do Zoen é especialmente útil para construir agentes que precisam de estado persistente — ajudando-os a lembrar o que foi dito antes, persistir fatos entre tarefas ou aplicar histórico de longo prazo na tomada de decisão. Ao integrar Memory, você habilita fluxos mais ricos, contextuais e dinâmicos para seus agentes.
Usage Instructions
Integrate Memory into the workflow. Can add, get a memory, get all memories, and delete memories.
Actions
memory_add
Add a new memory to the database or append to existing memory with the same ID.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationId | string | No | Conversation identifier (e.g., user-123, session-abc). If a memory with this conversationId already exists, the new message will be appended to it. |
id | string | No | Legacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility. |
role | string | Yes | Role for agent memory (user, assistant, or system) |
content | string | Yes | Content for agent memory |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the memory was added successfully |
memories | array | Array of memory objects including the new or updated memory |
error | string | Error message if operation failed |
memory_get
Retrieve memory by conversationId. Returns matching memories.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationId | string | No | Conversation identifier (e.g., user-123, session-abc). Returns memories for this conversation. |
id | string | No | Legacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility. |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the memory was retrieved successfully |
memories | array | Array of memory objects with conversationId and data fields |
message | string | Success or error message |
error | string | Error message if operation failed |
memory_get_all
Retrieve all memories from the database
Input
| Parameter | Type | Required | Description |
|---|
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether all memories were retrieved successfully |
memories | array | Array of all memory objects with key, conversationId, and data fields |
message | string | Success or error message |
error | string | Error message if operation failed |
memory_delete
Delete memories by conversationId.
Input
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationId | string | No | Conversation identifier (e.g., user-123, session-abc). Deletes all memories for this conversation. |
id | string | No | Legacy parameter for conversation identifier. Use conversationId instead. Provided for backwards compatibility. |
Output
| Parameter | Type | Description |
|---|---|---|
success | boolean | Whether the memory was deleted successfully |
message | string | Success or error message |
error | string | Error message if operation failed |