deer-flow/examples
Totoro f6fe1e9c9e
fix(workflows): align sequential Agent handoff size limits (#7231)
Allow ordinary Agent tasks the same 16,000 JSON bytes already accepted for
file-reference tasks, keeping the 12,000-byte output cap and bounded rejection.
Cover ASCII, escaped Unicode, maximum output and pre-admission rejection.

Co-authored-by: Totoro-qaq <279883115+Totoro-qaq@users.noreply.github.com>
Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-21 19:02:26 +08:00
..
deerflow-extension-agent-teams fix(extensions): harden team history cursors and cancelled results (#6832) 2026-10-14 06:05:16 +08:00
deerflow-extension-bookmarks feature(skills): keep allowed-tools as compatibility metadata (#6935) 2026-10-20 19:34:28 +08:00
deerflow-extension-example feat(extensions): add example guide and packaging checks (#6755) 2026-10-12 22:51:20 +08:00
deerflow-extension-jev-classify feat(memory): add Jev pre-screening and signal classification over a shared TypeSafe client (#5906) 2026-09-27 20:28:05 +08:00
deerflow-extension-jev-context feat(memory): add Jev pre-screening and signal classification over a shared TypeSafe client (#5906) 2026-09-27 20:28:05 +08:00
deerflow-extension-jev-screening fix(examples): harden the Jev fetched-content screening example (#5858) 2026-09-25 19:58:36 +08:00
deerflow-extension-knowledge feat(knowledge): decouple scope and read-only catalogs (phase 2) (#6904) 2026-10-15 15:10:39 +08:00
deerflow-extension-retrieval feat(extensions): allow ModelTool plugins to return structured artifacts (#6861) 2026-10-14 17:24:32 +08:00
deerflow-extension-weknora feat(knowledge): add WeKnora read-only extension (phase 3) (#6950) 2026-10-18 10:28:30 +08:00
deerflow-extension-workflows fix(workflows): align sequential Agent handoff size limits (#7231) 2026-10-21 19:02:26 +08:00
README.md feat(extensions): add example guide and packaging checks (#6755) 2026-10-12 22:51:20 +08:00

Develop an extension from an existing example

Start with the smallest example that covers your extension. Each directory is an independent Python package using the public deerflow-extension-api contract.

Start here What it demonstrates
Extension example Middleware, task lifecycle, model observations, services, and HTTP routes. Start here for backend extensions.
Conversation bookmarks A browser page, conversation action, backend actions, packaged resources, and a model tool. Start here for full-stack plugins.
Agent teams Full Agent orchestration. Use this after the basic contribution and lifecycle patterns are familiar.

Additional examples cover text-list classification, context pruning, and advisory screening of fetched content.

Edit, test, check, then install

  1. Copy the selected example outside the DeerFlow checkout. Rename its Python package, distribution and deerflow.extensions entry point. For a full-stack plugin, also choose its own namespace and browser module name.

  2. Follow the example's README to configure its dependencies and run its tests. Keep package behavior tests alongside the extension.

  3. From the DeerFlow checkout root, prepare the backend environment with make -C backend install, then check the package:

    uv run --project backend --no-sync python scripts/check_extension.py /absolute/path/to/your-extension
    

    To try the checker on an unchanged example:

    uv run --project backend --no-sync python scripts/check_extension.py examples/deerflow-extension-bookmarks
    
  4. Follow that example's deployment and try-it instructions. Restart Gateway, refresh the browser when applicable, and exercise the installed feature. Use make extension-upgrade SOURCE=/absolute/path/to/your-extension to apply later source edits: local installs are snapshots.

What the checker covers

The script builds a wheel in a temporary directory, checks exactly one extension entry point and its packaged Python module, parses packaged Python syntax, and checks that the API dependency range accepts this checkout's contract version. It validates conventional ui_manifest.json resources with the same validator used by Gateway, including detecting manifests left out of the wheel in flat or src/ layouts. A custom manifest filename needs an explicit wheel-relative path:

uv run --project backend --no-sync python scripts/check_extension.py /absolute/path/to/your-extension --manifest your_package/resources.json

The build executes the package's build backend, so check trusted sources. The checker does not import the extension, call install(), install the extension, or change deployment configuration. Registration/configuration behavior and the @extension version marker are verified when loading the plugin; continue to run the package tests and the installed feature after packaging checks pass.