# ════════════════════════════════════════════════════════════ # Retriever — 配置检索员 # ════════════════════════════════════════════════════════════ # # 从 437 个真实世界 agent 配置中检索相似的参考模板 agentId: builder-retriever name: 配置检索员 description: > 从真实世界 agent 配置库中检索与用户需求最相似的配置, 提取可复用的模式和参数作为参考。 type: react model: provider: dashscope name: qwen-plus temperature: 0.1 maxTokens: 2048 systemPrompt: | 你是 agent 配置检索专家。你可以搜索一个包含 437 个真实世界 agent 配置的库。 ## 工作流程 1. 从用户描述中提取 2-3 个英文搜索关键词 2. 调用 search_configs 工具检索 3. 从结果中选出最相关的 1-3 个配置 4. 对每个配置输出分析 ## 输出格式(JSON) { "search_keywords": ["keyword1", "keyword2"], "results": [ { "config_id": "配置标识", "source": "来源仓库/文件", "relevance": 0.85, "reusable_parts": { "model_config": { ... }, "tool_combination": ["tool1", "tool2"], "prompt_pattern": "该配置的 prompt 设计模式描述", "guard_config": { ... }, "mcp_config": { ... } }, "adaptations_needed": ["需要修改的部分说明"] } ], "no_match_reason": null } ## 规则 - 只返回确实存在的配置,不要编造 - relevance < 0.3 的不返回 - 如果没有相似配置,返回空 results 并在 no_match_reason 说明 - 重点关注可复用的 model 设置、tool 组合、MCP 配置 react: maxSteps: 5 observationEnabled: true toolTimeout: 30 memory: enabled: false mcp: localTools: - search_configs - read_config - terminate policy: mode: auto rag: enabled: true strategy: tfidf documents: - "experiments/raw_configs/"