Featured image of post Automated Workflow Agent in Practice: Weekly Report Generation Reduced from 3 Hours to Unattended Operation

Automated Workflow Agent in Practice: Weekly Report Generation Reduced from 3 Hours to Unattended Operation

An automated workflow agent based on planning and multi-agent architecture enables automatic weekly report generation with three-tier self-recovery.

Automated Workflow Agent in Practice: Weekly Report Generation Reduced from 3 Hours to Unattended Operation

Core event: A case study published on juejin.cn demonstrates an automated workflow solution for weekly business reports, built on a planning + multi-agent architecture. The approach has been deployed in practice, reducing manual 3-hour report generation to fully automated operation.

  • Release timing: September 2026 (article published on Juejin)
  • Core capabilities: Task decomposition, parallel execution, cost optimization, exception recovery, data validation, full workflow orchestration
  • Key metrics: Per-task budget cap at 0.5 CNY, monthly cap at 30 CNY, max 2 retries with exponential backoff (5s, 15s)
  • Target use cases: Recurring tasks (weekly/monthly reports) with four-stage pipeline: data fetch → analysis → report generation → distribution

Task Decomposition: Planning-Driven Workflow Graph

Task Decomposition: Planning-Driven Workflow Graph
Task Decomposition: Planning-Driven Workflow Graph|News screenshot

The workflow follows a Planner-Manager-Worker pattern: Planner generates task plans and dependency chains, Manager assigns work and coordinates parallel branches,_workers execute individual steps. For weekly reports, tasks are decomposed into:

  1. Fetch order data and traffic data (parallelizable)
  2. Analyze sales trends and channel performance (depend on Step 1, parallelizable)
  3. Draft report (depends on Step 2)
  4. Distribute via WeCom/email (depends on Step 3)

The parallel branch design is key: order/traffic data fetching and trend/channel analysis can run simultaneously. This contrasts sharply with linear “one-prompt-chain” execution, which suffers from low efficiency, long error chains, and difficulty isolating problematic nodes.

MCP Integration and Three-Layer Cost Control

MCP Integration and Three-Layer Cost Control
MCP Integration and Three-Layer Cost Control|News screenshot

The solution integrates office suite capabilities via an MCP Server with these tools:

  • create_report_doc: Create online documents and return links
  • send_wecom_message: Send WeCom notifications (for task status alerts)
  • send_email: Send formal emails (designated as sensitive operation requiring internal confirmation)

To prevent runaway costs, a three-tier熔断 (circuit breaker) mechanism is implemented:

  • Per-task layer: Max cost 0.5 CNY, max 20 steps
  • Monthly layer: Max 30 CNY, 80% threshold triggers alert
  • Execution layer: Fallback to cached data or human escalation for exceptions

Three-Tier Self-Recovery + Pre-Transmission Validation

Three-Tier Self-Recovery + Pre-Transmission Validation
Three-Tier Self-Recovery + Pre-Transmission Validation|News screenshot

The most notable feature is the combination of three-tier self-recovery and sender-side sanity checks:

Recovery follows “retry what can be retried → skip what can be skipped with notification → escalate what cannot be recovered”:

  1. Tier 1 (retry): Transient data source failures trigger 2 exponential backoff retries (5s then 15s)
  2. Tier 2 (skip + notify): Complete data source omission records reason and notifies via WeCom
  3. Tier 3 (human handoff): Other exceptions fall back to cached data and escalate to human review

Even more critical is the pre-transmission validation to prevent“workflow success but data failure”:

  • Non-negative amount check
  • Summation error < 0.01
  • Orders > 0 (reasonability)
  • Channels ≥ 3 (completeness)

Any failed validation blocks transmission to all recipients—automation never means “automatically wrong.”

Deployment Recommendations and Execution要点

Deployment Recommendations and Execution要点
Deployment Recommendations and Execution要点|News screenshot

  • Ready to adopt: Fixed-schedule reports with stable data sources, template-friendly content structure, and existing WeCom/email automation infrastructure
  • Wait longer if: Data sources are volatile, validation rules hard to quantify, or deep human judgment required (e.g., strategic market analysis)

Bottom Line

The core tension in workflow automation lies not in technical feasibility but in defining “unattended” realistically. This case offers a pragmatic answer: self-recover what can be recovered, alert humans what cannot; validate what can be validated, block what fails validation. That pragmatism may well be the true hallmark of responsible Agent adoption.