Proactive AI Agents: Engineering Practices for Multi-Task Collaboration and Progress Reporting
This article explores the engineering implementation of proactive AI agents, focusing on multi-task collaboration and progress reporting. It covers the transition from passive response to proactive collaboration, the Coordinator-Worker architecture, unified state models, notification strategies, scheduled suspension, and branch exploration mechanisms. By defining clear boundaries and transparent states, developers can build agent systems that minimize user management overhead while keeping final decision-making authority in the hands of the user.
1. From Passive Response to Proactive Collaboration
Traditional assistant-style interactions follow a simple request-response model: the user issues a command, and the system returns a result. This approach is highly efficient for simple tasks. However, as tasks become more complex, users must shoulder a significant management burden: remembering which subtasks are running, checking progress individually, and determining when to intervene.
The goal of a proactive AI agent is to shift this management responsibility inside the system. The system continuously drives tasks forward and surfaces information to the user at critical junctures. To understand this shift, agent capabilities can be categorized into three levels:
- Responsiveness: Generating results based on a single input.
- Persistence: Maintaining context within a task cycle to accomplish multi-step progression.
- Proactivity: Autonomously determining the next step and reporting, reminding, or requesting confirmation at appropriate times.
Proactivity does not mean acting arbitrarily. The system can proactively advance low-risk work, such as reading materials, generating drafts, or organizing intermediate results. For irreversible operations—such as deletion, external communication, deployment, or permission modification—the system should pause and wait for user confirmation. The boundaries of proactivity determine whether the system can earn user trust.
2. The Coordinator-Worker Architecture
In multi-task scenarios, a common architecture is the Coordinator-Worker pattern. The Coordinator is responsible for understanding the overall goal, breaking down subtasks, allocating resources, and aggregating results. The Workers handle specific work and are mutually independent, each maintaining its own context.
Taking “building a static website” as an example, the Coordinator can break the goal into three types of subtasks:
- Page structure and style design, handled by Worker A.
- Functional testing and script validation, handled by Worker B.
- Documentation compilation, handled by Worker C.
These three subtasks can proceed simultaneously without blocking each other. Once all Workers complete their tasks, the Coordinator uniformly checks whether the outputs are consistent, for instance, verifying that the functions described in the documentation match the actual page behavior.
When decomposing subtasks, three conditions should be met:
- Clear boundaries: Each subtask has explicit inputs and outputs.
- Explicit dependencies: The sequential relationships between subtasks must be written into the plan, without relying on implicit assumptions.
- Verifiable completion: Each subtask has testable completion criteria, such as passing tests, generating files, or passing review.
Dependency relationships are typically represented using a Directed Acyclic Graph (DAG). The Coordinator schedules tasks in topological order, executing nodes with no dependencies in parallel. Below is a schematic code snippet illustrating the basic concept of scheduling (not an interface from any specific product):
# Schematic code: Coordinator splits tasks and schedules based on dependenciesdef run_plan(goal, max_parallel=3):tasks = plan(goal) # Split the main goal into subtasks and declare dependenciesdone, running = set(), {}while len(done) < len(tasks):ready = [t for t in tasksif t.id not in done and t.id not in runningand t.deps <= done] # Tasks whose dependencies are all completed can startfor t in ready[:max_parallel - len(running)]:running[t.id] = start_worker(t) # Start an independent worker unitfinished = wait_any(running) # Wait for any worker unit to finishdone.add(finished.task_id)del running[finished.task_id]return aggregate(done) # Aggregate results and perform consistency checks
Parallel scheduling must also handle resource conflicts. If two Workers modify the same file simultaneously, an overwrite issue occurs. Three common solutions exist: partitioning the workspace by file or module, applying locks to shared resources, or allowing each Worker to operate in an independent replica that the Coordinator merges at the end. A concurrency limit is also necessary; otherwise, the system may slow down or fail due to resource exhaustion.
3. Proactive Progress Reporting Mechanisms
The most direct user demand is knowing “which step it’s at” at any given moment. If users must open subtasks one by one to check, the proactive system loses its meaning. Solving this requires two foundational infrastructures: a unified state model and a reporting trigger mechanism.
3.1 Unified State Model
All worker units should use the same set of state definitions. A practical set of states is as follows:
| State | Meaning | Requires User Attention |
|---|---|---|
| pending | Queued, not yet started | No |
| running | Currently executing | No |
| waiting_input | Requires user input or confirmation | Yes |
| blocked | Encountered an obstacle, cannot proceed independently | Yes |
| done | Completed, results available for review | Yes |
| failed | Execution failed, error reason attached | Yes |
The value of these states lies in standardizing reporting content. The Coordinator can aggregate the states of multiple worker units into a single summary, such as “Of the three tasks, two are completed, and one is waiting for your confirmation on the design draft.” This is much easier to understand than relaying logs line by line.
3.2 Three Reporting Methods
Proactive reporting can be divided into three categories, each suited for different scenarios:
- On-demand query: The user actively asks, and the Coordinator reads the current state of all worker units and answers. This is the lowest-cost and most direct method.
- Event push: When a worker unit’s state changes, the Coordinator immediately generates a notification. Suitable for time-sensitive events such as failures, blocks, or required confirmations.
- Periodic summary: Summarizes progress at regular intervals. Suitable for long-running tasks to prevent user anxiety caused by a lack of feedback over extended periods.
These three methods are typically used in combination. The system defaults to providing the latest status upon user inquiry, pushing notifications during critical events, and periodically generating summaries for long tasks.
4. Notification Strategy and Attention Management
Notifications themselves consume user attention. Too many notifications will cause users to ignore important information, while too few will cause them to miss moments requiring intervention. Therefore, notifications should be generated strategically, rather than issuing a reminder for every state change.
A feasible tiered approach is as follows:
- Urgent: Execution failures, task blocks, or items requiring immediate confirmation. Notify immediately.
- Important: Task completion, production of phased results. Notify according to user preferences.
- Routine: Normal progress updates. Merged into periodic summaries by default.
Users can set their own notification conditions, such as “Only notify me when a task is completed or encounters a block.” This condition can be translated into a simple rule:
# Schematic code: Determine whether to send a notification based on user policydef should_notify(event, policy):if event.state in ("failed", "blocked", "waiting_input"):return True # Events requiring intervention always notifyreturn event.state in policy.notify_on # Other events judged by user preferencepolicy = Policy(notify_on={"done"}) # User choice: notify only upon completion
When implementing notifications, attention should also be paid to merging and deduplication. If the same task generates multiple state updates in a short period, they should be merged into a single message. Otherwise, users will receive a large number of repetitive reminders, rendering the strategy useless.
5. Scheduled Suspension and Wake-up
Some tasks need to wait for external conditions, such as waiting for next day’s data updates or waiting for a colleague to complete a review. Such tasks should not continuously occupy execution resources, nor should they persistently display as “running” in the list. The reasonable approach is to suspend the task and set a wake-up time.
The key steps for suspension and wake-up are as follows:
- Persist the task’s complete context to storage.
- Remove the task from the active list and mark it as suspended.
- Trigger resumption by the scheduler at the specified time.
- Reload the context upon resumption and notify the user.
The schematic code is as follows:
# Schematic code: Task suspension and scheduled resumptiondef suspend(task, wake_at):save_state(task) # Persist first to prevent context loss if process exitsactive_list.remove(task.id)task.status = "suspended"scheduler.schedule(wake_at, lambda: resume(task.id))def resume(task_id):task = load_state(task_id) # Reload context from storagetask.status = "pending"active_list.add(task.id)notify_user(f"Task '{task.name}' has reached its check time")
Three engineering details require attention here. First, time should be uniformly saved in ISO 8601 format with timezone offsets to prevent users in different time zones from receiving incorrect wake-up times. Second, the resume operation should be idempotent, meaning repeated wake-ups for the same task will not produce duplicate side effects. Third, tasks suspended for too long need timeout and cleanup rules; otherwise, unattended contexts will accumulate in storage.
6. Branch Exploration: Side Tasks and Solution Forking
In actual work, users frequently generate two types of new demands while the main task is in progress.
The first is temporarily inserting a question unrelated to the main thread. In this case, a side thread should be started to handle it independently without interrupting the main progress. The side task only reads the necessary context, and after the result is returned, the user decides whether to incorporate it into the main thread.
The second is dissatisfaction with the current approach, leading to a desire to try another method. This requires forking from the current state to form a new line of work. The key to forking lies in three points: copying a context snapshot, isolating the new branch’s write operations from the original branch, and finally allowing the user to compare the two results before deciding which to keep.
A comparison of the two modes is as follows:
| Dimension | Side Tasks | Solution Forking |
|---|---|---|
| Trigger Scenario | Inserting unrelated questions | Comparing different approaches |
| Relationship with Main Thread | Mutually independent | Departing from the same starting point |
| Context Source | Read only necessary info | Complete snapshot copy |
| Final Handling | Result merged or discarded | Keep the best, archive or delete the other |
| Primary Cost | Additional execution resources | Doubled storage and computation |
The value of branch exploration lies in letting users make decisions based on actual results rather than presetting answers in their minds. Comparison criteria should be defined before use, such as page load speed, lines of code, or test pass rate; otherwise, it is difficult to objectively compare the two results.
7. Engineering Practice Recommendations
Combining the mechanisms above, the following practices can be referenced when implementing these systems in reality:
- Define the state model and notification strategy before developing features. States and strategies form the foundation of the reporting experience, and modifying them later is costly.
- Complete all write operations in isolated workspaces, merging them only after confirmation. This limits the impact radius of errors to a single branch.
- Record inputs, outputs, and key decisions for each worker unit. Logs facilitate problem backtracking and support audit requirements.
- Set confirmation thresholds for irreversible operations. Actions like deletion, sending, and deployment must be explicitly authorized by the user.
- Set timeout and cleanup rules for suspended tasks. Avoid the long-term accumulation of unattended tasks in storage and lists.
- Monitor key metrics. It is recommended to track concurrency, wait times, failure rates, and notification frequency. These metrics can be integrated into general logging services and monitoring alerting systems to detect scheduling bottlenecks promptly.
The scheduling layer can be built using general-purpose message queues, container platforms, and object storage. Once the business logic is decoupled from the infrastructure, the state model and notification strategy can evolve independently without relying on a specific runtime environment.
The value of a proactive AI agent lies in reducing the user’s process management costs. Achieving this goal depends not on making the system “do more,” but on keeping the system’s state transparent, reporting timely, boundaries clear, and leaving the final decision-making authority to the user.
