[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-2404":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":8,"archived":16,"fork":16,"defaultBranch":17,"hasWiki":18,"hasPages":16,"topics":19,"createdAt":8,"pushedAt":8,"updatedAt":20,"readmeContent":21,"aiSummary":22,"trendingCount":13,"starSnapshotCount":13,"syncStatus":23,"lastSyncTime":24,"discoverSource":25},2404,"sciagent-thermal","wangmanqin\u002Fsciagent-thermal","wangmanqin",null,"Python",164,15,6,0,57,3.61,false,"main",true,[],"2026-06-12 02:00:41","# SciAgent: An AI Agent Framework for Scientific Computing (AI4S)\n\n> **Integrated and sponsored by [InfMind](https:\u002F\u002Finfmind.ai\u002F)**, an overseas\n> AI-for-science compute platform. SciAgent-Thermal runs as one of InfMind's\n> reference agents for multi-tool scientific-computing workflows — huge thanks\n> to the InfMind team for the compute credits and platform integration.\n\nSciAgent is an AI Agent framework that solves microchannel heat sink design\nproblems from a single natural-language prompt. It follows a\n**Prompt–Tool–Workflow** three-layer architecture, exposes its scientific\ntools over the **Model Context Protocol (MCP)**, orchestrates multi-tool\ncollaboration via a **Workflow** layer, and executes model-generated code\ninside an **AST whitelist + subprocess** **Sandbox**.\n\n- Benchmark: 10-task microchannel heat-sink evaluation set\n- Pass rate: **10\u002F10 (100%)**\n- Average score: **88.8 \u002F 100**\n\n## Architecture\n\n```\n┌────────────────────────────────────────────────────────────────┐\n│                         SciAgent                               │\n│                                                                │\n│   ┌─────────────┐   ┌──────────────┐   ┌──────────────────┐    │\n│   │   Prompt    │   │   Workflow   │   │      Tools       │    │\n│   │   layer     │──▶│  ReAct loop  │◀─▶│ (via MCP server) │    │\n│   │ system.py   │   │   react.py   │   │                  │    │\n│   └─────────────┘   └──────┬───────┘   └──────┬───────────┘    │\n│                            │                  │                │\n│                            ▼                  ▼                │\n│                      ┌──────────┐      ┌──────────────┐        │\n│                      │   LLM    │      │   Sandbox    │        │\n│                      │ llm.py   │      │ ast_whitelist│        │\n│                      └──────────┘      │ + subprocess │        │\n│                                        └──────────────┘        │\n└────────────────────────────────────────────────────────────────┘\n```\n\n### Layers\n\n| Layer | Module | Responsibility |\n|------|--------|----------------|\n| **Prompt** | [sciagent\u002Fprompts\u002F](sciagent\u002Fprompts\u002F) | System prompt + domain hints + tool-selection guide, assembled on demand. |\n| **Tool**  | [sciagent\u002Ftools\u002F](sciagent\u002Ftools\u002F) | Validated domain tools (water properties, Shah-London Nu\u002FfRe, Dittus-Boelter, hydraulic diameter, fin efficiency) + generic tools (`run_python_code`, `save_xy_plot`). |\n| **Workflow** | [sciagent\u002Fworkflow\u002Freact.py](sciagent\u002Fworkflow\u002Freact.py) | ReAct (think → act → observe) loop that orchestrates multi-tool collaboration end-to-end, emits per-step events, caps iterations. |\n\n### MCP server\n\n[sciagent\u002Fmcp_server\u002F](sciagent\u002Fmcp_server\u002F) publishes the entire Tool layer over the Model Context Protocol (JSON-RPC 2.0 over stdio, `initialize` \u002F `tools\u002Flist` \u002F `tools\u002Fcall`). The same tool set is usable from any MCP host (Claude Desktop, Claude Code, Cursor, …):\n\n```bash\npython -m sciagent.mcp_server\n```\n\n### Sandbox\n\n[sciagent\u002Fsandbox\u002Fast_whitelist.py](sciagent\u002Fsandbox\u002Fast_whitelist.py) performs static analysis on every code snippet before execution:\n- Imports must be in a whitelist (numpy, scipy, matplotlib, deap, pandas, stdlib math\u002Fstats).\n- Forbidden names: `eval`, `exec`, `compile`, `__import__`, `open`, `input`.\n- Forbidden attr calls: `os.system`, `subprocess.*`, `socket.*`, network libs.\n- Dangerous dunder access (`__class__`, `__globals__`, …) is blocked.\n\nCode that passes the static check is then run in an isolated `subprocess` with a 60-second timeout, so a crash or infinite loop in generated code cannot take down the host process.\n\n## Evaluation\n\nBenchmark: 10 microchannel-heat-sink tasks, covering multi-step reasoning,\nparameter calculations, and tool-call chains.\n\n| Metric | Result |\n|--------|--------|\n| Pass rate | **10\u002F10 (100%)** |\n| Average score | **88.8 \u002F 100** |\n| Avg. iterations per task | 4.0 |\n| Avg. time per task | 260.7 s |\n\nDimensions covered:\n- Heat-transfer fundamentals (fin efficiency, Nu=3.66 verification)\n- Fluid mechanics (hydraulic diameter, friction factor)\n- Microchannel thermal analysis (pressure drop, thermal-resistance network)\n- Parametric study (Nu vs aspect ratio)\n- Single- and multi-objective optimization (NSGA-II)\n- Comprehensive design\n\nSee [eval_reports\u002FBENCHMARK_README.md](eval_reports\u002FBENCHMARK_README.md) and the latest report [eval_reports\u002Feval_report_20260409_212803.md](eval_reports\u002Feval_report_20260409_212803.md).\n\n## Quick Start\n\n```bash\npip install -r requirements.txt\ncp .env.example .env   # put your DEEPSEEK_API_KEY inside\n\n# CLI chat\npython main.py\n\n# Run the full benchmark\npython evaluate.py\n\n# Boot the MCP server (for Claude Desktop \u002F Cursor \u002F ...)\npython -m sciagent.mcp_server\n```\n\n## Repository Layout\n\n```\nsciagent_2\u002F\n├── sciagent\u002F\n│   ├── prompts\u002F          # Prompt layer\n│   ├── tools\u002F            # Tool layer (7 tools)\n│   ├── workflow\u002F         # Workflow layer (ReAct)\n│   ├── sandbox\u002F          # AST whitelist + subprocess isolation\n│   ├── mcp_server\u002F       # MCP protocol server\n│   ├── llm.py            # Unified DeepSeek \u002F Claude \u002F Mock wrapper\n│   └── agent.py          # Thin facade composing the three layers\n├── benchmark.json        # 10-task evaluation set\n├── evaluate.py           # Benchmark runner & scorer\n├── main.py               # CLI entry point\n└── eval_reports\u002F         # Auto-generated evaluation reports\n```\n\n## Acknowledgements\n\n- **[InfMind](https:\u002F\u002Finfmind.ai\u002F)** — overseas AI4S compute platform. SciAgent-Thermal is integrated into InfMind as a reference scientific-computing agent; the project's benchmark runs and MCP-server demos are powered by InfMind's compute credits. Thanks to the InfMind team for the sponsorship and for pushing AI-for-science tooling forward.\n- **DEAP** — NSGA-II reference implementation.\n- **Anthropic's Model Context Protocol** — the standard that lets this project's tools plug into any MCP-capable host.\n\n## License\n\nMIT\n","SciAgent是一个专为科学计算设计的AI代理框架，特别针对微通道散热器设计问题提供解决方案。它采用Prompt-Tool-Workflow三层架构，通过Model Context Protocol（MCP）暴露其科学工具，并通过工作流层协调多工具协作，同时在AST白名单加子进程沙箱中执行模型生成的代码。该项目适合需要高效解决复杂科学计算任务的场景，如热力学分析、流体力学模拟等，尤其适用于科研人员和工程师快速原型设计与测试。基于Python开发，SciAgent能够从单一自然语言提示中理解并解决问题，展示了强大的自动化能力和灵活性。",2,"2026-06-11 02:49:48","CREATED_QUERY"]