[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-Tencent--CognitiveKernel-Pro":3,"tool-Tencent--CognitiveKernel-Pro":64},[4,17,27,35,43,56],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":16},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,3,"2026-04-05T11:01:52",[13,14,15],"开发框架","图像","Agent","ready",{"id":18,"name":19,"github_repo":20,"description_zh":21,"stars":22,"difficulty_score":23,"last_commit_at":24,"category_tags":25,"status":16},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",140436,2,"2026-04-05T23:32:43",[13,15,26],"语言模型",{"id":28,"name":29,"github_repo":30,"description_zh":31,"stars":32,"difficulty_score":23,"last_commit_at":33,"category_tags":34,"status":16},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",107662,"2026-04-03T11:11:01",[13,14,15],{"id":36,"name":37,"github_repo":38,"description_zh":39,"stars":40,"difficulty_score":23,"last_commit_at":41,"category_tags":42,"status":16},3704,"NextChat","ChatGPTNextWeb\u002FNextChat","NextChat 是一款轻量且极速的 AI 助手，旨在为用户提供流畅、跨平台的大模型交互体验。它完美解决了用户在多设备间切换时难以保持对话连续性，以及面对众多 AI 模型不知如何统一管理的痛点。无论是日常办公、学习辅助还是创意激发，NextChat 都能让用户随时随地通过网页、iOS、Android、Windows、MacOS 或 Linux 端无缝接入智能服务。\n\n这款工具非常适合普通用户、学生、职场人士以及需要私有化部署的企业团队使用。对于开发者而言，它也提供了便捷的自托管方案，支持一键部署到 Vercel 或 Zeabur 等平台。\n\nNextChat 的核心亮点在于其广泛的模型兼容性，原生支持 Claude、DeepSeek、GPT-4 及 Gemini Pro 等主流大模型，让用户在一个界面即可自由切换不同 AI 能力。此外，它还率先支持 MCP（Model Context Protocol）协议，增强了上下文处理能力。针对企业用户，NextChat 提供专业版解决方案，具备品牌定制、细粒度权限控制、内部知识库整合及安全审计等功能，满足公司对数据隐私和个性化管理的高标准要求。",87618,"2026-04-05T07:20:52",[13,26],{"id":44,"name":45,"github_repo":46,"description_zh":47,"stars":48,"difficulty_score":23,"last_commit_at":49,"category_tags":50,"status":16},2268,"ML-For-Beginners","microsoft\u002FML-For-Beginners","ML-For-Beginners 是由微软推出的一套系统化机器学习入门课程，旨在帮助零基础用户轻松掌握经典机器学习知识。这套课程将学习路径规划为 12 周，包含 26 节精炼课程和 52 道配套测验，内容涵盖从基础概念到实际应用的完整流程，有效解决了初学者面对庞大知识体系时无从下手、缺乏结构化指导的痛点。\n\n无论是希望转型的开发者、需要补充算法背景的研究人员，还是对人工智能充满好奇的普通爱好者，都能从中受益。课程不仅提供了清晰的理论讲解，还强调动手实践，让用户在循序渐进中建立扎实的技能基础。其独特的亮点在于强大的多语言支持，通过自动化机制提供了包括简体中文在内的 50 多种语言版本，极大地降低了全球不同背景用户的学习门槛。此外，项目采用开源协作模式，社区活跃且内容持续更新，确保学习者能获取前沿且准确的技术资讯。如果你正寻找一条清晰、友好且专业的机器学习入门之路，ML-For-Beginners 将是理想的起点。",84991,"2026-04-05T10:45:23",[14,51,52,53,15,54,26,13,55],"数据工具","视频","插件","其他","音频",{"id":57,"name":58,"github_repo":59,"description_zh":60,"stars":61,"difficulty_score":10,"last_commit_at":62,"category_tags":63,"status":16},3128,"ragflow","infiniflow\u002Fragflow","RAGFlow 是一款领先的开源检索增强生成（RAG）引擎，旨在为大语言模型构建更精准、可靠的上下文层。它巧妙地将前沿的 RAG 技术与智能体（Agent）能力相结合，不仅支持从各类文档中高效提取知识，还能让模型基于这些知识进行逻辑推理和任务执行。\n\n在大模型应用中，幻觉问题和知识滞后是常见痛点。RAGFlow 通过深度解析复杂文档结构（如表格、图表及混合排版），显著提升了信息检索的准确度，从而有效减少模型“胡编乱造”的现象，确保回答既有据可依又具备时效性。其内置的智能体机制更进一步，使系统不仅能回答问题，还能自主规划步骤解决复杂问题。\n\n这款工具特别适合开发者、企业技术团队以及 AI 研究人员使用。无论是希望快速搭建私有知识库问答系统，还是致力于探索大模型在垂直领域落地的创新者，都能从中受益。RAGFlow 提供了可视化的工作流编排界面和灵活的 API 接口，既降低了非算法背景用户的上手门槛，也满足了专业开发者对系统深度定制的需求。作为基于 Apache 2.0 协议开源的项目，它正成为连接通用大模型与行业专有知识之间的重要桥梁。",77062,"2026-04-04T04:44:48",[15,14,13,26,54],{"id":65,"github_repo":66,"name":67,"description_en":68,"description_zh":69,"ai_summary_zh":69,"readme_en":70,"readme_zh":71,"quickstart_zh":72,"use_case_zh":73,"hero_image_url":74,"owner_login":75,"owner_name":75,"owner_avatar_url":76,"owner_bio":77,"owner_company":78,"owner_location":78,"owner_email":78,"owner_twitter":78,"owner_website":79,"owner_url":80,"languages":81,"stars":98,"forks":99,"last_commit_at":100,"license":101,"difficulty_score":102,"env_os":103,"env_gpu":104,"env_ram":105,"env_deps":106,"category_tags":120,"github_topics":121,"view_count":23,"oss_zip_url":78,"oss_zip_packed_at":78,"status":16,"created_at":124,"updated_at":125,"faqs":126,"releases":167},4103,"Tencent\u002FCognitiveKernel-Pro","CognitiveKernel-Pro","Deep Research Agent CognitiveKernel-Pro from Tencent AI Lab. Paper: https:\u002F\u002Farxiv.org\u002Fpdf\u002F2508.00414","CognitiveKernel-Pro 是由腾讯 AI 实验室开源的深度研究智能体框架，旨在构建能够自主执行复杂调研任务的代理模型。它主要解决了传统 AI 在处理需要多步推理、大量信息检索及工具调用的深度研究任务时，往往依赖复杂的强化学习训练且效果不稳定的痛点。\n\n该项目的核心亮点在于提供了一套完全可复现的监督微调（SFT）训练方案。无需使用高门槛的强化学习（RL），CognitiveKernel-Pro 训练出的模型在性能上即可超越 WebDancer 和 WebSailor 等基于 RL 的竞品。此外，它秉持“最大化免费工具”的理念，除可选的谷歌搜索 API 外，其余功能均可通过 DuckDuckGo 等免费接口实现，大幅降低了运行成本。\n\nCognitiveKernel-Pro 特别适合 AI 研究人员、大模型开发者以及希望构建自动化深度调研系统的技术团队使用。通过该项目，用户不仅可以部署一个强大的现成智能体，还能利用其公开的数据集和训练食谱，低成本地定制和训练属于自己的 Agent 基础模型。需要注意的是，由于框架会直接执行生成的代码，建议在沙箱环境中部署以确保系统安全。","\n# Cognitive Kernel-Pro: A Framework for Deep Research Agents and Agent Foundation Models Training\n\n\n\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2508.00414-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2508.00414) [![Data](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-CognitiveKernel--Pro--Data-ffc107?color=ffc107&logoColor=white)](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-Query)  [![Data](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-CognitiveKernel--Pro--SFT-ffc107?color=ffc107&logoColor=white)](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-SFT) [![Model](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-CognitiveKernel--Pro--Model-ffc107?color=ffc107&logoColor=white)](https:\u002F\u002Fhuggingface.co\u002FCognitiveKernel\u002FQwen3-8B-CK-Pro)\n\n\u003C!-- [![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)  -->\n\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTencent_CognitiveKernel-Pro_readme_8b3278a2cbe7.png\" alt=\"\" width=\"90%\"\u002F>\u003C\u002Fp>\n\n- A state-of-the-art open-source agent utilizing (as many as possible) free tools; the only paid tool is the Google Search API, which can be replaced with the free DuckDuckGo API if needed.\n- Fully reproducible open-source SFT training recipe that outperforms RL-based models like WebDancer and WebSailor—no RL required.\n\n## Updates\n\n- 10\u002F17\u002F2025: A technical report on synthesizing DeepResearch agent data has been released! Checkout the paper [Explore to Evolve: Scaling Evolved Aggregation Logic via Proactive Online Exploration for Deep Research Agents](https:\u002F\u002Farxiv.org\u002Fabs\u002F2510.14438), the GitHub repo [WebAggregator](https:\u002F\u002Fgithub.com\u002FTencent\u002FWebAggregator).\n\n## Running Cognitive Kernel-Pro (CogKernel-Pro for short) Agent\n\n### Environment\n\n#### Python\n- python3.12 is recommended\n- Dependency:\n\n```bash\npip install boto3 botocore openai duckduckgo_search rich numpy openpyxl biopython mammoth markdownify pandas pdfminer-six python-pptx pdf2image puremagic pydub SpeechRecognition bs4 youtube-transcript-api requests transformers protobuf openai langchain_openai langchain\npip install selenium helium smolagents\n```\n\n#### Web Server (Powered by Playwright)\n\n- **On Linux**:\n\n  - Checkout the script for hosting the web engine [.\u002Fck_web\u002F_web\u002Frun_local.sh](.\u002Fck_web\u002F_web\u002Frun_local.sh).\n  - Dependency:\n  ```bash\n  apt-get install -y poppler-utils default-jre libreoffice-common libreoffice-java-common libreoffice ffmpeg\n  # for ck_web\n  sh ck_pro\u002Fck_web\u002F_web\u002Frun_local.sh\n  ```\n  - **IMPORTANT**: it is recommended to run this program in a sandbox since the generated python code is directly executed and currently there are no safety checkings. (Disable sudo for your user to ensure safety.)\n  ```bash\n  # run with root\n  echo \"${USER}\" 'ALL=(ALL) NOPASSWD: !ALL' | tee \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\n  chmod 440 \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\n  deluser ${USER} sudo\n  hostnamectl set-hostname localhost\n  ```\n- **On Mac**:\n  - Checkout the script for hosting the web engine [.\u002Fck_web\u002F_web\u002Frun_local_mac.sh](.\u002Fck_web\u002F_web\u002Frun_local_mac.sh)\n  - Dependency：\n  ```zsh\n  brew install --cask libreoffice\n  brew install poppler\n  brew install ffmpeg\n  # for ck_web\n  sh ck_pro\u002Fck_web\u002F_web\u002Frun_local_mac.sh\n  ```\n  - **IMPORTANT**: it is recommended to run this program in a sandbox since the generated python code is directly executed and currently there are no safety checkings. (Disable sudo for your user to ensure safety.)\n  ```bash\n  # run with root\n  echo \"${USER}\" 'ALL=(ALL) NOPASSWD: !ALL' | tee \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\n  chmod 440 \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\n  dseditgroup -o edit -d \"$USER\" admin\n  scutil --set HostName localhost\n  ```\n\n\u003C!-- ### Running Configuration\n通过一个整体的configuration-python-dictionary来指定运行参数，字典里的值直接对应类里面的item（支持hierarchy的方式）。init具体的mechanism详见`utils.py:KwargsInitializable`，简单来说是通过赋值`__dict__`来直接修改object。以下是对于`CKAgent`的一个例子：\n```python\n{\n    \"model\": {\"call_target\": \"gpt:gpt-4o-mini\"},  # use gpt-4o-mini for the LLM of main agent\n    \"max_steps\": 10,  # a maximum of 10 steps for the main agent\n    \"web_agent\": {\n        \"model\": {\"call_target\": \"http:\u002F\u002FMY_VLLM:8080\u002Fv1\u002Fchat\u002Fcompletions\"},  # use vllm service (replace MY_VLLM with your IP) for the web agent\n        \"web_env_kwargs\": {\"web_ip\": \"localhost:3000\"},  # IP for the web-browser server\n    }\n}\n``` -->\n\n### Example (A simple example)\n- See [`ck_main\u002F_test`](.\u002Fck_main\u002F_test) for a simple example and its corresponding outputs\n```bash\nexport PYTHONPATH=\u002Fyour\u002Fpath\u002Fto\u002FCogKernel-Pro\n# Assume we have set up a vllm model server and a web-browser server (currently these are active: WEB_IP\nWEB_IP=localhost:3001  # web-browser server\nLLM_URL=http:\u002F\u002Fxx.xx.xx.xx:8080\u002Fv1\u002Fchat\u002Fcompletions  # vllm model server\n#LLM_URL=gpt:gpt-4.1  # using gpt\n#VLM_URL=gpt:gpt-4.1  # using gpt\n#LLM_URL=claude:  # using claude\n#VLM_URL=claude:  # using claude\n# run simple test\nMAIN_ARGS=\"{'web_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': '${WEB_IP}'}}, 'file_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'call_target': '${LLM_URL}'}}\"\n# use \"NO_NULL_STDIN=1\" for easier debugging\n# you can also remove `--input` field to directly input your task from stdin\n# you can also remove `-mpdb` flag to run the program directly instead of in debugging mode\nNO_NULL_STDIN=1 python3 -u -mpdb -m ck_pro.ck_main.main --updates \"${MAIN_ARGS}\" --input \u002Fyour\u002Fpath\u002Fto\u002Fsimple_test.jsonl --output \u002Fyour\u002Fpath\u002Fto\u002Fsimple_test.output.jsonl |& tee _log_simple_test\nless -R _log_simple_test  # use 'less -R' to see the colored outputs\n```\n\n### Example (Experimenting on the GAIA dataset)\n```bash\n# Step 1: prepare data\n# decompress the gaia data (or you can download it by yourself from huggingface)\n# -> assume all the gaia related input files are at the same DIR as the input json meta-file\nunzip \u002Fyour\u002Fpath\u002Fto\u002FCogKernel-Pro\u002FEvaluation\u002Fgaia2504.zip\n# Step 2: prepare web service (recommending using a PC or laptop to enable better network connection)\n# -> prepare things according to \".\u002Fck_web\u002F_web\u002Frun_local.sh\"\n#LISTEN_PORT=3001 npm start\n#WEB_IP=localhost:3001  # web-browser server\n# Step 3: prepare a vllm instance for model calling\n# use gpt\n#LLM_URL=gpt:gpt-4.1\n#VLM_URL=gpt:gpt-4.1\n#export AZURE_OPENAI_ENDPOINT=\"YOUR_ENDPOINT\"\n#export AZURE_OPENAI_API_KEY=\"YOUR_API_KEY\"\n#export AZURE_OPENAI_API_VERSION=\"YOUR_API_VERSION\"\n# or use claude\n#LLM_URL=claude:  # using claude\n#VLM_URL=claude:  # using claude\n#export AWS_ACCESS_KEY=\"YOUR_KEY\"\n#export AWS_SECRET_ACCESS_KEY=\"YOUR_SECRET_KEY\"\nLLM_URL=http:\u002F\u002Fxx.xx.xx.xx:8080\u002Fv1\u002Fchat\u002Fcompletions  # vllm model server\nVLM_URL=http:\u002F\u002Fxx.xx.xx.xx:8081\u002Fv1\u002Fchat\u002Fcompletions  # for VLM\n# Step 4: Setup search engine\n# either using google api\n#export SEARCH_BACKEND=\"Google\"\n#export SEARCH_API_KEY=\"YOUR_API_KEY\"\n#export SEARCH_CSE_ID=\"YOUR_CSE_ID\"\n# or simply use DuckDuckGo\nexport SEARCH_BACKEND=\"DuckDuckGo\"\n# Step 5: run\nexport PYTHONPATH=\u002Fyour\u002Fpath\u002Fto\u002FCogKernel-Pro\u002F\n#pip install ...  # see above in `Environment`\n# it will be more stable to run a new web-browser for each web call, setup WEB_PORT (web browser service's port) and WEB_DIR (main dir of the web browser service)\n# moreover, it is slightly better to use non-boxed screenshot (make sure to update the latest `server.js` and set screenshot_boxed=False)\nWEB_DIR=\u002Fpath\u002Fto\u002F_web\u002F  # where we put `server.js` and related `node_modules`\nWEB_PORT=3001\nMAIN_ARGS=\"{'web_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': 'localhost:${WEB_PORT}', 'web_command': 'cd ${WEB_DIR}; LISTEN_PORT=${WEB_PORT} npm start', 'screenshot_boxed': False}}, 'file_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'call_target': '${LLM_URL}'}}\"\npython3.12 -u -m ck_pro.ck_main.main --updates \"${MAIN_ARGS}\" --input \u002Fyour\u002Fpath\u002Fto\u002Fgaia_dev.jsonl --output \u002Fyour\u002Fpath\u002Fto\u002Fgaia_dev.output.jsonl |& tee -a _log_gaia_dev\n\n# Step 6: analyze and check the output\npython -m ck_pro.ck_main.scripts.analyze -f \u002Fyour\u002Fpath\u002Fto\u002Foutput\u002Fgaia_dev.output.jsonl -b 0\n```\n\n### Extra Running Config\n```bash\n# calling claude+thinking for the outside main-agent\nLLM_URL=gpt:gpt-4.1  # still use gpt4.1 for sub-agents\nVLM_URL=gpt:gpt-4.1\nexport AZURE_OPENAI_ENDPOINT=\"YOUR_ENDPOINT\"  # find these keys in the corresponding spreadsheets\nexport AZURE_OPENAI_API_KEY=\"YOUR_API_KEY\"\nexport AZURE_OPENAI_API_VERSION=\"YOUR_API_VERSION\"\nexport AWS_ACCESS_KEY=\"YOUR_KEY\"\nexport AWS_SECRET_ACCESS_KEY=\"YOUR_SECRET_KEY\"\nMAIN_ARGS=\"{'web_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': 'localhost:${WEB_PORT}', 'web_command': 'cd ${WEB_DIR}; LISTEN_PORT=${WEB_PORT} npm start', 'screenshot_boxed': False}}, 'file_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'thinking': 'True', 'call_target': 'claude:', 'call_kwargs': {'temperature': 0.2, 'top_p': 0.95, 'max_tokens': 4096}}}\"  # use claude+thinking for main-agent, allowing more max_token budgets\n```\n\n\n### Enabling Reflection \n\nExtra configs required:\n\n```bash\n# configuration of the evaluator LLM\nexport EVALUATOR_LLM=gpt:gpt-4.1\n# langchain \nexport AZURE_OPENAI_API_VERSION=2025-01-01-preview\nexport OPENAI_API_TYPE=azure_ai\nexport AZURE_INFERENCE_ENDPOINT=$AZURE_OPENAI_ENDPOINT\nexport AZURE_INFERENCE_CREDENTIAL=$AZURE_OPENAI_API_KEY\n```\n\nExtra arguments when running ck_pro.ck_main.main: `--inference-time-evaluation-method`, where you can choose from `no_answer` and `gpt_judge`. `no_answer` simply checks whether the agent have returned anything meaningful, while `gpt_judge` use the LLM specified by `EVALUATOR_LLM` to perform evaluation on the trajectory and decide whether there's a need to retry.\n\n```bash\npython -u -m ck_pro.ck_main.main --updates \"${MAIN_ARGS}\" --inference-time-evaluation-method gpt_judge --max_retry_num 3 --input \u002Fpath\u002Fto\u002Finput --output \u002Fpath\u002Fto\u002Foutput\n```\n\n\n## Data\n\n### Saved Data Format\n\nThe format of saved data is as followed:\n- The class of `Session` is used to save trajectories [session.py](ck_pro\u002Fagents\u002Fsession.py)\n- The analysis script could help understand the data structure [analyze.py](ck_pro\u002Fck_main\u002Fscripts\u002Fanalyze.py)\n```python\n# one instance in one json-line\nINSTANCE = {\n  \"id\": \"Task ID\",\n  \"task\": \"Task Description\",\n  \"session\": {  # corresponding to the class of Session\n    \"id\": \"Session ID\",\n    \"info\": {...},  # other information such model calling token counts\n    \"task\": \"Original Task Description\",\n    \"steps\": [  # information for each step\n      {\n        \"step_idx\": 0,\n        \"plan\": {\n          \"thought\": \"Model's thought\",\n          \"code\": \"Model's output code\",\n          \"state\": {...},  # updated state\n          \"llm_input\": [],  # model's direct input messages\n          \"llm_output\": \"Model's raw output\",  # model's raw output\n        },\n        \"action\": {\n          \"...\": ...,  # similar to plan\n          # \"observation\": ...,  # simple outputs from code execution\n          # if calling a sub-agent, we have more complex structures storing the session from the sub-agent\n          \"observation\": {  # see the class of AgentResult\n            \"output\": \"formatted outputs\",\n            \"log\": \"logs\",\n            \"task\": \"Task for the sub-agent\",\n            \"session\": {...},\n          },\n        },\n      },  # step 0\n      ...,  # later steps\n      {\n        \"...\": ...,  # plan and action\n        \"end\": {  # in the final step, we may also have an ending module if configured\n          \"...\"  # fields are similar to plan and action\n        }\n      }  # final step\n    ],\n  },\n}\n```\n\n### System Prompts\n\nPrompts are saved in `prompts.py` files of each agent, such as [ck_pro\u002Fck_main\u002Fprompts.py](ck_pro\u002Fck_main\u002Fprompts.py)，[ck_web\u002Fprompts.py](ck_pro\u002Fck_web\u002Fprompts.py).\n\nCheck out [detailed notes](ck_pro\u002Freadme.md) for more details.\n\n## Data \n\nThe queries and answers of Multi-hop URLQA and AgentWebQA is [here](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-Query). A portion of the SFT data that is permitted for open-source release due to licensing restrictions is available [here](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-SFT).\n\nWe release the checkpoint of fine-tuned Qwen3-8B-CK-Pro [here](https:\u002F\u002Fhuggingface.co\u002FCognitiveKernel\u002FQwen3-8B-CK-Pro).\n\n### Trajectory sampling\n\nWe use `gpt-4.1` to sample trajectories. You need to download the queries first and then run the main agent execution code that is similar to previous sections. You may add additional arguments `--sampling-mode --evaluation-method llm_score --max_retry_num 3` to sample the same query up to 3 times until it is successful. \n\n```bash\nexport LISTEN_PORT=XXXX\nexport WEB_IP=localhost:${LISTEN_PORT}\nlsof -ti tcp:$LISTEN_PORT | xargs kill -9\nexport LLM_URL=gpt:gpt-4.1\nexport VLM_URL=gpt:gpt-4.1\n\nexport AZURE_OPENAI_API_KEY=\"YOUR_API_KEY\"\nexport AZURE_OPENAI_ENDPOINT=\"YOUR_ENDPOINT\"\nexport AZURE_OPENAI_API_VERSION=2025-01-01-preview\nexport MAX_FILE_READ_TOKENS=10000\nexport MAX_FILE_SCREENSHOT=5\nexport SEARCH_BACKEND=Google\nexport SEARCH_API_KEY=\"YOUR_GOOGLE_KEY\"\nexport SEARCH_CSE_ID=\"YOUR_CSE_ID\"\n\n#langchain\nexport EVALUATOR_LLM=gpt:gpt-4.1\nexport AZURE_OPENAI_API_VERSION=2025-01-01-preview\nexport OPENAI_API_TYPE=azure_ai\nexport AZURE_INFERENCE_ENDPOINT=$AZURE_OPENAI_ENDPOINT\nexport AZURE_INFERENCE_CREDENTIAL=$AZURE_OPENAI_API_KEY\n\nexport MAIN_ARGS=\"{'web_agent': {'max_steps': 25, 'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': '${WEB_IP}', 'web_command': 'cd \u002Fpath\u002Fto\u002Fck_pro\u002Fck_web\u002F_web; LISTEN_PORT=${LISTEN_PORT} npm start'}}, 'file_agent': {'max_steps': 20, 'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'call_target': '${LLM_URL}'}, 'max_steps': 12}\"\n\npython -u -m ckv3.ck_main.main --updates \"${MAIN_ARGS}\" --sampling-mode --evaluation-method llm_score --max_retry_num 3 --input \u002Finput\u002Fquery.jsonl --output \u002Foutput\u002Ftrajectory.output.jsonl\n```\n\n### Rejection Sampling and SFT Data Post-Process\n\nRun the code [convert_sft.py](data\u002Fconvert_sft.py) and choose a type of rejection sampling (`llm_judge` for langchain LLM score or `em` for exact match).\n\n```bash\npython convert_sft.py --input_file \u002Fpath\u002Fto\u002Ftrajectory.output.jsonl --output_file XXX.sft.jsonl\n```\n\n## Friendly links to relevant agents works from Tencent AI Lab\n\n- [Cognitive Kernel](https:\u002F\u002Fgithub.com\u002FTencent\u002FCogKernel) (NAACL 2025 Demo): The base version of Cognitive Kernel-Pro agents.\n- [WebVoyager](https:\u002F\u002Fgithub.com\u002FMinorJerry\u002FWebVoyager) and [OpenWebVoyager](https:\u002F\u002Fgithub.com\u002FMinorJerry\u002FOpenWebVoyager\u002F) (ACL 2024 and ACL 2025): Self-improving multimodal agents. \n- [WebEvolver, WebCoT](https:\u002F\u002Fgithub.com\u002FTencent\u002FSelfEvolvingAgent) (EMNLP 2025 Main and Findings): Agents post-training with world model and cognitive behavior injections to CoT. \n- [Web Agents Rollback](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.11788): Enhancing Web Agents with Explicit Rollback Mechanisms\n- [DocBench](https:\u002F\u002Fgithub.com\u002FAnni-Zou\u002FDocBench): Data generation for document agents.\n- [PersonaHub](https:\u002F\u002Fgithub.com\u002Ftencent-ailab\u002Fpersona-hub): Scaling Synthetic Data Creation with 1,000,000,000 Personas\n- [MobileGUI-RL](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.05720): MobileGUI-RL: Advancing Mobile GUI Agent through Reinforcement Learning in Online Environment\n- [WebAggregator](https:\u002F\u002Fgithub.com\u002FTencent\u002FWebAggregator): Explore to Evolve: Scaling Evolved Aggregation Logic via Proactive Online Exploration for Deep Research Agents\n\n## Cite this work\n\n```\n@misc{fang2025cognitivekernelpro,\n      title={Cognitive Kernel-Pro: A Framework for Deep Research Agents and Agent Foundation Models Training}, \n      author={Tianqing Fang and Zhisong Zhang and Xiaoyang Wang and Rui Wang and Can Qin and Yuxuan Wan and Jun-Yu Ma and Ce Zhang and Jiaqi Chen and Xiyun Li and Hongming Zhang and Haitao Mi and Dong Yu},\n      year={2025},\n      eprint={2508.00414},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2508.00414}, \n}\n```\n\n#### Contact\n\ntianqfang(at)tencent(dot)com","# 认知内核-Pro：深度研究代理及代理基础模型训练框架\n\n\n\n[![arXiv](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FarXiv-2508.00414-b31b1b.svg)](https:\u002F\u002Farxiv.org\u002Fabs\u002F2508.00414) [![数据](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20Face-CognitiveKernel--Pro--Data-ffc107?color=ffc107&logoColor=white)](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-Query)  [![数据](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20 Face-CognitiveKernel--Pro--SFT-ffc107?color=ffc107&logoColor=white)](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-SFT) [![模型](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F%F0%9F%A4%97%20Hugging%20 Face-CognitiveKernel--Pro--Model-ffc107?color=ffc107&logoColor=white)](https:\u002F\u002Fhuggingface.co\u002FCognitiveKernel\u002FQwen3-8B-CK-Pro)\n\n\u003C!-- [![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)  -->\n\n\u003Cp align=\"center\">\u003Cimg src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTencent_CognitiveKernel-Pro_readme_8b3278a2cbe7.png\" alt=\"\" width=\"90%\"\u002F>\u003C\u002Fp>\n\n- 一个最先进的开源代理，尽可能使用免费工具；唯一需要付费的工具是 Google Search API，如有需要也可替换为免费的 DuckDuckGo API。\n- 完全可复现的开源 SFT 训练配方，性能超越基于 RL 的模型如 WebDancer 和 WebSailor——无需强化学习。\n\n## 更新\n\n- 2025年10月17日：关于合成 DeepResearch 代理数据的技术报告已发布！请查看论文《探索以进化：通过主动在线探索扩展深度研究代理的进化聚合逻辑》（https:\u002F\u002Farxiv.org\u002Fabs\u002F2510.14438），以及 GitHub 仓库 [WebAggregator](https:\u002F\u002Fgithub.com\u002FTencent\u002FWebAggregator)。\n\n## 运行认知内核-Pro（简称 CogKernel-Pro）代理\n\n### 环境\n\n#### Python\n- 推荐使用 python3.12\n- 依赖：\n\n```bash\npip install boto3 botocore openai duckduckgo_search rich numpy openpyxl biopython mammoth markdownify pandas pdfminer-six python-pptx pdf2image puremagic pydub SpeechRecognition bs4 youtube-transcript-api requests transformers protobuf openai langchain_openai langchain\npip install selenium helium smolagents\n```\n\n#### Web 服务器（由 Playwright 提供支持）\n\n- **在 Linux 上**：\n\n  - 检查用于托管网页引擎的脚本 [.\u002Fck_web\u002F_web\u002Frun_local.sh](.\u002Fck_web\u002F_web\u002Frun_local.sh)。\n  - 依赖：\n  ```bash\n  apt-get install -y poppler-utils default-jre libreoffice-common libreoffice-java-common libreoffice ffmpeg\n  # for ck_web\n  sh ck_pro\u002Fck_web\u002F_web\u002Frun_local.sh\n  ```\n  - **重要提示**：建议在沙箱环境中运行此程序，因为生成的 Python 代码会直接执行，目前尚无安全检查机制。（请禁用您用户的 sudo 权限以确保安全。）\n  ```bash\n  # run with root\n  echo \"${USER}\" 'ALL=(ALL) NOPASSWD: !ALL' | tee \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\n  chmod 440 \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\n  deluser ${USER} sudo\n  hostnamectl set-hostname localhost\n  ```\n- **在 Mac 上**：\n  - 检查用于托管网页引擎的脚本 [.\u002Fck_web\u002F_web\u002Frun_local_mac.sh](.\u002Fck_web\u002F_web\u002Frun_local_mac.sh)\n  - 依赖：\n  ```zsh\n  brew install --cask libreoffice\n  brew install poppler\n  brew install ffmpeg\n  # for ck_web\n  sh ck_pro\u002Fck_web\u002F_web\u002Frun_local_mac.sh\n  ```\n  - **重要提示**：建议在沙箱环境中运行此程序，因为生成的 Python 代码会直接执行，目前尚无安全检查机制。（请禁用您用户的 sudo 权限以确保安全。）\n  ```bash\n  # run with root\n  echo \"${USER}\" 'ALL=(ALL) NOPASSWD: !ALL' | tee \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\n  chmod 440 \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\n  dseditgroup -o edit -d \"$USER\" admin\n  scutil --set HostName localhost\n  ```\n\n\u003C!-- ### 运行配置\n通过一个整体的configuration-python-dictionary来指定运行参数，字典里的值直接对应类里面的item（支持hierarchy的方式）。init具体的mechanism详见`utils.py:KwargsInitializable`，简单来说是通过赋值`__dict__`来直接修改object。以下是对于`CKAgent`的一个例子：\n```python\n{\n    \"model\": {\"call_target\": \"gpt:gpt-4o-mini\"},  # use gpt-4o-mini for the LLM of main agent\n    \"max_steps\": 10,  # a maximum of 10 steps for the main agent\n    \"web_agent\": {\n        \"model\": {\"call_target\": \"http:\u002F\u002FMY_VLLM:8080\u002Fv1\u002Fchat\u002Fcompletions\"},  # use vllm service (replace MY_VLLM with your IP) for the web agent\n        \"web_env_kwargs\": {\"web_ip\": \"localhost:3000\"},  # IP for the web-browser server\n    }\n}\n``` -->\n\n### 示例（一个简单示例）\n- 请参阅 [`ck_main\u002F_test`](.\u002Fck_main\u002F_test) 中的简单示例及其相应输出\n```bash\nexport PYTHONPATH=\u002Fyour\u002Fpath\u002Fto\u002FCogKernel-Pro\n# 假设我们已经搭建好了 vllm 模型服务器和网页浏览器服务器（目前这些服务正在运行：WEB_IP\nWEB_IP=localhost:3001  # 网页浏览器服务器\nLLM_URL=http:\u002F\u002Fxx.xx.xx.xx:8080\u002Fv1\u002Fchat\u002Fcompletions  # vllm 模型服务器\n#LLM_URL=gpt:gpt-4.1  # 使用 gpt\n#VLM_URL=gpt:gpt-4.1  # 使用 gpt\n#LLM_URL=claude:  # 使用 claude\n#VLM_URL=claude:  # 使用 claude\n# run simple test\nMAIN_ARGS=\"{'web_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': '${WEB_IP}'}}, 'file_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'call_target': '${LLM_URL}'}}\"\n# use \"NO_NULL_STDIN=1\" for easier debugging\n# you can also remove `--input` field to directly input your task from stdin\n# you can also remove `-mpdb` flag to run the program directly instead of in debugging mode\nNO_NULL_STDIN=1 python3 -u -mpdb -m ck_pro.ck_main.main --updates \"${MAIN_ARGS}\" --input \u002Fyour\u002Fpath\u002Fto\u002Fsimple_test.jsonl --output \u002Fyour\u002Fpath\u002Fto\u002Fsimple_test.output.jsonl |& tee _log_simple_test\nless -R _log_simple_test  # use 'less -R' to see the colored outputs\n```\n\n### 示例（在 GAIA 数据集上进行实验）\n```bash\n# 第一步：准备数据\n# 解压 gaia 数据（或者您可以自行从 huggingface 下载）\n# -> 假设所有 gaia 相关输入文件都与输入 json 元数据文件位于同一目录下\nunzip \u002Fyour\u002Fpath\u002Fto\u002FCogKernel-Pro\u002FEvaluation\u002Fgaia2504.zip\n# 第二步：准备 web 服务（建议使用台式机或笔记本电脑以获得更好的网络连接）\n# -> 按照 \".\u002Fck_web\u002F_web\u002Frun_local.sh\" 准备相关设备\n#LISTEN_PORT=3001 npm start\n#WEB_IP=localhost:3001  # 网页浏览器服务器\n# 第三步：准备一个 vllm 实例用于模型调用\n# 使用 gpt\n#LLM_URL=gpt:gpt-4.1\n#VLM_URL=gpt:gpt-4.1\n#export AZURE_OPENAI_ENDPOINT=\"YOUR_ENDPOINT\"\n#export AZURE_OPENAI_API_KEY=\"YOUR_API_KEY\"\n#export AZURE_OPENAI_API_VERSION=\"YOUR_API_VERSION\"\n# 或者使用 claude\n#LLM_URL=claude:  # 使用 claude\n#VLM_URL=claude:  # 使用 claude\n#export AWS_ACCESS_KEY=\"YOUR_KEY\"\n#export AWS_SECRET_ACCESS_KEY=\"YOUR_SECRET_KEY\"\nLLM_URL=http:\u002F\u002Fxx.xx.xx.xx:8080\u002Fv1\u002Fchat\u002Fcompletions  # vllm 模型服务器\nVLM_URL=http:\u002F\u002Fxx.xx.xx.xx:8081\u002Fv1\u002Fchat\u002Fcompletions  # 对于 VLM\n# 第四步：设置搜索引擎\n# 可以使用 google api\n#export SEARCH_BACKEND=\"Google\"\n#export SEARCH_API_KEY=\"YOUR_API_KEY\"\n#export SEARCH_CSE_ID=\"YOUR_CSE_ID\"\n# 或者直接使用 DuckDuckGo\nexport SEARCH_BACKEND=\"DuckDuckGo\"\n\n# 步骤 5：运行\nexport PYTHONPATH=\u002Fyour\u002Fpath\u002Fto\u002FCogKernel-Pro\u002F\n#pip install ...  # 参见上方的 `Environment`\n# 为每次网页调用启动一个新的浏览器会更稳定，需设置 WEB_PORT（浏览器服务的端口）和 WEB_DIR（浏览器服务的主目录）\n# 此外，使用非框选截图会稍好一些（请确保更新到最新的 `server.js` 并将 screenshot_boxed 设置为 False）\nWEB_DIR=\u002Fpath\u002Fto\u002F_web\u002F  # 放置 `server.js` 和相关 `node_modules` 的目录\nWEB_PORT=3001\nMAIN_ARGS=\"{'web_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': 'localhost:${WEB_PORT}', 'web_command': 'cd ${WEB_DIR}; LISTEN_PORT=${WEB_PORT} npm start', 'screenshot_boxed': False}}, 'file_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'call_target': '${LLM_URL}'}}\"\npython3.12 -u -m ck_pro.ck_main.main --updates \"${MAIN_ARGS}\" --input \u002Fyour\u002Fpath\u002Fto\u002Fgaia_dev.jsonl --output \u002Fyour\u002Fpath\u002Fto\u002Fgaia_dev.output.jsonl |& tee -a _log_gaia_dev\n\n# 步骤 6：分析并检查输出\npython -m ck_pro.ck_main.scripts.analyze -f \u002Fyour\u002Fpath\u002Fto\u002Foutput\u002Fgaia_dev.output.jsonl -b 0\n```\n\n### 额外运行配置\n```bash\n# 调用 claude+thinking 作为主代理\nLLM_URL=gpt:gpt-4.1  # 子代理仍使用 gpt4.1\nVLM_URL=gpt:gpt-4.1\nexport AZURE_OPENAI_ENDPOINT=\"YOUR_ENDPOINT\"  # 在相应表格中找到这些密钥\nexport AZURE_OPENAI_API_KEY=\"YOUR_API_KEY\"\nexport AZURE_OPENAI_API_VERSION=\"YOUR_API_VERSION\"\nexport AWS_ACCESS_KEY=\"YOUR_KEY\"\nexport AWS_SECRET_ACCESS_KEY=\"YOUR_SECRET_KEY\"\nMAIN_ARGS=\"{'web_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': 'localhost:${WEB_PORT}', 'web_command': 'cd ${WEB_DIR}; LISTEN_PORT=${WEB_PORT} npm start', 'screenshot_boxed': False}}, 'file_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'thinking': 'True', 'call_target': 'claude:', 'call_kwargs': {'temperature': 0.2, 'top_p': 0.95, 'max_tokens': 4096}}}\"  # 主代理使用 claude+thinking，并允许更高的 max_token 预算\n```\n\n\n### 启用反思功能\n\n需要额外配置：\n\n```bash\n# 评估 LLM 的配置\nexport EVALUATOR_LLM=gpt:gpt-4.1\n# langchain \nexport AZURE_OPENAI_API_VERSION=2025-01-01-preview\nexport OPENAI_API_TYPE=azure_ai\nexport AZURE_INFERENCE_ENDPOINT=$AZURE_OPENAI_ENDPOINT\nexport AZURE_INFERENCE_CREDENTIAL=$AZURE_OPENAI_API_KEY\n```\n\n在运行 ck_pro.ck_main.main 时，需添加额外参数 `--inference-time-evaluation-method`，可选择 `no_answer` 或 `gpt_judge`。`no_answer` 仅检查代理是否返回了有意义的内容，而 `gpt_judge` 则使用 `EVALUATOR_LLM` 指定的 LLM 对轨迹进行评估，并决定是否需要重试。\n```bash\npython -u -m ck_pro.ck_main.main --updates \"${MAIN_ARGS}\" --inference-time-evaluation-method gpt_judge --max_retry_num 3 --input \u002Fpath\u002Fto\u002Finput --output \u002Fpath\u002Fto\u002Foutput\n```\n\n\n## 数据\n\n### 保存的数据格式\n\n保存数据的格式如下：\n- 使用 `Session` 类来保存轨迹 [session.py](ck_pro\u002Fagents\u002Fsession.py)\n- 分析脚本可以帮助理解数据结构 [analyze.py](ck_pro\u002Fck_main\u002Fscripts\u002Fanalyze.py)\n```python\n# 每行一个实例\nINSTANCE = {\n  \"id\": \"任务ID\",\n  \"task\": \"任务描述\",\n  \"session\": {  # 对应 Session 类\n    \"id\": \"会话ID\",\n    \"info\": {...},  # 其他信息，如模型调用的 token 数量\n    \"task\": \"原始任务描述\",\n    \"steps\": [  # 每个步骤的信息\n      {\n        \"step_idx\": 0,\n        \"plan\": {\n          \"thought\": \"模型的思考过程\",\n          \"code\": \"模型的输出代码\",\n          \"state\": {...},  # 更新后的状态\n          \"llm_input\": [],  # 模型的直接输入消息\n          \"llm_output\": \"模型的原始输出\",  # 模型的原始输出\n        },\n        \"action\": {\n          \"...\": ...,  # 类似于 plan\n          # \"observation\": ...,  # 代码执行的简单输出\n          # 如果调用子代理，会有更复杂的结构存储子代理的会话\n          \"observation\": {  # 参见 AgentResult 类\n            \"output\": \"格式化后的输出\",\n            \"log\": \"日志\",\n            \"task\": \"子代理的任务\",\n            \"session\": {...},\n          },\n        },\n      },  # 第 0 步\n      ...,  # 后续步骤\n      {\n        \"...\": ...,  # 计划和行动\n        \"end\": {  # 在最后一步，如果配置了结束模块，也会有相应的部分\n          \"...\"  # 字段与计划和行动类似\n        }\n      }  # 最后一步\n    ],\n  },\n}\n```\n\n### 系统提示词\n\n提示词保存在各代理的 `prompts.py` 文件中，例如 [ck_pro\u002Fck_main\u002Fprompts.py](ck_pro\u002Fck_main\u002Fprompts.py)、[ck_web\u002Fprompts.py](ck_pro\u002Fck_web\u002Fprompts.py)。\n\n更多详细信息请参阅 [详细说明](ck_pro\u002Freadme.md)。\n\n## 数据 \n\nMulti-hop URLQA 和 AgentWebQA 的查询与答案可在 [这里](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-Query) 查看。由于许可限制，部分允许开源发布的 SFT 数据也可在 [这里](https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-SFT) 获取。\n\n我们发布了微调后的 Qwen3-8B-CK-Pro 检查点 [在这里](https:\u002F\u002Fhuggingface.co\u002FCognitiveKernel\u002FQwen3-8B-CK-Pro)。\n\n### 轨迹采样\n\n我们使用 `gpt-4.1` 来采样轨迹。您需要先下载查询数据，然后运行与前几节类似的主代理执行代码。您可以添加额外的参数 `--sampling-mode --evaluation-method llm_score --max_retry_num 3`，以便对同一个查询最多尝试 3 次，直到成功为止。\n\n```bash\nexport LISTEN_PORT=XXXX\nexport WEB_IP=localhost:${LISTEN_PORT}\nlsof -ti tcp:$LISTEN_PORT | xargs kill -9\nexport LLM_URL=gpt:gpt-4.1\nexport VLM_URL=gpt:gpt-4.1\n\nexport AZURE_OPENAI_API_KEY=\"YOUR_API_KEY\"\nexport AZURE_OPENAI_ENDPOINT=\"YOUR_ENDPOINT\"\nexport AZURE_OPENAI_API_VERSION=2025-01-01-preview\nexport MAX_FILE_READ_TOKENS=10000\nexport MAX_FILE_SCREENSHOT=5\nexport SEARCH_BACKEND=Google\nexport SEARCH_API_KEY=\"YOUR_GOOGLE_KEY\"\nexport SEARCH_CSE_ID=\"YOUR_CSE_ID\"\n\n#langchain\nexport EVALUATOR_LLM=gpt:gpt-4.1\nexport AZURE_OPENAI_API_VERSION=2025-01-01-preview\nexport OPENAI_API_TYPE=azure_ai\nexport AZURE_INFERENCE_ENDPOINT=$AZURE_OPENAI_ENDPOINT\nexport AZURE_INFERENCE_CREDENTIAL=$AZURE_OPENAI_API_KEY\n\nexport MAIN_ARGS=\"{'web_agent': {'max_steps': 25, 'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': '${WEB_IP}', 'web_command': 'cd \u002Fpath\u002Fto\u002Fck_pro\u002Fck_web\u002F_web; LISTEN_PORT=${LISTEN_PORT} npm start'}}, 'file_agent': {'max_steps': 20, 'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'call_target': '${LLM_URL}'}, 'max_steps': 12}\"\n\npython -u -m ckv3.ck_main.main --updates \"${MAIN_ARGS}\" --sampling-mode --evaluation-method llm_score --max_retry_num 3 --input \u002Finput\u002Fquery.jsonl --output \u002Foutput\u002Ftrajectory.output.jsonl\n```\n\n### 拒绝采样与 SFT 数据后处理\n\n运行代码 [convert_sft.py](data\u002Fconvert_sft.py)，并选择一种拒绝采样的方式（`llm_judge` 表示使用 langchain 的 LLM 评分，`em` 表示精确匹配）。\n\n```bash\npython convert_sft.py --input_file \u002Fpath\u002Fto\u002Ftrajectory.output.jsonl --output_file XXX.sft.jsonl\n```\n\n## 腾讯 AI 实验室相关工作的友好链接\n\n- [Cognitive Kernel](https:\u002F\u002Fgithub.com\u002FTencent\u002FCogKernel)（NAACL 2025 Demo）：Cognitive Kernel-Pro 代理的基础版本。\n- [WebVoyager](https:\u002F\u002Fgithub.com\u002FMinorJerry\u002FWebVoyager) 和 [OpenWebVoyager](https:\u002F\u002Fgithub.com\u002FMinorJerry\u002FOpenWebVoyager\u002F)（ACL 2024 和 ACL 2025）：自我改进的多模态代理。\n- [WebEvolver, WebCoT](https:\u002F\u002Fgithub.com\u002FTencent\u002FSelfEvolvingAgent)（EMNLP 2025 主会和 Findings）：通过世界模型和认知行为注入进行 CoT 后训练的代理。\n- [Web Agents Rollback](https:\u002F\u002Farxiv.org\u002Fabs\u002F2504.11788)：通过显式回滚机制增强 Web 代理。\n- [DocBench](https:\u002F\u002Fgithub.com\u002FAnni-Zou\u002FDocBench)：用于文档代理的数据生成工具。\n- [PersonaHub](https:\u002F\u002Fgithub.com\u002Ftencent-ailab\u002Fpersona-hub)：利用 10 亿个人物角色大规模生成合成数据。\n- [MobileGUI-RL](https:\u002F\u002Farxiv.org\u002Fabs\u002F2507.05720)：MobileGUI-RL：通过在线环境中的强化学习推进移动 GUI 代理的发展。\n- [WebAggregator](https:\u002F\u002Fgithub.com\u002FTencent\u002FWebAggregator)：探索与进化：通过主动在线探索扩展进化聚合逻辑，以支持深度研究型代理。\n\n## 引用本工作\n\n```\n@misc{fang2025cognitivekernelpro,\n      title={Cognitive Kernel-Pro: 用于深度研究型代理及代理基础模型训练的框架}, \n      author={方天青、张志松、王晓阳、王睿、秦灿、万宇轩、马俊宇、张策、陈佳琪、李西云、张洪明、米海涛、于东},\n      year={2025},\n      eprint={2508.00414},\n      archivePrefix={arXiv},\n      primaryClass={cs.AI},\n      url={https:\u002F\u002Farxiv.org\u002Fabs\u002F2508.00414}, \n}\n```\n\n#### 联系方式\n\ntianqfang(at)tencent(dot)com","# CognitiveKernel-Pro 快速上手指南\n\nCognitiveKernel-Pro 是一个用于深度研究智能体（Deep Research Agents）和智能体基础模型训练的开源框架。它利用多种免费工具构建高性能智能体，仅需 Google Search API（可替换为免费的 DuckDuckGo），并提供无需强化学习（RL）即可超越同类模型的 SFT 训练方案。\n\n## 1. 环境准备\n\n### 系统要求\n- **操作系统**: Linux (推荐) 或 macOS\n- **Python 版本**: 推荐 Python 3.12\n- **安全提示**: 由于生成的 Python 代码会直接执行且当前无安全检查，**强烈建议在沙箱环境中运行**。建议禁用当前用户的 `sudo` 权限以确保安全（具体命令见下文安装步骤）。\n\n### 前置依赖\n除了 Python 依赖外，还需要安装以下系统级工具以支持网页引擎和文件处理：\n\n**Linux (Ubuntu\u002FDebian):**\n```bash\napt-get install -y poppler-utils default-jre libreoffice-common libreoffice-java-common libreoffice ffmpeg\n```\n\n**macOS:**\n```zsh\nbrew install --cask libreoffice\nbrew install poppler\nbrew install ffmpeg\n```\n\n## 2. 安装步骤\n\n### 2.1 配置沙箱安全环境（推荐）\n为防止恶意代码执行风险，建议限制当前用户权限。\n\n**Linux:**\n```bash\n# 以 root 身份运行\necho \"${USER}\" 'ALL=(ALL) NOPASSWD: !ALL' | tee \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\nchmod 440 \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\ndeluser ${USER} sudo\nhostnamectl set-hostname localhost\n```\n\n**macOS:**\n```bash\n# 以 root 身份运行\necho \"${USER}\" 'ALL=(ALL) NOPASSWD: !ALL' | tee \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\nchmod 440 \u002Fetc\u002Fsudoers.d\u002F${USER}-rule\ndseditgroup -o edit -d \"$USER\" admin\nscutil --set HostName localhost\n```\n\n### 2.2 启动 Web 引擎服务\nCognitiveKernel-Pro 依赖 Playwright 驱动的本地 Web 服务器。\n\n**Linux:**\n```bash\nsh ck_pro\u002Fck_web\u002F_web\u002Frun_local.sh\n```\n\n**macOS:**\n```zsh\nsh ck_pro\u002Fck_web\u002F_web\u002Frun_local_mac.sh\n```\n*注：默认监听端口通常为 3001，可通过环境变量 `WEB_IP` 指定。*\n\n### 2.3 安装 Python 依赖\n在项目根目录下执行以下命令安装所需库：\n\n```bash\npip install boto3 botocore openai duckduckgo_search rich numpy openpyxl biopython mammoth markdownify pandas pdfminer-six python-pptx pdf2image puremagic pydub SpeechRecognition bs4 youtube-transcript-api requests transformers protobuf openai langchain_openai langchain\npip install selenium helium smolagents\n```\n\n## 3. 基本使用\n\n### 3.1 配置运行参数\n你需要准备一个 LLM 服务（如 vLLM、GPT-4 或 Claude）和一个已启动的 Web 浏览器服务。\n\n设置环境变量：\n```bash\nexport PYTHONPATH=\u002Fyour\u002Fpath\u002Fto\u002FCogKernel-Pro\nWEB_IP=localhost:3001  # Web 浏览器服务地址\nLLM_URL=http:\u002F\u002Fxx.xx.xx.xx:8080\u002Fv1\u002Fchat\u002Fcompletions  # 你的 LLM 服务地址 (例如 vLLM)\n# 若使用多模态模型，需设置 VLM_URL\nVLM_URL=http:\u002F\u002Fxx.xx.xx.xx:8081\u002Fv1\u002Fchat\u002Fcompletions \n```\n\n*若使用 GPT 或 Claude，可将 `LLM_URL` 设置为 `gpt:gpt-4.1` 或 `claude:`，并配置相应的 API Key 环境变量。*\n\n### 3.2 运行简单测试\n创建一个简单的输入文件 `simple_test.jsonl`，然后运行以下命令：\n\n```bash\nMAIN_ARGS=\"{'web_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}, 'web_env_kwargs': {'web_ip': '${WEB_IP}'}}, 'file_agent': {'model': {'call_target': '${LLM_URL}'}, 'model_multimodal': {'call_target': '${VLM_URL}'}}, 'model': {'call_target': '${LLM_URL}'}}\"\n\nNO_NULL_STDIN=1 python3 -u -mpdb -m ck_pro.ck_main.main --updates \"${MAIN_ARGS}\" --input \u002Fyour\u002Fpath\u002Fto\u002Fsimple_test.jsonl --output \u002Fyour\u002Fpath\u002Fto\u002Fsimple_test.output.jsonl |& tee _log_simple_test\n```\n\n查看彩色日志输出：\n```bash\nless -R _log_simple_test\n```\n\n### 3.3 搜索引擎配置\n默认推荐使用免费的 DuckDuckGo，无需额外配置。若需使用 Google Custom Search，请设置以下环境变量：\n\n```bash\nexport SEARCH_BACKEND=\"Google\"\nexport SEARCH_API_KEY=\"YOUR_API_KEY\"\nexport SEARCH_CSE_ID=\"YOUR_CSE_ID\"\n```\n\n若使用 DuckDuckGo（默认）：\n```bash\nexport SEARCH_BACKEND=\"DuckDuckGo\"\n```\n\n### 3.4 启用反思机制（可选）\n通过引入评估器 LLM，智能体可以在推理过程中自我检查并重试。\n\n设置评估器模型：\n```bash\nexport EVALUATOR_LLM=gpt:gpt-4.1\n# 若使用 Azure OpenAI\nexport AZURE_OPENAI_API_VERSION=2025-01-01-preview\nexport OPENAI_API_TYPE=azure_ai\nexport AZURE_INFERENCE_ENDPOINT=$AZURE_OPENAI_ENDPOINT\nexport AZURE_INFERENCE_CREDENTIAL=$AZURE_OPENAI_API_KEY\n```\n\n运行带反思功能的命令：\n```bash\npython -u -m ck_pro.ck_main.main --updates \"${MAIN_ARGS}\" --inference-time-evaluation-method gpt_judge --max_retry_num 3 --input \u002Fpath\u002Fto\u002Finput --output \u002Fpath\u002Fto\u002Foutput\n```\n*`gpt_judge` 模式会使用指定的评估器模型判断轨迹是否需要重试；`no_answer` 模式仅检查是否有有效返回。*","某生物医药初创公司的数据分析师需要在 48 小时内，从全球数千篇最新的学术论文、临床试验报告及新闻中，梳理出针对特定靶点的药物研发竞争格局。\n\n### 没有 CognitiveKernel-Pro 时\n- **信息搜集碎片化**：分析师需手动在 PubMed、Google Scholar 及各期刊网站间反复切换搜索，极易遗漏非英语或隐藏深度的关键文献。\n- **数据处理耗时巨大**：下载后的 PDF、PPT 及网页内容格式杂乱，人工提取实验数据、图表结论并整理成表格往往需要数天时间。\n- **逻辑推导易出错**：面对海量异构信息，人工归纳竞争态势时容易因疲劳产生疏漏，难以保证分析逻辑的严密性和一致性。\n- **工具成本高昂**：若要实现自动化，通常需购买昂贵的商业情报软件或依赖复杂的强化学习（RL）模型训练，中小团队难以负担。\n\n### 使用 CognitiveKernel-Pro 后\n- **全域深度自动检索**：CognitiveKernel-Pro 自主调用免费搜索工具与浏览器引擎，7x24 小时不间断遍历多语言信源，主动挖掘深网中的高价值论文。\n- **多模态文档智能解析**：内置强大的文档处理能力，自动将 PDF、PPT 等非结构化数据转化为标准 Markdown 或 Excel 表格，精准提取关键实验指标。\n- **进化式聚合推理**：基于“主动在线探索”机制，CognitiveKernel-Pro 能像资深研究员一样动态调整搜索策略，自动生成逻辑严密的竞争分析报告。\n- **开源低成本落地**：无需昂贵的强化学习训练，仅凭监督微调（SFT）食谱即可复现超越 WebDancer 等模型的效果，大幅降低技术门槛与算力成本。\n\nCognitiveKernel-Pro 将原本需要数人周完成的深度调研工作压缩至小时级，让中小团队也能拥有顶级的 AI 情报分析能力。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002FTencent_CognitiveKernel-Pro_888ff7ac.png","Tencent","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002FTencent_f7e55588.png","",null,"https:\u002F\u002Fopensource.tencent.com","https:\u002F\u002Fgithub.com\u002FTencent",[82,86,90,94],{"name":83,"color":84,"percentage":85},"Python","#3572A5",88.6,{"name":87,"color":88,"percentage":89},"JavaScript","#f1e05a",10.3,{"name":91,"color":92,"percentage":93},"Shell","#89e051",0.7,{"name":95,"color":96,"percentage":97},"Dockerfile","#384d54",0.3,506,50,"2026-03-31T14:18:37","NOASSERTION",4,"Linux, macOS","未说明 (依赖外部 LLM\u002FVLM 服务，如 vLLM、GPT 或 Claude，本地运行不强制要求 GPU)","未说明 (建议沙箱环境运行，需运行浏览器服务及多个代理，推荐 16GB+)",{"notes":107,"python":108,"dependencies":109},"1. 核心架构为客户端 - 服务器模式：需单独部署 Web 浏览器服务 (基于 Playwright\u002FNode.js) 和 LLM\u002FVLM 推理服务 (如 vLLM)，主程序通过 API 调用它们。\n2. 安全警告：生成的 Python 代码会直接执行且无安全检查，强烈建议在沙箱环境中运行，并禁用当前用户的 sudo 权限。\n3. 系统依赖：Linux 需安装 poppler-utils, default-jre, libreoffice, ffmpeg；macOS 需通过 brew 安装 libreoffice, poppler, ffmpeg。\n4. 搜索工具：默认使用付费的 Google Search API，可配置为免费的 DuckDuckGo API。","3.12",[110,111,112,113,114,115,116,117,118,119],"transformers","langchain","langchain_openai","openai","selenium","helium","smolagents","pandas","numpy","boto3",[15,26,13],[122,123],"agent","llm","2026-03-27T02:49:30.150509","2026-04-06T09:03:47.907147",[127,132,137,142,147,152,157,162],{"id":128,"question_zh":129,"answer_zh":130,"source_url":131},18704,"访问 PDF 链接时返回 500 错误，或者 Bing 网站提示“无障碍树不可用”怎么办？","1. **PDF 500 错误**：这是一个已知问题，通常发生在 `server.js` 的 `performAction` 函数中。代码逻辑会检查 URL 后缀（如 .pdf, .doc, .zip 等），如果匹配则视为可下载文件处理。请确保使用最新版本的代码，其中包含针对此问题的修复。\n2. **Bing 无障碍树不可用**：Bing 等特定网站可能不完全支持标准的无障碍树提取，这是预期行为。建议在实际应用中增加异常处理逻辑，当检测到该警告时尝试其他交互方式或跳过该步骤。","https:\u002F\u002Fgithub.com\u002FTencent\u002FCognitiveKernel-Pro\u002Fissues\u002F8",{"id":133,"question_zh":134,"answer_zh":135,"source_url":136},18705,"如何复现论文中 CK-Pro-8B 在 GAIA 基准测试上的性能？有哪些关键配置？","要复现性能，需注意以下关键点：\n1. **网络环境**：推理环境需使用**香港**作为出口节点，因为模型是基于繁体中文数据微调的，网络环境不一致会导致结果偏差。\n2. **模型配置**：建议使用 `export VLM_URL=gpt:gpt-4.1` 和 `export EVALUATOR_LLM=gpt:gpt-4.1` 来支持多模态处理和反思机制；或者自行部署 Qwen-2.5-VL-72B 和 Qwen-3-32B 并设置对应 IP:端口。\n3. **Web 命令**：运行 Web Agent 时必须包含 `'web_command': 'cd ${WEB_DIR}; LISTEN_PORT=${WEB_PORT} npm start'`，每次重启 Playwright 服务可提高稳定性。\n4. **反思配置**：确保正确设置 `--inference-time-evaluation-method` 参数。","https:\u002F\u002Fgithub.com\u002FTencent\u002FCognitiveKernel-Pro\u002Fissues\u002F7",{"id":138,"question_zh":139,"answer_zh":140,"source_url":141},18706,"如何启用推理时的“投票”（Voting\u002FEnsemble）功能？","在运行 `main.py` 时，添加参数 `--inference-time-evaluation-method ensemble` 即可开启投票功能。","https:\u002F\u002Fgithub.com\u002FTencent\u002FCognitiveKernel-Pro\u002Fissues\u002F6",{"id":143,"question_zh":144,"answer_zh":145,"source_url":146},18707,"GAIA Dev 和 Text-only 子集的评测方式是什么？是精确匹配（EM）还是 LLM 评判？","项目已更新评测方式。初始版本使用 GAIA_scorer (Exact Match)，但现在已统一更新为**基于 LLM 的相似度匹配**（LLM-based similarity matching），与 WebThinker 等系列的评估方法保持一致。\n更新后的数据示例：\n- GAIA (Qwen 3-8B+SFT): pass@1 从 32.7% (EM) 提升至 35.2% (LLM)。\n- GAIA-text-103: pass@1 从 40.3% (EM) 提升至 44.7% (LLM)。","https:\u002F\u002Fgithub.com\u002FTencent\u002FCognitiveKernel-Pro\u002Fissues\u002F5",{"id":148,"question_zh":149,"answer_zh":150,"source_url":151},18708,"复现 Qwen-3-8B 在 GAIA-text-103 上的性能时，应该使用哪个 VLLM 模型？","为了复现结果，你应该使用 **Qwen-2.5-VL-72B** 作为视觉语言模型（VLM）。\n注意：GAIA-text-103 子集实际上不需要调用多模态 LLM，你可以在 `web_agent` 中禁用 `screenshot()` 函数以简化流程。","https:\u002F\u002Fgithub.com\u002FTencent\u002FCognitiveKernel-Pro\u002Fissues\u002F4",{"id":153,"question_zh":154,"answer_zh":155,"source_url":156},18709,"在 Docker 容器中运行 Playwright 时 `npm install` 失败或报错怎么办？","这通常是文件权限问题。建议尝试使用以下优化的 Dockerfile 配置：\n1. 创建专用用户并赋予 sudo 权限。\n2. 在安装依赖前调整目录所有权：`RUN chown -R zzz:root \u002Fhome\u002Fzzz\u002F_web`。\n3. 安装必要的系统依赖：`apt-get install -y poppler-utils default-jre libreoffice-common ffmpeg` 等。\n4. 确保按顺序执行 `npm install`, `npx playwright install`, `npx playwright install-deps`。\n具体参考维护者提供的完整 Dockerfile 脚本。","https:\u002F\u002Fgithub.com\u002FTencent\u002FCognitiveKernel-Pro\u002Fissues\u002F3",{"id":158,"question_zh":159,"answer_zh":160,"source_url":161},18710,"在哪里可以下载 WebDancer-7B 或 Cognitive Kernel-Pro 的相关模型？","1. **Qwen3-8B-CK-Pro** 模型已发布在 Hugging Face：https:\u002F\u002Fhuggingface.co\u002FCognitiveKernel\u002FQwen3-8B-CK-Pro\n2. **WebDancer-7B** 模型不属于本项目，请访问其原始仓库获取：https:\u002F\u002Fgithub.com\u002FAlibaba-NLP\u002FWebAgent","https:\u002F\u002Fgithub.com\u002FTencent\u002FCognitiveKernel-Pro\u002Fissues\u002F2",{"id":163,"question_zh":164,"answer_zh":165,"source_url":166},18711,"项目的完整 SFT 训练数据在哪里可以获取？","完整的 SFT 数据集已上传至 Hugging Face，可以通过以下方式加载：\n数据集地址：https:\u002F\u002Fhuggingface.co\u002Fdatasets\u002FCognitiveKernel\u002FCognitiveKernel-Pro-SFT\n代码示例：\n```python\nfrom datasets import load_dataset\ndataset = load_dataset(\"CognitiveKernel\u002FCognitiveKernel-Pro-SFT\")\n```","https:\u002F\u002Fgithub.com\u002FTencent\u002FCognitiveKernel-Pro\u002Fissues\u002F1",[]]