Skip to main content
Configures a memory manager that stores and retrieves memories across agent conversations.

agno/memory/manager

Config

FieldTypeRequiredDefaultDescription
dbDependencyYesReference to agno/db/postgres for memory storage
modelDependencyNoReference to agno/models/anthropic or agno/models/openai for memory classification
system_messagestringNoSystem message for memory classification
memory_capture_instructionsstringNoInstructions for what to capture as memories
additional_instructionsstringNoAdditional instructions for memory processing
add_memoriesbooleanNotrueAllow creating new memories
update_memoriesbooleanNotrueAllow updating existing memories
delete_memoriesbooleanNofalseAllow deleting memories
clear_memoriesbooleanNofalseAllow clearing all memories
debug_modebooleanNofalseEnable debug logging

Outputs

FieldTypeDescription
specobjectSerialized memory manager spec for runtime reconstruction

Dependencies

Depends on:
  • agno/db/postgres (required) — database for memory storage
  • agno/models/anthropic or agno/models/openai (optional) — model for memory classification
Depended on by:
  • agno/agent — in the memory field
  • agno/team — in the memory field

Example

provider: agno
resource: memory/manager
name: agent-memory
config:
  db:
    provider: agno
    resource: db/postgres
    name: agent-db
  model:
    provider: agno
    resource: models/openai
    name: gpt4
  add_memories: true
  update_memories: true
  memory_capture_instructions: "Remember user preferences and important facts."

Notes

  • The memory manager stores memories in the PostgreSQL database configured via db.
  • When a model is provided, it is used to classify and process memories. Without a model, memories are stored as-is.
  • To use memory with an agent, you also need to enable enable_agentic_memory: true on the agent config.