Agno supports using local YAML files as a storage backend for Agents using the YamlFileAgentStorage class.

Usage

storage.py
from agno.agent import Agent
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.storage.agent.yaml import YamlFileAgentStorage

agent = Agent(
    storage=YamlFileAgentStorage(path="tmp/agent_sessions_yaml"),
    tools=[DuckDuckGoTools()],
    add_history_to_messages=True,
)

agent.print_response("How many people live in Canada?")
agent.print_response("What is their national anthem called?")

Params

ParameterTypeDefaultDescription
dir_pathstr-Path to the folder to be used to store the YAML files.

Developer Resources