config.py 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. """
  2. 项目配置
  3. 定义项目的运行配置。
  4. """
  5. from agent.core.runner import KnowledgeConfig, RunConfig
  6. # ===== Agent 运行配置 =====
  7. RUN_CONFIG = RunConfig(
  8. # 模型配置
  9. model="qwen3.5-plus",
  10. temperature=0.3,
  11. max_iterations=1000,
  12. # 启用 thinking 模式
  13. extra_llm_params={"extra_body": {"enable_thinking": True}},
  14. # Agent 预设(对应 presets.json 中的 "main")
  15. agent_type="main",
  16. # 任务名称
  17. name="工具调研与文档生成",
  18. # 知识管理配置
  19. knowledge=KnowledgeConfig(
  20. enable_extraction=False,
  21. enable_completion_extraction=True,
  22. enable_injection=False,
  23. owner="sunlit.howard@gmail.com",
  24. default_tags={"project": "tool_research", "domain": "ai_agent"},
  25. default_scopes=["org:cybertogether"],
  26. default_search_types=["tool", "guide"],
  27. default_search_owner="sunlit.howard@gmail.com"
  28. )
  29. )
  30. # ===== 任务配置 =====
  31. OUTPUT_DIR = "examples/research/outputs/seedream" # 输出目录
  32. # ===== 基础设施配置 =====
  33. SKILLS_DIR = "./skills"
  34. TRACE_STORE_PATH = ".trace"
  35. DEBUG = True
  36. LOG_LEVEL = "INFO"
  37. LOG_FILE = None # 设置为文件路径可以同时输出到文件
  38. # ===== 浏览器配置 =====
  39. # 可选值: "cloud" (云浏览器) 或 "local" (本地浏览器) 或 "container" (容器浏览器,支持预配置账户)
  40. BROWSER_TYPE = "local"
  41. HEADLESS = False
  42. # ===== IM 配置 =====
  43. IM_ENABLED = True # 是否启动 IM Client
  44. IM_CONTACT_ID = "agent_research" # Agent 在 IM 系统中的身份 ID
  45. IM_SERVER_URL = "ws://localhost:8005" # IM Server WebSocket 地址
  46. IM_WINDOW_MODE = True # 窗口模式(True=每次运行消息隔离,推荐)
  47. IM_NOTIFY_INTERVAL = 10.0 # 新消息检查间隔(秒)