* fix: move Key Citations to early position in reporter prompt to reduce URL hallucination
Move the Key Citations section from position 6 (end of report) to position 2
(immediately after title) in the reporter prompt. When citations are placed at
the end of a long report, LLMs tend to forget real URLs from source material
and fabricate plausible-looking but non-existent URLs.
Changes to src/prompts/reporter.md:
- Move Key Citations from section 6 to section 2 (right after Title)
- Add explicit anti-hallucination instructions: only use URLs from provided
source material, never fabricate or guess URLs
- Keep a repeated citation list at the end (section 7) for completeness
- Renumber all subsequent sections accordingly
- Update Notes section to reflect new structure
Tested with real DeerFlow backend + DuckDuckGo search:
- Before: multiple hallucinated URLs in report citations
- After: hallucinated URLs reduced significantly
Closes#825
* fix: move citations after observations in reporter_node to reduce URL hallucination
Previously, the citation message was appended BEFORE observation messages,
meaning it got buried under potentially thousands of chars of research data.
By the time the LLM reached the end of the context to generate the report,
it had 'forgotten' the real URLs and fabricated plausible-looking ones.
Now citations are appended AFTER compressed observations, placing them
closest to the LLM's generation point for maximum recall accuracy.
---------
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
- Expand Docker Compose section in README.md and README_zh.md with:
- Explicit note that only root .env is used (not web/.env)
- Instructions to update NEXT_PUBLIC_API_URL for remote/LAN deployment
- Explanation that NEXT_PUBLIC_API_URL is a build-time variable
- Improve NEXT_PUBLIC_API_URL comments in root .env.example
Closes#527
Unifies market analysis, data analysis, and consulting reporting into a comprehensive consulting-analysis skill, enabling a two-phase workflow from analysis framework design to professional report generation. Introduces a DuckDB-based data analysis utility for Excel/CSV files and a chart-visualization skill with a flexible JS interface and extensive chart type documentation. Removes the legacy market analysis skill to streamline report generation and improve extensibility for consulting and data-driven workflows.
* Adds Kubernetes sandbox provisioner support
* Improves Docker dev setup by standardizing host paths
Replaces hardcoded host paths with a configurable root directory,
making the development environment more portable and easier to use
across different machines. Automatically sets the root path if not
already defined, reducing manual setup steps.
Explicitly prohibit parallel image generation to ensure each slide
can use the previous slide as a reference image for visual consistency.
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Support configuring max_concurrent_subagents (2-4, default 3) through
config.configurable, with automatic clamping and dynamic prompt generation.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Extract get_skills_prompt_section() from apply_prompt_template() so
subagents can also receive the available skills list in their system
prompt. This allows subagents to discover and load skills via read_file,
just like the lead agent.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 添加 rehype-raw 依赖以支持在 markdown 中渲染 HTML
Add rehype-raw dependency to support HTML rendering in markdown
- 重构 memory-settings-page,提取 formatMemorySection 函数减少重复代码
Refactor memory-settings-page by extracting formatMemorySection function to reduce code duplication
- 改进空状态显示,使用 HTML span 标签替代 markdown 斜体,提供更好的样式控制
Improve empty state display by using HTML span tags instead of markdown italics for better style control
- 为 skill-settings-page 添加完整的国际化支持,替换硬编码的英文文本
Add complete i18n support for skill-settings-page, replacing hardcoded English text
- 更新国际化文件,添加技能设置页面的空状态文本(中英文)
Update i18n files with empty state text for skill settings page (both Chinese and English)
- 在 streamdown 插件配置中添加 rehypeRaw 以支持 HTML 渲染
Add rehypeRaw to streamdown plugins configuration to support HTML rendering
Co-authored-by: Cursor <cursoragent@cursor.com>
* feat: adds docker-based dev environment
* docs: updates Docker command help
* fix local dev
* feat(sandbox): add Kubernetes-based sandbox provider for multi-instance support
* fix: skills path in k8s
* feat: add example config for k8s sandbox
* fix: docker config
* fix: load skills on docker dev
* feat: support sandbox execution to Kubernetes Deployment model
* chore: rename web service name
* feat: adds docker-based dev environment
* docs: updates Docker command help
* fix local dev
* feat(sandbox): add Kubernetes-based sandbox provider for multi-instance support
* fix: skills path in k8s
* feat: add example config for k8s sandbox
* fix: docker config
* fix: load skills on docker dev
* feat: support sandbox execution to Kubernetes Deployment model
* chore: rename web service name
This commit fixes a potential AttributeError in ChatStreamManager.__init__().
Problem:
- When checkpoint_saver=True and db_uri=None, the code attempts to call
self.db_uri.startswith() on line 56, which raises AttributeError
- Line 56: if self.db_uri.startswith("mongodb://"):
This fails with "AttributeError: 'NoneType' object has no attribute 'startswith'"
Root Cause:
- The __init__ method accepts db_uri: Optional[str] = None
- If None is passed, self.db_uri is set to None
- The code doesn't check if db_uri is None before calling .startswith()
Solution:
- Add explicit None check before string prefix checks
- Provide clear warning message when db_uri is None but checkpoint_saver is enabled
- This prevents AttributeError and helps users understand the configuration issue
Changes:
```python
# Before:
if self.checkpoint_saver:
if self.db_uri.startswith("mongodb://"):
# After:
if self.checkpoint_saver:
if self.db_uri is None:
self.logger.warning(
"Checkpoint saver is enabled but db_uri is None. "
"Please provide a valid database URI or disable checkpoint saver."
)
elif self.db_uri.startswith("mongodb://"):
```
This makes the error handling more robust and provides better user feedback.
Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
- Backend: add citation format to lead_agent and general_purpose prompts
- Add CitationLink component (Badge + HoverCard) for citation cards
- MarkdownContent: detect citation: prefix in link text, render CitationLink
- Message/artifact/subtask: use MarkdownContent or Streamdown with CitationLink
- message-list-item: pass img via components prop (remove isHuman/img)
- message-group, subtask-card: drop unused imports; fix import order (lint)
Co-authored-by: Cursor <cursoragent@cursor.com>
- Keep upstream subagent HARD LIMIT (max 3 task calls, batching) in subagent_reminder
- Keep our removal of Citations: do not add back 'Citations when synthesizing'
Co-authored-by: Cursor <cursoragent@cursor.com>
- Keep upstream subagent HARD LIMIT (max 3 task calls, batching) in subagent_reminder
- Keep our removal of Citations: do not add back 'Citations when synthesizing'
Co-authored-by: Cursor <cursoragent@cursor.com>