""" 项目配置 """ from agent.core.runner import KnowledgeConfig, RunConfig # ===== 主 Agent 配置(Coordinator,负责分发调研方向 + 汇总策略)===== # 是否开启子 Agent 真并发调研(极大榨取网络 IO 速度) PARALLEL_TOOL_EXECUTION = True COORDINATOR_RUN_CONFIG = RunConfig( model="qwen-plus", temperature=0.3, max_iterations=800, parallel_tool_execution=PARALLEL_TOOL_EXECUTION, extra_llm_params={}, agent_type="coordinator", name="工序调研协调器", knowledge=KnowledgeConfig( enable_extraction=False, enable_completion_extraction=False, enable_injection=False, owner="sunlit.howard@gmail.com", ) ) # ===== 输出目录 ===== OUTPUT_DIR = "examples/process_research/output" # 每个需求输出到 output/{N}/ # ===== 基础设施配置 ===== SKILLS_DIR = "./skills" TRACE_STORE_PATH = ".trace" DEBUG = True LOG_LEVEL = "INFO" LOG_FILE = None # ===== 浏览器配置 ===== # 当 PARALLEL_TOOL_EXECUTION=True 时,强烈建议使用 cloud(云浏览器)或 headless,否则本地会出现抢鼠标冲突! BROWSER_TYPE = "local" if not PARALLEL_TOOL_EXECUTION else "cloud" HEADLESS = False # ===== IM 配置 ===== IM_ENABLED = True IM_CONTACT_ID = "agent_research" IM_SERVER_URL = "ws://43.106.118.91:8105" IM_WINDOW_MODE = True IM_NOTIFY_INTERVAL = 10.0 # ===== 远端 Research Agent 配置 ===== # 此 pipeline 的 researcher 子 Agent 需要写文件到本地 output_dir, # 因此必须使用本地模式(USE_REMOTE_RESEARCH = False)。 # 远端模式(True)仅适用于不需要写本地文件的单体 Agent 场景。 USE_REMOTE_RESEARCH = False # 线上 KnowHub 地址(也可通过 .env 的 KNOWHUB_API 变量覆盖) # subagent._run_remote_agent 运行时会读取 KNOWHUB_API 环境变量 # 这里显式设置以便 config 层可见 import os as _os _os.environ.setdefault("KNOWHUB_API", "http://43.106.118.91:9999")