YamlStorage 类实现。
用法
yaml_storage_for_agent.py
参数
开发者资源
- 查看 Cookbook
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
YamlStorage 类实现。
from agno.agent import Agent
from agno.tools.duckduckgo import DuckDuckGoTools
from agno.storage.yaml import YamlStorage
agent = Agent(
storage=YamlStorage(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?")
| 参数 | 类型 | 默认值 | 描述 |
|---|---|---|---|
dir_path | str | - | 用于存储 YAML 文件的文件夹路径。 |