{children}
; 33 | } 34 | }} 35 | > 36 | {children} 37 |{children}
; 33 | } 34 | }} 35 | > 36 | {children} 37 |
73 |
{children}
81 | } 82 | }} 83 | > 84 | {content} 85 |{content}
89 | )} 90 |92 | {timestamp.toLocaleTimeString('zh-CN')} 93 |
94 |
73 |
{children}
81 | } 82 | }} 83 | > 84 | {content} 85 |{content}
89 | )} 90 |92 | {timestamp.toLocaleTimeString('zh-CN')} 93 |
94 |Symbolic Regression
48 |Symbolic Regression
48 |Symbolic Regression
48 |4 | An open-source initiative by the DeepModeling community for constructing intelligent agents in scientific research 5 |
6 | 7 | --- 8 | 9 | ## **Overview** 10 | 11 | Build Your Agent is a comprehensive collection of production-ready intelligent agents designed for real-world scientific research challenges. Our mission is to democratize AI agent development by providing well-architected examples that demonstrate practical design patterns and implementation methods. 12 | 13 | We focus on creating agents that follow a systematic architecture: **Perception → Planning → Execution → Feedback**, enabling researchers to tackle complex scientific problems with AI-powered assistance. 14 | 15 | ## **🚀 Featured Agents** 16 | 17 | ### **1. SRAgent - Advanced Symbolic Regression System** 18 | [`agents/SRAgent/`](agents/SRAgent) 19 | 20 | Transform raw data into interpretable mathematical models through multi-agent collaboration. 21 | - **Features**: Deep literature research, automatic report generation, iterative optimization 22 | - **Use Case**: Discovering mathematical relationships in experimental data 23 | 24 | ### **2. DPA Calculator - Materials Science Computation** 25 | [`agents/dpa_calculator/`](agents/dpa_calculator) 26 | 27 | Perform advanced materials calculations using Deep Potential models on Bohrium platform. 28 | - **Features**: Structure optimization, phonon calculations, natural language interface 29 | - **Use Case**: Materials property prediction and structure analysis 30 | 31 | ### **3. Paper Search Demo - Research Literature Assistant** 32 | [`agents/paper_search_demo/`](agents/paper_search_demo) 33 | 34 | A beginner-friendly agent for searching and analyzing scientific papers from arXiv. 35 | - **Features**: Paper retrieval, literature analysis, MCP integration 36 | - **Use Case**: Literature review and research exploration 37 | 38 | ### **4. Thermoelectric MCP - Specialized Materials Analysis** 39 | [`agents/thermoelectric_mcp/`](agents/thermoelectric_mcp) 40 | 41 | Calculate thermoelectric properties of materials using advanced computational methods. 42 | - **Features**: Property predictions, cloud-based calculations 43 | - **Use Case**: Thermoelectric materials research and optimization 44 | 45 | ### **5. ADK UI Starter - Universal Agent Interface** 46 | [`agents/adk_ui_starter/`](agents/adk_ui_starter) 47 | 48 | A plug-and-play web UI framework for any Google ADK agent - no frontend coding required. 49 | - **Features**: Zero-code integration, real-time chat, file management 50 | - **Use Case**: Rapid agent deployment with professional UI 51 | 52 | 53 | ## **🎯 Application Scenarios** 54 | 55 | Build Your Agent supports diverse scientific research workflows: 56 | 57 | - **Literature Review & Synthesis**: Automated paper search, analysis, and review generation 58 | - **Materials Design & Optimization**: Structure prediction, property calculation, and screening 59 | - **Mathematical Modeling**: Symbolic regression and equation discovery from data 60 | - **Drug Discovery**: Molecule screening based on multiple drug-likeness properties 61 | - **Omics Data Analysis**: Cross-domain data integration and automated analysis 62 | - **Custom Research Workflows**: Extensible framework for domain-specific applications 63 | 64 | ## **🚦 Getting Started** 65 | 66 | 1. **Choose an Agent**: Select from our featured agents based on your research needs 67 | 2. **Follow Setup Guide**: Each agent includes detailed installation and configuration instructions 68 | 3. **Customize & Extend**: Modify agents for your specific requirements or build new ones 69 | 4. **Deploy & Share**: Use our UI framework for rapid deployment and collaboration 70 | 71 | ## **📚 Documentation & Resources** 72 | 73 | - **Agent Development Guides**: Step-by-step tutorials for building custom agents 74 | - **Architecture Documentation**: Detailed explanation of the Perception → Planning → Execution → Feedback pattern 75 | - **API References**: Comprehensive documentation for all agent tools and interfaces 76 | - **Example Notebooks**: Jupyter notebooks demonstrating agent capabilities 77 | 78 | ## **🤝 Community & Contribution** 79 | 80 | Build Your Agent is an open-source project welcoming contributions from the global research community: 81 | 82 | - **Submit New Agents**: Share your domain-specific agents 83 | - **Improve Existing Agents**: Enhance features and capabilities 84 | - **Report Issues**: Help us improve by reporting bugs and suggesting features 85 | - **Join Discussions**: Participate in our community forums and development discussions 86 | 87 | ## **🌟 Vision** 88 | 89 | We envision a future where every researcher has access to intelligent AI assistants tailored to their specific domain. By providing high-quality examples and a robust framework, we aim to accelerate scientific discovery through the democratization of AI agent technology. 90 | 91 | ## **📄 License** 92 | 93 | This project is licensed under the terms specified in the [LICENSE](LICENSE) file. 94 | 95 | --- 96 | 97 |98 | Start building your intelligent research assistant today! 99 |
100 | -------------------------------------------------------------------------------- /agents/SRAgent/README.md: -------------------------------------------------------------------------------- 1 | # NexusAgent-SR 2 | 3 | > 🔬 **基于Google ADK的符号回归智能代理系统** 4 | > 自动将原始数据转换为可解释的数学模型 5 | 6 | [](http://license.coscl.org.cn/MulanPSL2) 7 | [](https://www.python.org/downloads/) 8 | 9 | ## ✨ 系统特性 10 | 11 | - 🤖 **多智能代理协同** - 基于Google ADK框架的智能代理编排系统 12 | - 📊 **自动数据分析** - 生成详细的数据特征描述和背景研究 13 | - 🔍 **深度文献调研** - 基于AI的领域知识提取 14 | - ⚡ **高效符号回归** - 基于PySR的高性能符号回归 15 | - 📝 **智能报告生成** - 自动生成科学研究报告并迭代优化 16 | 17 | ## 🚀 快速开始 18 | 19 | ### 环境配置 20 | 21 | 1. **安装依赖** 22 | ```bash 23 | pip install -r requirements.txt 24 | 25 | cd nexus-ui 26 | npm install >/dev/null 2>&1 27 | 28 | ``` 29 | 30 | 2. **配置环境变量** 31 | 在项目Nexusagent_SR内创建 `.env` 文件: 32 | ```bash 33 | # 模型配置 34 | DEEPRESEARCH_MODEL=deepseek-chat 35 | DEEPRESEARCH_ENDPOINT=https://api.deepseek.com 36 | 37 | TAVILY_API_KEY= 38 | SEARCH_TOOL=tavily 39 | 40 | #LLM model 41 | MODEL=deepseek/deepseek-chat 42 | DEEPSEEK_API_KEY= 43 | 44 | ``` 45 | 46 | 47 | 系统启动后,可通过Web界面与NexusAgent进行交互。 48 | 49 | ## 💻 用户界面 (UI) 50 | 51 | NexusAgent-SR 提供了现代化的 Web 用户界面,让您可以更直观地与系统交互。 52 | 53 | ### UI 特性 54 | 55 | - 🎨 **现代化设计** - 基于 React + TailwindCSS 的响应式界面 56 | - 💬 **实时对话** - WebSocket 支持的实时消息通信 57 | - 📁 **文件管理** - 直接在界面中查看输出文件和结果 58 | - 🔄 **任务状态** - 实时显示工具执行和任务进度 59 | - 🌓 **深色模式** - 支持明暗主题切换 60 | 61 | ### 启动 UI 62 | 63 | ```bash 64 | # 使用启动脚本 65 | 66 | ./start-nexus.sh 67 | 68 | ``` 69 | 70 | 访问 http://localhost:5173 即可使用界面。 71 | 72 | ### UI 架构 73 | 74 | - **前端**: React + TypeScript + Vite 75 | - **后端**: FastAPI + WebSocket 76 | - **通信**: 实时双向 WebSocket 连接 77 | 78 | 更多 UI 扩展信息请参考 [UI 扩展指南](docs/UI_EXTENSION_GUIDE.md)。 79 | 80 | ## 🏗️ 核心架构 81 | 82 | ### 智能代理编排 (`agent.py`) 83 | 84 | 系统由以下智能代理组成: 85 | 86 | ``` 87 | root_agent (NexusAgent) 88 | ├── research_agent # 数据分析与描述生成 89 | └── sr_iteration_agent # 符号回归迭代流程 90 | ├── prior_agent # 先验知识配置 91 | ├── symbolic_agent # 符号回归执行 92 | └── summarize_agent # 结果总结生成 93 | ``` 94 | 95 | **主要代理功能:** 96 | - **ResearchAgent**: 生成数据特征描述 97 | - **PriorAgent**: 设置算子和映射配置 98 | - **SymbolicAgent**: 执行符号回归算法 99 | - **SummarizeAgent**: 生成科学研究报告 100 | 101 | ### 工具集合 (`tool/`) 102 | 103 | | 工具模块 | 主要功能 | 说明 | 104 | |---------|---------|------| 105 | | `pysr.py` | 标准符号回归 | 基于PySR的多变量符号回归 | 106 | | `deepresearch.py` | 深度研究 | AI驱动的文献调研和知识提取 | 107 | | `summarize_report.py` | 报告生成 | 自动生成科学研究报告 | 108 | | `iteration_manager.py` | 迭代管理 | 管理多轮实验的历史记录 | 109 | | `task_manager.py` | 任务管理 | 异步任务状态跟踪 | 110 | | `utils.py` | 工具函数 | 数据处理和表达式简化 | 111 | 112 | ## 📊 使用方式 113 | 114 | ### 1. Web界面交互 115 | 116 | 启动 `adk web` 后,在Web界面中输入任务描述: 117 | 118 | ``` 119 | I am working on a standard symbolic regression task. The dataset describes a biophysical neuronal dynamic system, in which: • x₁ represents the membrane potential, • x₂ is a fast activation variable (e.g., associated with fast ion channels), • x₃ is a slow adaptation variable (e.g., representing slow potassium or calcium currents). The objective is to infer the form of the differential equation governing the change in membrane potential, i.e., y = dx₁/dt as a function of x₁, x₂, and x₃. It is assumed that the system does not involve magnetic flux modulation.csv path is data/hr_example.csv 120 | 121 | ``` 122 | 123 | 124 | 125 | 126 | ## 📋 输出结果 127 | 128 | - **📊 最优表达式**: 发现的数学方程 129 | - **📈 复杂度分析**: 模型复杂度和精度评估 130 | - **📝 科学报告**: 包含背景、方法、结果的完整报告 131 | - **🔍 研究文献**: 相关领域的文献调研结果 132 | - **📁 结果文件**: 133 | - `output/summarize_report.md` - 总结报告 134 | - `results.json` - 完整的符号回归结果 135 | - `best.txt` - 最优表达式 136 | 137 | ## 🛠️ 开发说明 138 | 139 | ### 目录结构 140 | ``` 141 | NexusAgent/ 142 | ├── Nexusagent_SR/ # 核心代理模块 143 | │ ├── agent.py # 主代理编排(已弃用) 144 | │ ├── subagent.py # 新的代理实现 145 | │ ├── prompt/ # 提示词模板 146 | │ ├── tool/ # 工具集合 147 | │ └── .env # 环境配置 148 | ├── nexus-ui/ # 前端界面 149 | │ ├── src/ # React 源代码 150 | │ │ ├── components/ # UI 组件 151 | │ │ └── styles/ # 样式文件 152 | │ └── package.json # 前端依赖 153 | ├── data/ # 示例数据 154 | ├── output/ # 输出结果 155 | ├── docs/ # 文档 156 | │ └── UI_EXTENSION_GUIDE.md # UI 扩展指南 157 | ├── nexus-websocket-server.py # WebSocket 服务器 158 | └── start-nexus.sh # 启动脚本 159 | 160 | ``` 161 | 162 | ### 扩展开发 163 | - 添加新的符号回归算法: 扩展 `tool/pysr*.py` 164 | - 集成新的AI模型: 修改 `subagent.py` 中的模型配置 165 | - 自定义提示词: 编辑 `prompt/agent_prompt.py` 166 | - 新增工具函数: 在 `tool/agent_tool.py` 中注册 167 | - 扩展 UI 功能: 参考 [UI 扩展指南](docs/UI_EXTENSION_GUIDE.md) 168 | - 添加新的 WebSocket 消息类型: 修改 `nexus-websocket-server.py` 169 | 170 | ## 🔧 故障排除 171 | 172 | ### 常见问题 173 | 174 | 1. **WebSocket 连接失败** 175 | - 确保后端服务器在 8000 端口运行 176 | - 检查防火墙设置 177 | 178 | 2. **前端无法加载** 179 | - 确保已安装 Node.js 和 npm 180 | - 运行 `npm install` 安装依赖 181 | 182 | 3. **代理执行超时** 183 | - 检查 API 密钥配置 184 | - 确认网络代理设置正确 185 | 186 | ## 🤝 贡献 187 | 188 | 欢迎提交 Issue 和 Pull Request! 189 | 190 | ## 📞 联系方式 191 | 192 | 如有问题或建议,请通过 GitHub Issues 联系我们。 193 | 194 | -------------------------------------------------------------------------------- /agents/DPA_Agent/ui/src/components/MessageAnimation.tsx: -------------------------------------------------------------------------------- 1 | import React, { useState, useEffect, useRef } from 'react'; 2 | import { motion, AnimatePresence } from 'framer-motion'; 3 | 4 | interface TypewriterEffectProps { 5 | text: string; 6 | speed?: number; 7 | onComplete?: () => void; 8 | className?: string; 9 | } 10 | 11 | export const TypewriterEffect: React.FC