{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "## 背景\n", "\n", "我有一个`postgresql`数据库,现在需要一个专业的数据库优化工程师,来帮我看下设计是否合理,以及如何优化.\n", "\n", "## 目标\n", "\n", "这个数据库优化工程师智能体应该具备以下能力:\n", "\n", "- [ ] 使用`claude3.7`作为模型(相当于拥有一个聪明的大脑,总是能够做出正确的决策)\n", "- [ ] 精通关系型数据库系统的理论知识以及`postgresql`的实现细节(知识库)\n", "- [ ] 能够使用`postgresql mcp server`来分析现有数据库设计(行为)\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2025-03-30T15:44:44.236141Z", "start_time": "2025-03-30T15:44:44.223728Z" } }, "outputs": [], "source": [ "# 然后在notebook中加载\n", "from dotenv import load_dotenv\n", "\n", "# 加载当前目录下的.env文件\n", "load_dotenv()" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "ExecuteTime": { "end_time": "2025-03-30T15:44:58.492402Z", "start_time": "2025-03-30T15:44:45.695125Z" } }, "outputs": [], "source": [ "from agno.agent import Agent, RunResponse # noqa\n", "from agno.models.deepseek import DeepSeek\n", "\n", "agent = Agent(model=DeepSeek(id=\"deepseek-chat\"), markdown=True)\n", "\n", "# Get the response in a variable\n", "# run: RunResponse = agent.run(\"Share a 2 sentence horror story\")\n", "# print(run.content)\n", "\n", "# Print the response in the terminal\n", "agent.print_response(\"傻狗\")\n", "# 用jupyter的话输出有问题,妈的,转到py文件" ] } ], "metadata": { "kernelspec": { "display_name": ".venv", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.12.8" } }, "nbformat": 4, "nbformat_minor": 2 }