Files
agno-notebooks/数据库优化工程师.py
cruld e9865b3e5b feat(project): add initial project setup and dependencies
- 新增.gitignore以排除环境文件和IDE配置
- 更新pyproject.toml以添加新依赖:ipywidgets, openai, python-dotenv
- 新建Python脚本以加载环境变量并配置智能体

💄 style(notebook): improve notebook code structure and comments

- 修改notebook中代码块的执行计数为null
- 添加代码注释以提升可读性和理解性
- 引入load_dotenv以支持环境变量加载
2025-03-30 23:50:21 +08:00

31 lines
1.1 KiB
Python

if __name__ == "__main__":
"""
## 背景
我有一个`postgresql`数据库,现在需要一个专业的数据库优化工程师,来帮我看下设计是否合理,以及如何优化.
## 目标
这个数据库优化工程师智能体应该具备以下能力:
- [ ] 使用`claude3.7`作为模型(相当于拥有一个聪明的大脑,总是能够做出正确的决策)
- [ ] 精通关系型数据库系统的理论知识以及`postgresql`的实现细节(知识库)
- [ ] 能够使用`postgresql mcp server`来分析现有数据库设计(行为)
"""
# 然后在notebook中加载
from dotenv import load_dotenv
# 加载当前目录下的.env文件
load_dotenv()
from agno.agent import Agent, RunResponse # noqa
from agno.models.deepseek import DeepSeek
agent = Agent(model=DeepSeek(id="deepseek-chat"), markdown=True)
# Get the response in a variable
# run: RunResponse = agent.run("Share a 2 sentence horror story")
# print(run.content)
# Print the response in the terminal
agent.print_response("你好")