Deer Workflow is a runtime for agent workflows in which control flow lives in TypeScript and only the steps that need judgment call a model. A workflow is an ordinary TypeScript module: phases, branches, loops, concurrency, barriers, retry limits, and stopping rules are written as reviewable code, while an agent() call starts a full ReAct loop with its own tools and context. JSON Schema validates an agent's result before the next step consumes it.
Workflows can be generated as well as hand-written. Describing the orchestration in a sentence has a coding agent apply a bundled workflow-creator skill and emit a runnable module. Codex CLI is the default generator, with Claude Code and Pi built in behind a vendor-neutral agent interface. Running a workflow takes the module and JSON input: an interactive terminal shows phases and Markdown logs in a live view, and a print mode streams one JSON event per line for servers, continuous integration, and process pipelines.
Because a workflow is a single portable file, the same module runs from the command line, inside CI/CD, as a cloud or function service, or in a desktop application. Bundled examples cover deep research, which discovers angles, investigates them in parallel, verifies claims, and produces an interactive HTML report, and a blog writer that plans an article, drafts its sections through a pipeline, reviews them, and returns structured output. The project is a pilot for DeerFlow 3.0.
Features
- Code-defined control flow: phases, branches, barriers, retry limits, and stopping rules in reviewable TypeScript
- Agent loops on demand: agent() runs a complete ReAct loop with tools and its own context, not a single completion
- Schema-checked results: JSON Schema validates an agent result before code acts on its shape
- Workflow generation: one sentence plus a bundled creator skill writes a runnable workflow module
- Replaceable runtimes: Codex by default, with Claude Code and Pi built in behind a vendor-neutral interface
- Two run modes: a phase-aware terminal view for people, and a JSONL event stream for automation
- Portable modules: the same file runs from the CLI, in CI/CD, as a service, or in a desktop app
- Worked examples: deep-research and blog-writing workflows ship in the repository
