Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
MySQLStorage
docker run -d \ -e MYSQL_ROOT_PASSWORD=root \ -e MYSQL_DATABASE=agno \ -e MYSQL_USER=agno \ -e MYSQL_PASSWORD=agno \ -p 3306:3306 \ --name mysql \ mysql:8.0
from agno.storage.mysql import MySQLStorage db_url = "mysql+pymysql://agno:agno@localhost:3306/agno" # 使用 Postgres 数据库创建存储后端 storage = MySQLStorage( # 将会话存储在 agno.sessions 表中 table_name="agent_sessions", # db_url: Postgres 数据库的 URL db_url=db_url, ) # 将存储添加到 Agent agent = Agent(storage=storage)
table_name
str
schema
Optional[str]
"ai"
db_url
None
db_engine
Optional[Engine]
schema_version
int
1
auto_upgrade_schema
bool
False