🚀 AI授权爬虫A2A Pro
生产就绪的自主授权发现和提案生成系统 使用MCP抓取器、A2A编排、多模型AI代理和实时可视化。
______________________________________________________________________
✨ 这个系统做什么
这是一个 完整的拨款申请自动化平台 即:
- 发现 来自多个来源的相关资助(欧盟地平线、美国国家科学基金会、私人基金会)
- 火柴 使用AI支持的相关性评分为您的公司档案提供资助
- 生成提案 有两种模式:
- ⚡ 快速通道 (30秒)-通过Gemini 2.5 Pro即时提交提案 - 🔬 研究方向 (5-15分钟)-通过人工智能代理实验室进行深度自主研究
______________________________________________________________________
🏗️ 系统架构
该系统遵循线性4相管道,专为自主性和精度而设计:
graph LR
%% PHASE 1: DISCOVERY
subgraph PHASE_1 [PHASE 1: DISCOVERY & MATCHING]
direction TB
Sources[Sources: EU/NSF/Foundations] --> Firecrawl[Firecrawl Engine]
Firecrawl --> Analyzer[AI Feature/Relevance Extractor]
Analyzer -->|Score > 50| DB[(Supabase DB)]
Analyzer -->|Score |Real-time| Dashboard[SvelteKit Dashboard]
Dashboard -->|User Clicks Apply| API[API Gateway]
end
%% PHASE 3: ORCHESTRATION
subgraph PHASE_3 [PHASE 3: ORCHESTRATION]
API --> Strategy{Strategy Router}
Strategy -->|Fast Track| Gemini[Gemini 2.5 Pro]
Strategy -->|Research Track| LabRunner[Lab Orchestrator]
end
%% PHASE 4: AGENT LAB
subgraph PHASE_4 [PHASE 4: AGENT LABORATORY]
direction TB
LabRunner --> PhD[PhD Student - Claude Opus 4.5]
PhD --> Postdoc1[Postdoc Plan - Gemini 3 Pro]
Postdoc1 --> Eng[ML and SW Engineers - GPT-5 Codex]
Eng --> Postdoc2[Results Analysis - Gemini 3 Pro]
Postdoc2 --> Prof[Professor Writing - Claude Sonnet 4.5]
Prof --> Review[Review Board - Gemini 3 Pro]
Review --> Final[Research-Grade Proposal]
end1.发现引擎(自动)
- 来源持续监控欧盟地平线、grants.gov和私人基金会。
- 萤火虫:将拨款页面中的原始非结构化文本抓取到Markdown中。
- AI过滤器:使用Gemini Pro提取标准元数据并计算 相关性得分(0-100) 具体到你的初创公司的个人资料。只有高价值的匹配才能进入数据库。
2.双轨制处理
一旦用户选择“应用”,系统就会根据深度需求路由请求:
- 快速通道:使用Gemini 2.5 Pro的单镜头提示进行即时(约30秒)草稿。
- 研究方向:激活 代理实验室 (下图)进行深入调查。
______________________________________________________________________
______________________________________________________________________
🤖 人工智能研究实验室-代理工作流程
这 研究方向 使用由6个专业AI代理组成的团队,每个代理在 最优模型 对于他们的任务:
╔══════════════════════════════════════════════════════════════════════════════════════╗
║ 🔬 AI RESEARCH LABORATORY WORKFLOW ║
║ Maximum Quality Multi-Model Orchestration ║
╠══════════════════════════════════════════════════════════════════════════════════════╣
║ ║
║ PHASE 1: LITERATURE REVIEW ║
║ ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║ │ 📚 PhD Student Agent │ ║
║ │ ───────────────────────────────────────────────────────────────────────── │ ║
║ │ Model: Claude Opus 4.5 (Reasoning) Cost: ~$2.50/run │ ║
║ │ Why: Best reasoning (69.77 score), excellent research synthesis │ ║
║ │ │ ║
║ │ Tasks: │ ║
║ │ • Search academic papers related to grant topic │ ║
║ │ • Analyze 10-20 relevant publications │ ║
║ │ • Extract key methodologies and findings │ ║
║ │ • Identify research gaps and opportunities │ ║
║ │ │ ║
║ │ Output: Literature review summary, cited sources, key insights │ ║
║ └─────────────────────────────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ PHASE 2: PLAN FORMULATION ║
║ ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║ │ 📋 Postdoc Agent │ ║
║ │ ───────────────────────────────────────────────────────────────────────── │ ║
║ │ Model: Gemini 3 Pro (high) Cost: FREE ✨ │ ║
║ │ Why: Top reasoning (72.85 score), 95.67% math, FREE via Gemini API │ ║
║ │ │ ║
║ │ Tasks: │ ║
║ │ • Synthesize literature findings │ ║
║ │ • Formulate research methodology │ ║
║ │ • Define project milestones and deliverables │ ║
║ │ • Create detailed research plan │ ║
║ │ │ ║
║ │ Output: Research plan, methodology, timeline, success metrics │ ║
║ └─────────────────────────────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ PHASE 3: DATA PREPARATION ║
║ ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║ │ 📊 ML Engineer Agent + 🔧 SW Engineer Agent │ ║
║ │ ───────────────────────────────────────────────────────────────────────── │ ║
║ │ ML Model: GPT-5 Codex (high) Cost: ~$1.00/run │ ║
║ │ SW Model: Claude Opus 4.5 Cost: ~$2.00/run │ ║
║ │ Why: GPT-5 Codex has 98.67% math, Claude has 87.1% LiveCodeBench │ ║
║ │ │ ║
║ │ Tasks (ML Engineer): │ ║
║ │ • Identify required datasets │ ║
║ │ • Design data collection strategy │ ║
║ │ • Prepare data processing pipelines │ ║
║ │ │ ║
║ │ Tasks (SW Engineer): │ ║
║ │ • Set up development environment │ ║
║ │ • Implement data loaders and transformations │ ║
║ │ • Ensure code quality and documentation │ ║
║ │ │ ║
║ │ Output: Dataset specifications, code implementations, requirements.txt │ ║
║ └─────────────────────────────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ PHASE 4: RUNNING EXPERIMENTS ║
║ ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║ │ 🧪 ML Engineer Agent (continued) │ ║
║ │ ───────────────────────────────────────────────────────────────────────── │ ║
║ │ Model: GPT-5 Codex (high) Cost: (included above) │ ║
║ │ │ ║
║ │ Tasks: │ ║
║ │ • Execute experimental protocols │ ║
║ │ • Run simulations and benchmarks │ ║
║ │ • Collect and validate results │ ║
║ │ • Generate visualizations │ ║
║ │ │ ║
║ │ Output: Experimental results, charts, performance metrics │ ║
║ └─────────────────────────────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ PHASE 5: RESULTS INTERPRETATION ║
║ ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║ │ 📈 Postdoc Agent (continued) │ ║
║ │ ───────────────────────────────────────────────────────────────────────── │ ║
║ │ Model: Gemini 3 Pro (high) Cost: FREE ✨ │ ║
║ │ │ ║
║ │ Tasks: │ ║
║ │ • Analyze experimental outcomes │ ║
║ │ • Compare results to initial hypotheses │ ║
║ │ • Identify key findings and implications │ ║
║ │ • Assess alignment with grant objectives │ ║
║ │ │ ║
║ │ Output: Results analysis, key findings, comparison to objectives │ ║
║ └─────────────────────────────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ PHASE 6: REPORT WRITING ║
║ ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║ │ 📝 Professor Agent │ ║
║ │ ───────────────────────────────────────────────────────────────────────── │ ║
║ │ Model: Claude Sonnet 4.5 (Reasoning) Cost: ~$1.50/run │ ║
║ │ Why: Excellent writing quality + reasoning balance │ ║
║ │ │ ║
║ │ Tasks: │ ║
║ │ • Structure the grant proposal │ ║
║ │ • Write executive summary │ ║
║ │ • Compose methodology section │ ║
║ │ • Draft budget justification │ ║
║ │ • Create impact statement │ ║
║ │ │ ║
║ │ Output: Complete grant proposal draft in LaTeX/Markdown │ ║
║ └─────────────────────────────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ PHASE 7: QUALITY REVIEW & REFINEMENT ║
║ ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║ │ ✨ Reviewers Panel │ ║
║ │ ───────────────────────────────────────────────────────────────────────── │ ║
║ │ Model: Gemini 3 Pro (high) Cost: FREE ✨ │ ║
║ │ Why: Top GPQA (90.8%), rigorous logical reasoning │ ║
║ │ │ ║
║ │ Tasks: │ ║
║ │ • Score proposal on multiple criteria │ ║
║ │ • Identify weaknesses and gaps │ ║
║ │ • Suggest specific improvements │ ║
║ │ • Verify alignment with grant requirements │ ║
║ │ • Final quality assessment │ ║
║ │ │ ║
║ │ Output: Review scores, improvement suggestions, final approval │ ║
║ └─────────────────────────────────────────────────────────────────────────────┘ ║
║ │ ║
║ ▼ ║
║ ┌─────────────────────────────────────────────────────────────────────────────┐ ║
║ │ 📄 FINAL OUTPUT: RESEARCH-GRADE PROPOSAL │ ║
║ │ │ ║
║ │ • Complete grant proposal with citations │ ║
║ │ • Detailed methodology and timeline │ ║
║ │ • Budget breakdown and justification │ ║
║ │ • Impact statement and broader implications │ ║
║ │ • Quality score and confidence rating │ ║
║ └─────────────────────────────────────────────────────────────────────────────┘ ║
║ ║
╠══════════════════════════════════════════════════════════════════════════════════════╣
║ 💰 COST SUMMARY (per research run) ║
║ ─────────────────────────────────────────────────────────────────────────────────── ║
║ PhD Student (Claude Opus 4.5): $2.50 ║
║ Postdoc (Gemini 3 Pro): $0.00 ← FREE! ║
║ ML Engineer (GPT-5 Codex): $1.00 ║
║ SW Engineer (Claude Opus 4.5): $2.00 ║
║ Professor (Claude Sonnet 4.5): $1.50 ║
║ Reviewers (Gemini 3 Pro): $0.00 ← FREE! ║
║ ─────────────────────────────────────────────────────────────────────────────────── ║
║ TOTAL ESTIMATED COST: $7.00 - $15.00 per proposal ║
╚══════════════════════════════════════════════════════════════════════════════════════╝______________________________________________________________________
🚀 快速开始
先决条件
- Node.js 18+
- Python 3.10+(用于研究方向)
- Supabase账户(免费版)
- API密钥:
- API双子星 (免费,必填) - OpenRouter API (对于最高质量模式,建议使用约20美元的信用额度)
后端设置
cd backend
npm install
# Copy environment template
cp .env.example .env
# Edit .env with your API keys:
# - SUPABASE_URL
# - SUPABASE_ANON_KEY
# - GEMINI_API_KEY (free from Google AI Studio)
# - OPENROUTER_API_KEY (for Maximum Quality mode)
npm run dev备注:对于生产部署,您必须设置PUBLIC_API_URL在您的前端环境(例如Vercel)中指向所部署后端服务的实时公共URL(例如。,https://your-backend.up.railway.app/api).
数据库设置:运行 schema.sql 在您的Supabase SQL编辑器中。
前端设置
cd frontend
npm install
npm run dev人工智能研究员设置(可选-用于研究轨道)
windows用户:需要Microsoft Visual C++14.0+构建工具
# Install from: https://visualstudio.microsoft.com/visual-cpp-build-tools/然后,对于所有平台:
cd backend/ai-researcher
pip install -e .
playwright install______________________________________________________________________
📁 项目结构
ai-grant-crawler-a2a-pro/
│
├── backend/ # Node.js/Express API Server
│ ├── src/
│ │ ├── routes/ # API endpoints
│ │ │ ├── grants.js # Grant CRUD operations
│ │ │ └── proposals.js # Proposal generation endpoints
│ │ ├── services/
│ │ │ ├── grantMatcher.js # AI relevance scoring
│ │ │ └── aiResearcher.js # Research Track orchestration
│ │ ├── config/
│ │ │ └── gemini.js # Gemini 3 Pro configuration
│ │ └── utils/
│ │ └── sseHelper.js # Server-Sent Events streaming
│ │
│ └── ai-researcher/ # Python AI Research Laboratory
│ ├── agents.py # Agent class definitions
│ ├── agent_models.py # Per-agent model configuration ✨ NEW
│ ├── inference.py # Multi-provider API (OpenRouter, Gemini, OpenAI)
│ ├── ai_lab_repo.py # Main workflow orchestrator
│ └── experiment_configs/ # YAML experiment configurations
│
├── frontend/ # SvelteKit Application
│ ├── src/
│ │ ├── routes/
│ │ │ ├── +page.svelte # Grant dashboard
│ │ │ └── thinktank/
│ │ │ └── [grantId]/ # Research visualization page
│ │ └── lib/
│ │ └── components/ # Reusable UI components
│ │
│ └── static/ # Static assets
│
└── docs/ # Documentation & diagrams______________________________________________________________________
🔑 API密钥配置
必需
| 密钥 | 提供商 | 成本 | 用于 |
|---|---|---|---|
GEMINI_API_KEY | 谷歌AI工作室 | 免费 | 博士后、审稿人、快速通道 |
最高质量模式
| 密钥 | 提供商 | 成本 | 用于 |
|---|---|---|---|
OPENROUTER_API_KEY | 开放路由 | 约20美元/次 | 克劳德作品4.5,GPT-5 Codex,克劳德十四行诗4.5 |
______________________________________________________________________
📊 模型基准源
模型选择基于2024-2025年12月的基准数据:
- 人工分析排行榜
- AIME 2025、GPQA钻石、LiveCodeBench、HumanEval
______________________________________________________________________
🔬 科学基础与方法论
该系统实现了 代理实验室 如论文中详细描述的框架 _代理实验室:使用LLM代理作为研究助理_ (Schmidgall等人,2025)。
该架构忠实地再现了论文的三阶段自主研究工作流程:
- 文献综述阶段:实现论文的“博士生”代理角色,查询arXiv/Semantic Scholar,进行独立的文献综合,而不是简单的总结。
- 实验阶段:利用 MLE求解器 本文中描述的方法,其中ML工程师代理根据错误跟踪和性能指标迭代改进代码(在基准测试中实现最先进的性能)。
- 报告撰写阶段:采用“教授”代理角色,将研究结果综合成连贯的叙述,将构思(人/代理协作)与起草工作分开。
研究影响:最初的研究表明,这种多智能体方法通过以下方式降低了研究成本 84% 与传统方法相比,在可比任务中保持或超过人类水平的质量。
______________________________________________________________________
📝 许可证
麻省理工学院许可证-请随时将其用于您的资助申请!
______________________________________________________________________
🙏 致谢
- 代理实验室 -原始研究代理框架
- Anthropic、谷歌、OpenAI、DeepSeek -对于令人惊叹的AI模型
- 你 -为了构建自动化拨款写作的未来!
