deer-flow / frontend
AGENTS.md83k starsChanged 5 months agoMITView on GitHub
It is the source of truth; the sibling CLAUDE.md imports it via @AGENTS.md. DeerFlow Frontend is a Next.js 16 web interface for an AI agent system. It communicates with a LangGraph-based backend to provide thread-based AI conversations with streaming responses, artifacts, and a skills/tools system. Stack: Next.js 16, React 19, TypeScript 5.8, Tailwind CSS 4, pnpm 10.26.2. Requires Node.js 22+ and pnpm 10.26.2+. pnpm-workspace.yaml overrides vulnerable @xmldom/xmldom 0.9.x releases to 0.9.12 for GHSA-965w-775f-mr7g. Nextra pulls it in through MathJax and…
- Reads credentials
Trending
More talk lately.about the whole repository
Who's talking about bytedance/deer-flow
- @sungkim.bsky.social“ByteDance's DeerFlow A framework for deep research, combining language models with tools like web search, …”Bluesky · May 11, 2025 · 17 likes
- @langchain.bsky.social“🔬 DeerFlow: Deep Research Framework An open-source framework for conducting systematic deep research …”Bluesky · May 12, 2025 · 8 likes
- A Hacker News story“Has Anyone Tried Deerflow?”Hacker News · Mar 27, 2026 · 4 points
- A Hacker News story“DeerFlow, a community-driven Deep Research framework”Hacker News · May 12, 2025 · 4 points
- @toolhunt.bsky.social“ByteDance выкатили deer-flow — открытый SuperAgent harness для долгосрочных задач, который сам кодит, …”Bluesky · Aug 19, 2026 · 3 likes
The biggest 5 of 79 mentions linking to the repository that our crawl found. Each line is their own headline.
See all 79
Talked about on GitHub, Bluesky and Hacker News (79 times).
On GitHub · 50
- Jun 22, 2026feat(agents): add DeerFlow (bytedance/deer-flow) framework support — jaylfc/taOS2 reactions · 4 comments
- Feb 26, 2026[Add App]DeerFlow - 2.0 — beclab/apps2 reactions · 1 comment
- May 31, 2025更加炫酷的打字动画 — ant-design/x2 reactions · 1 comment
- Mar 7, 2026Feature: Automatic Session Title Generation — Lightweight LLM-Based Title After First Exchange (inspired by DeerFlow) — NousResearch/hermes-agent1 reaction · 5 comments
- Nov 26, 2025Explore integrating deer-flow into research features — XJTU-RL/Power-Planer1 reaction
45 more on GitHub
- May 12, 2025Request - Bytedance DeerFlow Integration — onyx-dot-app/onyx1 reaction · 2 comments
- Nov 18, 2026North+GLM wildcard experiment (epoch 21): When a tool output exceeds the observation budget, the agent should automatically revise its plan to insert a recall step that fetches the missing tail via read_offloaded, ensuring the full output can be retrieved without exceeding the budget. — DervinEvolve/AI-Agent0 reactions
- Nov 11, 2026Extra Fingerprints to add — SocksTheWolf/AgenticAlert0 reactions · 1 comment
- Nov 10, 2026fix(models): add opt-in merge of consecutive user messages (#6751) — wycocoyu/deer-flow0 reactions
- Nov 10, 2026fix(frontend): restore the draft and welcome state when a new session send fails (upstream #8039) — Zhong-fan/deer-flow0 reactions · 2 comments
- Nov 9, 2026fix(agents): count vLLM reasoning tokens in the summarization trigger (upstream #8074) — Zhong-fan/deer-flow0 reactions · 1 comment
- Nov 9, 2026fix(gateway): evict completed RunRecords in production (upstream #5009) — Zhong-fan/deer-flow0 reactions · 2 comments
- Nov 9, 2026fix(gateway): evict completed RunRecords in production (upstream #5009) — Zhong-fan/deer-flow0 reactions
- Nov 9, 2026fix(gateway): evict completed RunRecords in production (upstream #5009) — Zhong-fan/deer-flow0 reactions
- Nov 9, 2026fix(gateway): evict completed RunRecords in production (upstream #5009) — Zhong-fan/deer-flow0 reactions
- Nov 9, 2026fix(gateway): evict completed RunRecords in production (upstream #5009) — Zhong-fan/deer-flow0 reactions
- Nov 9, 2026fix(gateway): evict completed RunRecords in production (upstream #5009) — Zhong-fan/deer-flow0 reactions
- Nov 9, 2026fix(gateway): evict completed RunRecords in production (upstream #5009) — Zhong-fan/deer-flow0 reactions
- Nov 4, 2026agent-skills.github.bytedance.deer-flow: 2.1.0 → 2.2.0 — sudosubin/agents.nix0 reactions
- Nov 4, 2026claude-code-plugins.github.bytedance.deer-flow: 2.1.0 → 2.2.0 — sudosubin/agents.nix0 reactions
- Oct 28, 2026fix(subagents): validate recovery before superseding source tasks — Aldenshile/deer-flow0 reactions
- Oct 26, 2026Add licensed skills, reusable materials, and source catalogues — EmbeddedLLM/nice-skills0 reactions
- Oct 26, 2026[Feature] Sub Agent 派生与 Agent 能力分档 — Code-MonkeyZhang/persona-agent0 reactions
- Oct 26, 2026[Refactor] Agent Core 拓扑重构以支撑能力分档与 Sub Agent — Code-MonkeyZhang/persona-agent0 reactions
- Oct 24, 2026fix(agent): enforce delegated skill scope and show saved progress — pyrelio88-afk/Selenyx0 reactions
- Oct 20, 2026Capability request: BoxLite sandbox (local micro-VM workspace backend) — pydantic/pydantic-ai0 reactions · 1 comment
- Oct 20, 2026Context runtime acceptance: accurate budgets, cancellation and durable task continuity — bei-shan/WodeAgent0 reactions
- Oct 19, 2026Framework drift review required — aporthq/aport-agent-guardrails0 reactions · 4 comments
- Oct 19, 2026fix(channels): acknowledge GitHub comments queued during a busy run — wannT-1/deer-flow0 reactions
- Oct 17, 2026fix(vikingbot): screen web search result URLs — volcengine/OpenViking0 reactions
- Oct 15, 2026fix(vikingbot): reconcile streaming token usage — volcengine/OpenViking0 reactions
- Oct 15, 2026sandbox: E2B cloud micro-VM provider and distributed ownership protocol — bei-shan/WodeAgent0 reactions
- Oct 15, 2026sandbox: session-scoped SandboxProvider API, BoxLite warm VM pool and file operations — bei-shan/WodeAgent0 reactions
- Oct 11, 2026Add DeerFlow and its optional Parallel Search MCP example — kyrolabs/awesome-langchain0 reactions
- Oct 10, 2026fix(bot): replay Gemini tool-call thought signatures — volcengine/OpenViking0 reactions
- Oct 7, 2026fix(parse): reject colliding ZIP member paths — volcengine/OpenViking0 reactions
- Oct 5, 2026fix(parse): handle mixed-case Markdown artifacts — volcengine/OpenViking0 reactions
- Oct 4, 2026fix(config): handle localhost case-insensitively — volcengine/OpenViking0 reactions
- Oct 4, 2026claude-code-plugins.github.bytedance.deer-flow: init at 2.1.0 — sudosubin/agents.nix0 reactions
- Oct 3, 2026agent-skills.github.bytedance.deer-flow: init at 2.1.0 — sudosubin/agents.nix0 reactions
- Sep 27, 2026fix: restrict redirect schemes and discard intermediate response bodies — chenhz01/adversarial-research-audit0 reactions · 1 comment
- Sep 20, 2026Add Runtime execution budgets — GK-studio-JP/ai-os-runtime0 reactions
- Sep 20, 2026Add bounded Context Capsule budget and provenance — GK-studio-JP/ai-os-context0 reactions
- Sep 20, 2026Port DeerFlow safety to Browser Worker relay — GK-studio-JP/ai-os-runtime-browser-worker0 reactions
- Sep 10, 2026feat(discovery): 週に一度、新しく出たツールの候補を集めて PR にする — konweb/nanteyomu0 reactions · 1 comment
- Sep 8, 2026fix(subagents): tear down dispatched child before batch retry — Zsanz3/deer-flow0 reactions · 2 comments
- Sep 3, 2026feat(wizard): add aimlapi.com as an LLM provider — aimlapi/deer-flow-aimlapi0 reactions
- Aug 31, 2026fix(lark): allow Windows hosts to prepare Linux sandbox CLI runtime — Zsanz3/deer-flow0 reactions · 3 comments
- Aug 24, 2026[¥200 验收后付] DeerFlow #532 多轮 Deep Research 连续上下文实现 — snownico0722/snownico0722.github.io0 reactions
- Aug 19, 2026[Integration] bytedance/deer-flow — You.com web_search provider + setup wizard entry — youdotcom-oss/integration-tracking0 reactions · 17 comments
On Bluesky · 21
- May 11, 2025ByteDance's DeerFlow A framework for deep research, combining language models with tools like web search, crawling, and Python execution,… — @sungkim.bsky.social17 likes and reposts
- May 12, 2025🔬 DeerFlow: Deep Research Framework An open-source framework for conducting systematic deep research through coordinated LangGraph agents.… — @langchain.bsky.social8 likes and reposts
- Aug 19, 2026ByteDance выкатили deer-flow — открытый SuperAgent harness для долгосрочных задач, который сам кодит, исследует и автоматизирует рутину от… — @toolhunt.bsky.social3 likes and reposts
- May 6, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 bytedance / deer-flow ⭐ 65,357 (+328) 🗒 Python An open-source long-horizon SuperAgent harness that… — @github-trending.bsky.social3 likes and reposts · 1 reply
- Mar 31, 2026This GitHub project caught my eye: DeerFlow 2.0 is a fully extensible super agent platform for smart automation, custom workflows, and deep… — @alexiskirke.bsky.social3 likes and reposts
16 more on Bluesky
- Jun 21, 2026今日のGitHubトレンド bytedance/deer-flow DeerFlowは、サブエージェント、メモリ、サンドボックスを統合し、拡張可能なスキルによって多様なタスクを実行するオープンソースのスーパーエージェントハーネスです。… — @dailygithubtrends.bsky.social2 likes and reposts
- Feb 26, 2026ByteDance's DeerFlow is a TypeScript super-agent that orchestrates sub-agents, sandboxes, and persistent memory to tackle complex… — @arifsolmaz.bsky.social2 likes and reposts · 1 reply
- Sep 7, 2026🔥 Hot Repo! 🔥 (100+ new stars) 📦 bytedance / deer-flow ⭐ 81,682 (+188) 🗒 Python An open-source long-horizon SuperAgent harness that… — @github-trending.bsky.social1 likes and repost
- Mar 27, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 bytedance / deer-flow ⭐ 47,567 (+2,388) 🗒 Python An open-source long-horizon SuperAgent harness… — @github-trending.bsky.social1 likes and repost · 1 reply
- Mar 12, 2026Repo: github.com/bytedance/de... Here's why this is different from every other agent framework: It has its own sandbox. A real isolated… — @jainamparmar.bsky.social1 likes and repost · 2 replies
- Mar 12, 2026github.com/bytedance/de... github.com/AlexsJones/s... github.com/AlexsJones/l... Sharing more repos to later crawl my own page for data… — @moe-dude.bsky.social1 likes and repost
- Mar 11, 2026DeerFlow : framework open-source d'agents IA orchestrant recherche, code et création — @news.humancoders.com1 likes and repost
- Mar 10, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 bytedance / deer-flow ⭐ 27,977 (+1,443) 🗒 Python An open-source SuperAgent harness that researches,… — @github-trending.bsky.social1 likes and repost · 1 reply
- Mar 9, 2026DeerFlow : un framework open-source qui orchestre des sous-agents, mémoire et sandboxes pour gérer des tâches complexes de recherche et… — @camilleroux.com1 likes and repost
- Mar 1, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 bytedance / deer-flow ⭐ 22,795 (+352) 🗒 Python An open-source SuperAgent harness that researches,… — @github-trending.bsky.social1 likes and repost · 1 reply
- May 23, 2025DeerFlow DeerFlow is a community-driven framework for deep research, combining language models with tools like web search, crawling, and… — @pythonhub.dev1 likes and repost
- Aug 1, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 bytedance / deer-flow ⭐ 78,536 (+204) 🗒 Python An open-source long-horizon SuperAgent harness that… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Jul 11, 2026READMEで確認できたのは、DeerFlow 自体はMITのOSS。でも初期設定ではLLMプロバイダと任意のWeb検索を選び、鍵は `.env` に入れる設計です。Docker推奨で、ローカルLLMを動かすなら必要な計算資源も別。… — @mint-echosphere.bsky.social0 likes and reposts · 1 reply
- Jun 27, 2026READMEで確認できた範囲だと、2.0が全面書き直し、MIT、sub-agents / memory / sandbox、そして「minutes to hours」の長尺タスク志向は本当です。ここはちゃんと強い。… — @mint-echosphere.bsky.social0 likes and reposts · 1 reply
- Jun 21, 2026🚀 Skyrocketing! 🚀 (200+ new stars) 📦 bytedance / deer-flow ⭐ 72,237 (+415) 🗒 Python An open-source long-horizon SuperAgent harness that… — @github-trending.bsky.social0 likes and reposts · 1 reply
- Mar 22, 2026💎 Hidden Gem! 💎 (1000+ new stars) 📦 bytedance / deer-flow ⭐ 33,811 (+1,508) 🗒 Python An open-source SuperAgent harness that researches,… — @github-trending.bsky.social0 likes and reposts · 1 reply
On Hacker News · 8
- Mar 27, 2026Has Anyone Tried Deerflow?4 points
- May 12, 2025DeerFlow, a community-driven Deep Research framework4 points
- Mar 30, 2026Deer-Flow Installing Line3 points · 1 comment
- Mar 16, 2026Deep Exploration and Efficient Research Flow2 points
- Mar 15, 2026DeerFlow 2.0: open-source SuperAgent harness that researches, codes, creates2 points
3 more on Hacker News
- May 13, 2025DeerFlow: Deep Research Framework2 points
- May 18, 2026DeerFlow 2.0 – Deep Exploration and Efficient Research Flow1 point
- Apr 18, 2026An open-source long-horizon SuperAgent harness that researches,codes and creates1 point · 1 comment
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository30 other files it gives its agents.
- AGENTS.mdAGENTS.md
- backend/AGENTS.mdAGENTS.md
- scripts/AGENTS.mdAGENTS.md
- backend/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- frontend/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- academic-paper-reviewSkill
- bootstrapSkill
- chart-visualizationSkill
- claude-to-deerflowSkill
- code-documentationSkill
- consulting-analysisSkill
- data-analysisSkill
- deep-researchSkill
- find-skillsSkill
- frontend-designSkill
- github-deep-researchSkill
- image-generationSkill
- music-generationSkill
- newsletter-generationSkill
- podcast-generationSkill
- ppt-generationSkill
- skill-creatorSkill
- skill-reviewerSkill
- surprise-meSkill
- systematic-literature-reviewSkill
- vercel-deploySkill
- video-generationSkill
- web-design-guidelinesSkill
The file
We split this AGENTS.md into the rules it gives an agent
11 rules. About 0 are common, 4 are distinctive, and 7 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
7
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 56
Run status unmet identifies a finished occurrence whose scheduled goal was not satisfied.
- Distinctive: line 96
Keep this local to title extraction rather than changing the shared streamdown fence parser.
- Very specific: line 107
Class names: Use cn() from @/lib/utils for conditional Tailwind classes.
- Very specific: line 134
Leave these unset for the standard make dev / Docker flow, where nginx serves the public /api/langgraph/* prefix and rewrites it to …
- Very specific: line 167
Follow the established src/ structure
- Distinctive: line 168
Add TypeScript types and proper error handling
- Very specific: line 169
Write unit tests under tests/unit/ (pnpm test) and E2E tests under tests/e2e/ (pnpm test:e2e)
- Very specific: line 170
Run pnpm check before committing
- Distinctive: line 171
Update this AGENTS.md when architecture, commands, or conventions change
- Distinctive: line 191
Run-created optimistic snapshots have no archive flag: refresh archive-filtered lists from the server instead of inserting those snapshots …
- Very specific: line 242
Keep installation, enabled state, configured credentials, and verified authorization distinct.
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
AGENTS.md
This file provides guidance to AI coding agents (Claude Code, Codex, and others) when working with the DeerFlow frontend. It is the source of truth; the sibling CLAUDE.md imports it via @AGENTS.md.
Project Overview
DeerFlow Frontend is a Next.js 16 web interface for an AI agent system. It communicates with a LangGraph-based backend to provide thread-based AI conversations with streaming responses, artifacts, and a skills/tools system.
Stack: Next.js 16, React 19, TypeScript 5.8, Tailwind CSS 4, pnpm 10.26.2. Requires Node.js 22+ and pnpm 10.26.2+.
Core dependencies
- LangGraph SDK (
@langchain/langgraph-sdk^1.5.3) — Agent orchestration and streaming - LangChain Core (
@langchain/core^1.1.15) — Fundamental AI building blocks - TanStack Query (
@tanstack/react-query^5.90.17) — Server state management - UI: Shadcn UI, MagicUI, React Bits, and Vercel AI SDK elements (generated from registries — see Code Style)
pnpm-workspace.yaml overrides vulnerable @xmldom/xmldom 0.9.x releases to
0.9.12 for GHSA-965w-775f-mr7g. Nextra pulls it in through MathJax and
speech-rule-engine@4.1.2, which pins 0.9.8. Keep the override until the
upstream dependency chain resolves a patched version without it; regenerate
pnpm-lock.yaml and verify the docs build when changing this constraint.
Commands
| Command | Purpose |
pnpm dev | Start the development server with Webpack |
pnpm build | Production build |
pnpm check | Lint + type check (run before committing) |
pnpm lint | ESLint only |
pnpm lint:fix | ESLint with auto-fix |
pnpm format | Prettier check (pnpm format:write to apply) |
pnpm test | Run unit tests with Rstest |
pnpm test:e2e | Run E2E tests with Playwright (Chromium) |
pnpm typecheck | TypeScript type check (tsc --noEmit) |
pnpm start | Start production server |
Unit tests live under tests/unit/ and mirror the src/ layout (e.g., tests/unit/core/api/stream-mode.test.ts tests src/core/api/stream-mode.ts). Powered by Rstest; import source modules via the @/ path alias.
Webpack is the default development bundler. Use DEER_FLOW_DEV_BUNDLER=turbo with pnpm dev to opt in to Turbopack when diagnosing a local Next.js bundler issue.
On Windows pnpm dev binds 127.0.0.1 by default because Hyper-V/winnat excluded port ranges can reject Next's default 0.0.0.0 bind with EACCES (#2870). Pass pnpm dev -- --hostname 0.0.0.0 to listen on a LAN interface instead.
Rstest runs them as two projects (rstest.config.ts). *.test.ts / *.test.tsx run in a plain node environment — that is nearly the whole suite, and it is the default for anything that is pure logic. *.dom.test.ts / *.dom.test.tsx run in happy-dom, for tests that need a document: hooks driven through renderHook from @testing-library/react, and components. Keep the split — a DOM environment costs roughly 3x the runtime of the node suite, so tests that do not render should not opt into it. A hook whose behavior only exists under real React (effect ordering, cleanup on unmount, re-render on store change) belongs in a .dom.test.* file rather than a node test that mocks react itself.
E2E tests live under tests/e2e/ and use Playwright with Chromium. They mock all backend APIs via page.route() network interception and test real page interactions (navigation, chat input, streaming responses). Config: playwright.config.ts. The real-backend auth contract in tests/e2e-real-backend/auth-disabled-contract.spec.ts and backend/tests/test_auth_me_permissions.py pin the complete route-permission list; update both when adding registered permissions (including projects:read/write/delete).
The dedicated run-history.ts hook replaces the unpaged runs hook. Show counts
only after a successful history read, never during initial loading or errors.
Scheduled run history uses task/page query keys and the existing live offset API.
Fetch 51 rows to display 50 plus a next-page sentinel; never append pages. Only
page zero polls or refreshes on focus/reconnect. Task switches reset to page zero,
and consumed AbortSignals cancel obsolete reads. Live offsets are not snapshots;
explicit mutations or navigation may observe newly inserted runs.
Run status unmet identifies a finished occurrence whose scheduled goal was not satisfied; keep it distinct from execution failure.
Architecture
Frontend (Next.js) ──▶ LangGraph SDK ──▶ LangGraph Backend (lead_agent)
├── Sub-Agents
└── Tools & SkillsThe frontend is a stateful chat application. Users create threads (conversations), send messages, set thread-scoped /goal completion conditions, and receive streamed AI responses. The backend orchestrates agents that can produce artifacts (files/code), todos, and goal state updates.
Source Layout (src/)
app/— Next.js App Router. Routes include/(landing),/showcase/[thread_id](allowlisted public read-only demos),/workspace/chats/[thread_id](authenticated chat),/workspace/agents/[agent_name]and/workspace/agents/new(custom agents),/artifacts/view(chrome-free window that renders Markdown or CSV/TSV artifacts with the panel's own renderer),/blog/…, the(auth)/{login,setup,auth/callback}flow,/[lang]/docs/…, and/api/…route handlers (e.g./api/memory).components/— React components:ui/— Shadcn UI primitives (auto-generated, ESLint-ignored)ai-elements/— Vercel AI SDK elements (auto-generated, ESLint-ignored)workspace/— Chat page components (messages, artifacts, settings)landing/— Landing page sectionsdocs/— Docs / MDX rendering components
core/— Business logic, the heart of the app. Domains includethreads/(creation, streaming, state),api/(LangGraph client singleton),agents/(custom agents),subagents/(runtime worker catalog and administrator mutations),auth/(authentication),artifacts/,channels/(IM connections),integrations/(managed third-party integration status/install clients such as Lark CLI),i18n/(en-US, zh-CN),settings/,memory/,skills/,messages/,mcp/,models/,input-polish/(pre-send draft rewrite API),voice-input/(browser speech-recognition helpers),suggestions/,tasks/,todos/,tools/,workspace-changes/(run-scoped changed-file summaries and diff fetching),config/,notification/,blog/, plus rendering helpers (rehype/,streamdown/) andutils/.hooks/— Shared React hookslib/— Utilities (cn()from clsx + tailwind-merge)content/— MDX content (blog posts, docs) rendered by the appstyles/— Global CSS with Tailwind v4@importsyntax and CSS variables for themingtypings/— Ambient TypeScript declarations- Root files:
env.js(env validation),mdx-components.ts(MDX component map)
More specific AGENTS.md files under src/ contain the frontend sections split from this file.
Code Style
core/utils/markdown.ts reads web-fetch titles from the first nonblank line.
Match zero to three literal spaces before # without trimming indentation;
mixed space/tab code blocks must fall back to the URL. Strip optional closing
hashes with a backwards scan so long fetched titles cannot cause quadratic regex
backtracking. Closing hashes require a preceding space/tab (or an empty title)
and only ASCII spaces/tabs afterward, apart from the terminal CR in CRLF input.
Non-ASCII trailing whitespace must not turn literal hashes into closing syntax.
Keep this local to title extraction rather than changing the shared streamdown
fence parser.
Custom Agent display_name is an optional Unicode UI label, edited in
AgentSettingsDialog. Use it with a fallback to name for gallery/chat text;
keep name for React identity, URLs, requests, and runtime agent_name.
The 100-code-point budget uses [...value.trim()].length, matching Pydantic;
do not use HTML maxLength, which counts UTF-16 code units instead.
- Imports: Enforced ordering (builtin → external → internal → parent → sibling), alphabetized, newlines between groups. Use inline type imports:
import { type Foo }. - Unused variables: Prefix with
_. - Class names: Use
cn()from@/lib/utilsfor conditional Tailwind classes. - Path alias:
@/*maps tosrc/*. - Components:
ui/andai-elements/are generated from registries (Shadcn, MagicUI, React Bits, Vercel AI SDK) — don't manually edit these.
Scheduled-task list search filters the current authorized query result by title or
prompt, composing with status/type filters and thread scope. Selection must derive
from the filtered list so hidden tasks cannot remain actionable. Keep literal
matching in core/scheduled-tasks/search.ts; clearing search retains other filters.
Single-run schedule edits retain the mounted task's original run_at while its wall time and timezone match. The parent echoes edits through initial; retain a stable snapshot and reset the parent draft during render before remounting with a task key when switching tasks. Use the resolved timezone consistently for the snapshot and displayed wall time. Component and scheduled-task E2E tests cover DST folds and timestamp precision.
Environment
Scheduled-task interval forms preserve the initial every_seconds on mount,
timezone changes, and untouched blur. The backend's configurable interval minimum
can be lower than the UI's default 60-second floor. Apply that UI floor only after
an explicit amount/unit edit so editing metadata or duplicating a task cannot
silently change its cadence. Component regressions live in
tests/unit/components/workspace/scheduled-task-schedule-input.dom.test.tsx.
Backend API URLs are optional; an nginx proxy is used by default:
NEXT_PUBLIC_BACKEND_BASE_URL=http://localhost:8001
NEXT_PUBLIC_LANGGRAPH_BASE_URL=http://localhost:8001/apiLeave these unset for the standard make dev / Docker flow, where nginx serves the public /api/langgraph/* prefix and rewrites it to Gateway's native /api/* routes.
make build-static creates a standalone read-only demo and copies .next/static
and public into the output. In static mode, core/api/static-response.ts
resolves Gateway REST reads with the bundled capability catalog and safe
installation projections from existing same-origin /mock/api fixtures; writes
and unknown API routes fail locally.
The homepage client counter calls /github-stars, outside the Gateway proxy.
That dynamic route reads the server-only GITHUB_OAUTH_TOKEN at runtime, caches
GitHub data for one hour, and returns 204 when the count is unavailable. Start
the standalone server from frontend/ with node --env-file=.env
.next/standalone/server.js to load the current credentials.
To reach a dev server on anything other than localhost — a LAN address, or a proxied hostname — list the host in DEER_FLOW_DEV_ALLOWED_ORIGINS (comma-separated; a full URL is reduced to its host). It feeds Next's allowedDevOrigins, which gates /_next/*, fonts, and HMR. Without it those requests get a 403 and the page renders server-side but never hydrates, so nothing on it — including the login form — responds. Development only; production builds ignore it.
One-time schedule input uses validZonedLocalToUtcIso to reject wall times that
do not round-trip in the selected timezone. Invalid input emits an empty spec and
localized inline feedback; both create and edit must block submission. Keep this
UI validation separate from the API payload. Preserve the original instant when
wall time and timezone match the mounted snapshot; validate changed inputs, and
restore the exact original timestamp when those edits are reverted.
Resources
Contributing
When adding features:
- Follow the established
src/structure - Add TypeScript types and proper error handling
- Write unit tests under
tests/unit/(pnpm test) and E2E tests undertests/e2e/(pnpm test:e2e) - Run
pnpm checkbefore committing - Update this
AGENTS.mdwhen architecture, commands, or conventions change
Route asset budgets are enforced with pnpm perf:check. The command measures
/login from a normal production build, then builds in static-demo mode for the
fixture-backed workspace routes. It starts the production server on temporary local
ports, measures the unique JavaScript and CSS files referenced by representative
routes, writes the detailed result to .next/performance-results.json, and compares
totals with performance-budgets.json. Fix route ownership or split points when a
budget fails; do not raise a ceiling without documenting and reviewing the measured
regression.
Chat archive is a thread metadata flag (deerflow_archived === true), independent
of run status. Sidebar and Chats explicitly request the Gateway's optional
archived filter through searchThreadsByArchive; the SDK drops this extension,
so use the authenticated REST fetcher. Static demos retain SDK fixture queries.
core/threads/archive.ts waits for the write, cancels stale reads, merges only the
owned flag into metadata snapshots, then restarts metadata reads and resets list
pagination. Keep both default and Custom Agent header restore controls in sync.
Pin/archive responses must not merge unrelated metadata flags: out-of-order
organization requests can otherwise roll back each other's confirmed state.
Run-created optimistic snapshots have no archive flag: refresh archive-filtered
lists from the server instead of inserting those snapshots into either view.
Delimited artifact preview
CSV/TSV previews share artifact-table-preview.tsx between the panel and standalone viewer. Papa Parse runs only inside delimited-preview.worker.ts; use-delimited-preview.ts bounds input before transfer, cancels stale work, and enforces a five-second timeout. The parser detects the first record separator outside quoted fields and passes it explicitly to Papa Parse, so embedded newlines in an incomplete quoted field cannot corrupt newline detection. It retains at most 202 logical records and 50 columns, discarding an incomplete final record from truncated input. UI pagination displays at most 200 data rows in pages of 50. Keep the table mounted but inactive when switching to source so header/pagination state survives; changing file identity resets it. Pending write_file content stays in source mode until success.
For a truncated sample whose first separator is LF or CRLF, strip a terminal CR before parsing so a split CRLF separator cannot make a quoted final field invalidate the whole preview, including LF-first files with later CRLF records. The terminal record remains incomplete and is discarded; complete CR-only files and malformed quotes retain their existing behavior.
Custom skill export is admin-only and disabled in static demos. The lazy
skill-export-dialog.tsx must abort requests and ignore stale callbacks on close
or user/skill changes. core/skills/export.ts owns the revision-bound Blob download;
HTTP 409 requires explicit preview refresh. Keep file lists paginated and diagnostics
localized. Browser handoff does not prove the file was saved to disk.
Sidebar rows request deletion through ThreadDeleteDialogProvider, hosted in
WorkspaceSidebar outside the virtualized flat/project lists. Keep the selected
thread snapshot and retry UI alive when a partial deletion removes its row.
Focus Cancel on open and after a failed deletion has re-enabled the actions;
block dismissal while deletion is pending. Show the error message when available,
with a localized fallback, and log the rejection for debugging. The shared
delete helper accepts remote 404 (not 403) before retrying local cleanup, and
onDeleted runs only after both deletion steps succeed.
Capability Center
/workspace/capabilities owns Plugins and Skills navigation. Plugins composes the
MCP manager and a lazily loaded Lark configuration dialog; installation, OAuth,
mutation permissions, and cache ownership remain in the existing hooks. Skill display names/summaries are presentation
metadata; runtime names and full descriptions remain unchanged. Public, custom,
integration, and legacy sources must stay distinct. Community currently offers
archive import, not a remote marketplace. Screenshot E2E fixtures are demo data.
backend/packages/harness/deerflow/capabilities/builtin.json owns localized
catalog manifests. Refresh the generated demo snapshot with pnpm catalog:sync
after changing the catalog; unit tests enforce equality with the source. Demo
business projections derive provider IDs from the catalog adapter metadata. The
sync script uses decoded filesystem paths for formatter configuration lookup.
plugin-catalog.ts only resolves localized text and explicit
installation metadata; never infer provider identity from server display names.
plugin-directory.tsx groups rows and applies search/category/installed filters.
core/capabilities consumes catalog and safe status projections; MCP secrets and
raw settings remain in the administrator-only editor. plugin-adapters.tsx
registers integration-specific settings flows once, independent of catalog size.
The business form uses manifest credential fields without asking for an MCP URL;
its backend adapter generates bundled DingTalk/WeCom notification or HubSpot CRM
connections. These also appear in MCP discovery, so deduplicate projections by
installation ID. Keep their labels as configuration, not package installation.
Keep installation, enabled state, configured credentials, and verified authorization
distinct. Agent mcp_plugins uses stable installation IDs; null means all, [] means
none. The settings dialog submits only selections changed from its opening
snapshot, preserving concurrent updates on unrelated saves and treating restored
selections as unchanged. It is runtime selection, not a replacement authorization policy. See
docs/capability-center.md for the complete contract and extension example.
PluginIcon is shared by recommendations, configured entries, and the editor;
brand assets and their provenance live in public/images/plugins/. Brand icons
require explicit catalog metadata; a custom server name never selects a brand.
Ambiguous installation IDs remain visible but cannot be selected for an Agent. The icon picker
accepts local PNG/JPEG/WebP up to 2 MiB, checks the signature, decodes and contains
the image in a 128px PNG, and stages changes until the existing targeted MCP save.
presentation.icon is a bounded PNG data URL carried by the API's existing extra
metadata support; it must never enter transport parameters. Preserve sibling
presentation fields and masked credentials; cancel/reset/unmount must fence stale
image-decoding results. Uploaded remote URLs and SVG are never rendered. Existing
shared-MCP administrator checks remain authoritative; this adds no personal scope.
<!-- BEGIN:nextjs-agent-rules -->This is NOT the Next.js you know
This version has breaking changes — APIs, conventions, and file structure may all differ from your training data. Read the relevant guide in node_modules/next/dist/docs/ (resolved from this file's directory; in monorepos the next package may not be visible from the repo root) before writing any code. Heed deprecation notices.
This block is written and re-added by next dev — verify at node_modules/next/dist/server/lib/generate-agent-files.js. Removing it from a diff only re-creates the uncommitted change; committing it with your work keeps the tree clean.
<!-- END:nextjs-agent-rules -->Shared model settings
Settings → Models (?settings=models) offers administrator-only catalog management
through /api/managed-models. YAML entries are read-only. core/models/management.ts
whitelists editable fields so source metadata and has_api_key never get posted.
Draft credentials stay in editor state, never query cache or browser storage; blank
keeps the saved key, explicit removal sends an empty key. Saving invalidates both the
admin catalog and MODELS_QUERY_KEY. Editor unmount aborts probes and fences late
callbacks. Static demos and non-admin users must not query the management API.
Model reasoning capabilities
/api/models projects a per-model reasoning contract (issue #5073) beside the
deprecated supports_thinking / supports_reasoning_effort booleans.
core/models/reasoning.ts is the only place that interprets it: it falls back to
the booleans for older Gateways, clamps the chat mode (getResolvedMode never
yields flash for a required-thinking model), lists the effort options the
composer and the sidecar render, and maps mode presets and remembered values
through the contract's aliases/default (resolveReasoningEffort). Effort values
are open strings (ReasoningEffortValue), so provider-specific tokens such as
max flow through local settings and account preferences unchanged; the custom
agent dialog offers only the intersection with the per-agent low/medium/high
schema and hides "off" for required-thinking models. Do not read the booleans in
components directly. On a legacy model, resolveReasoningEffort keeps only its
advertised generic values; this drops a remembered provider-specific token after
a model switch without changing the backend's direct legacy-request behavior.
Full-stack plugin UI
core/extensions/ loads authenticated deployment-installed ES modules from /api/plugins.
Inline modules use authenticated fetch plus a released Blob URL. Manifest assets use
native credentialed module scripts, preserving relative imports and resource URLs.
Both honor the backend base and prefixes; transport and cache semantics are documented in
docs/full-stack-plugins.md. Host copy belongs in the typed locale dictionaries.
Conversation action factories, shapes and availability callbacks are guarded per plugin;
only validated value snapshots reach the toolbar/sidebar render paths.
PluginNavigation and the dynamic workspace extension route consume page declarations;
Capability Center defaults to the repository examples in core/extensions/catalog.ts,
merged by explicit namespace with runtime descriptors. Catalog-only entries are discovery
metadata, never module-loader inputs or proof of installation. Backend-only examples may
have no plugin descriptor; keep their runtime status unasserted. Details link to package
installation instructions. Keep the catalog aligned with examples/deerflow-extension-*.
Agent teams uses community.agent-teams; merge its installed descriptor into the
localized catalog entry without asserting runtime status for a catalog-only row.
Conversation action slots augment normal/custom-agent toolbars and sidebar menus without replacing native export or notification.
Plugin views use mount/dispose and abort signals; Shadow DOM is CSS isolation, not a sandbox.
Descriptors are user-keyed page snapshots, refreshed manually. Backend calls bind the plugin's
namespace, action allowlist and expected viewer identity. See docs/full-stack-plugins.md.
Plugin page openConversation(threadId) resolves authenticated thread metadata
with pathOfThread; do not let plugins hardcode default-agent routes. The page's
abort signal fences late navigation after unmount/account changes. Synchronous
conversation-action callbacks reject Promise returns while consuming rejections.
Composer references
components/workspace/mentions/ owns cursor-local @ detection, the picker,
and atomic references. Render labels as DOM text, never HTML; canonical tokens
preserve draft positions. Submission expands tokens to @label and sends up to
16 unique skill IDs in additional_kwargs.skill_references; the backend checks
each against the user registry and agent allowlist. The web slash picker lists
only /goal and /compact; skill selection uses @. Legacy typed slash text
continues through normal message submission for backend and channel compatibility.
Project files require confirmed additional_kwargs.files. Conversation context
is reconciled from tokens against the current capability and limit. Only successful
discovery may flatten references; pending/errors preserve IDs and block reference
sends, with retry on failure. Polish restores whole labels longest-first in one
pass. Confirmed thread creation seeds metadata before migration; references stay
locked during attachment. Deleting an object removes its context; undo restores
references already attached to the draft. Labels grant no read authority. IME,
caret, thread changes and attachment fences apply to editor and picker. The @
and attachment buttons share the picker.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

