跪拜 Guibai
← All articles
Architecture · Agent · Artificial Intelligence

From Form-Filling to Agent-Driven: How Dewu Rebuilt Its Event Setup with a Two-Stage AI Workflow

By 得物技术 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

This case study shows a pragmatic middle path between fully autonomous agents and manual workflows — exactly where most enterprise AI applications live. The architecture decisions (Workflow vs. Agent, interrupt/resume patterns, capability registries, progressive disclosure) are directly applicable to any team building AI-powered internal tools. It also demonstrates how to handle the hard parts: side-effect control, trust-building, and engineering trade-offs.

Summary

Dewu's community operations team faced a fragmented workflow: launching a marketing campaign required jumping between three systems, filling 40+ fields, and manually syncing changes. Their first attempt — an AI form-filler that pre-populated fields from a planning document — cut time but didn't change the paradigm. Operators still drove the process, and AI was just a smarter autocomplete.

The real breakthrough came when they flipped the model: AI drives the process, humans only confirm at key nodes. The second version used LangGraph to orchestrate a workflow that fetches documents, parses fields, creates topics and campaigns, and configures venue components — all while the operator reviews structured cards and approves or edits. A Capability Registry lets new scenarios plug in without touching core code.

The third version added a Stage 1 Agent that generates the planning document itself from a vague idea, using progressive disclosure to gather minimum info (name, time, topic) before handing off to Stage 2's aggregated workbench. The workbench reuses the existing venue previewer with an interactive overlay, supports natural-language component editing, and runs legacy forms in a separate runtime to avoid rewriting 16+ component configs.

Takeaways
Dewu's first AI attempt (form pre-fill) reduced time but didn't change the paradigm — operators still drove the process.
The second version flipped the model: AI drives the workflow, operators review structured cards and confirm at 6 interrupt points.
LangGraph was chosen for orchestration because the venue setup process is a deterministic finite state machine, not an open-ended agent task.
The Capability Registry lets new scenarios (venue building, dynamic filtering, general chat) register UI contributions without modifying the shell.
The Component Module Protocol defines a unified lifecycle with a critical rule: no side effects during initialization — write operations only happen after user confirmation.
The third version added a Stage 1 Agent that generates planning documents from a vague idea using progressive disclosure (minimum 3 fields: name, time, topic).
Stage 2's aggregated workbench reuses the existing venue previewer with an interactive overlay, avoiding a full rewrite.
Natural-language component editing is supported via an explicit AI assistance panel and a general chat interface that passes selected component context to a backend editing sub-process.
Legacy component forms run in a separate build (Form Host) to reuse the existing Formily runtime, communicating via a message protocol.
The system follows a read-only → write → publish permission escalation across stages, mirroring AWS's Principle of Least Privilege.
6 interrupt points cover Approve/Reject, Edit, and Respond/Input patterns, with each card explaining why input is needed and what AI has already done.
Declarative position orchestration lets components specify placement intent (e.g., 'this vertical feed wants to be at the end of the page') without knowing the layout.
Conditional injection automatically adds components based on context (e.g., budget pool → add budget component), with a visible 'auto-injected' prompt.
The project evolved through three versions: AI fills fields → AI drives process → AI generates plan + builds venue.
Three immutable principles: process controllable, accuracy first, lower operator burden.
Conclusions

The real lesson is that AI's ceiling in enterprise tools is not model capability but paradigm design — as long as humans remain the process driver, AI is just a faster form filler.

The Workflow vs. Agent decision is elegantly framed: if the process is a finite state machine, use Workflow; if it's an open-ended goal, use Agent. Most enterprise scenarios need a hybrid.

The interrupt/resume pattern is a practical implementation of human-in-the-loop that balances autonomy with control — it's not about limiting AI but about building trust through transparency.

The Capability Registry and Component Module Protocol demonstrate that extensibility in AI systems is less about model architecture and more about clean software engineering patterns (open-closed principle, plugin systems).

The progressive disclosure approach to information gathering is a smart UX pattern that reduces cognitive load — it's notable that they explicitly reference Nielsen Norman Group's work.

The Form Host compromise is a realistic engineering trade-off: sometimes it's better to wrap legacy systems than to rewrite them, even if it adds architectural complexity.

The permission escalation (read → write → publish) is a direct application of security best practices to AI systems — a pattern that should be standard in any agentic system.

The shift from 'AI helps you fill fields' to 'AI drives the process' mirrors the evolution of developer tools like Copilot to Copilot Workspace — the inflection point is when AI becomes the subject, not the tool.

The explicit rejection of fake progress bars and the emphasis on explaining 'why' at each interrupt point shows a mature understanding of AI trust-building — transparency beats performance theater.

The three immutable principles (controllable, accurate, lower burden) are a good checklist for any AI-powered internal tool — they prioritize operational reality over technical novelty.

Concepts & terms
LangGraph
A state orchestration engine from the LangChain team that uses directed graphs to define AI workflows. Each node is a processing step (LLM call, tool call, or human confirmation), and edges define transition conditions. It supports interrupt/resume via a built-in Checkpointer for session persistence.
Interrupt/Resume
A pattern where an AI workflow pauses execution at a human-in-the-loop node, sends a structured payload to the frontend, waits for user input, and resumes from the breakpoint. Implemented via LangGraph's interrupt() and Command(resume=value) API.
Capability Registry
A plugin-like system where each business scenario registers its UI contributions (welcome state, interrupt cards, result display) with a unified interaction shell. The shell dispatches and renders without knowing the specific business logic.
Component Module Protocol
A design pattern that abstracts each UI component into an independent module with a unified lifecycle (initialize, configure, pre-build, build). The critical rule: no side effects during initialization — write operations only happen after user confirmation.
Progressive Disclosure
A UX pattern where information is revealed gradually rather than all at once. In this system, the Stage 1 Agent asks for minimum fields first (name, time, topic) and progressively gathers more details based on conversation context.
Principle of Least Privilege
A security concept from AWS IAM where each subject only possesses the minimum permissions needed for the current task. Applied here as a three-tier permission model: read-only (Stage 1), write (Stage 2), publish (manual confirmation required).
Declarative Position Orchestration
A pattern where components declare their desired placement intent (e.g., 'place me after component X') without knowing the actual layout. A separate orchestrator resolves all declarations into a final arrangement.
Conditional Injection
An automatic component registration pattern where the system decides whether a component is needed based on context (e.g., budget pool exists → inject budget component). The user sees a prompt explaining what was auto-injected.
Form Host
A separate build that runs legacy component forms in their original runtime (Formily), communicating with the main workbench via a message protocol. An engineering compromise to avoid rewriting 16+ forms while reusing existing functionality.
Two-Stage Architecture
A design that separates the campaign planning phase (Stage 1: idea → structured document, read-only, chat interface) from the venue building phase (Stage 2: document → venue configuration, write operations, aggregated workbench with preview).
Source: juejin.cn ↗ Google Translate ↗ Backup ↗