Practical Guide to Visual Agents and Parallel Multi-Agent Task Execution

    This article explains how to handle visual agent tasks—where judgments depend on rendered pixels rather than structured text—and how to orchestrate multiple agents in parallel for complex workflows. It covers a three-layer capability model (structure, style, visual), a concrete implementation of scroll-triggered pages using IntersectionObserver and reduced-motion preferences, the core patterns of multi-agent systems including task decomposition, concurrency control, consistency management, and capability description files. It also provides guidance on evaluating parallel performance and analyzing abnormal access logs without overinterpreting evidence.

    From Structured Content to Visual Content

    Large language models already handle many office tasks involving text, such as spreadsheets, word processors, and web page source code. These inputs have clear structures—fields, tags, and style rules—that can be parsed. In such tasks, both input and output can be described precisely with text, so the model only needs to understand syntax and rules to complete most of the work.

    The difficulty in visual tasks lies in the judgment criteria. Whether a page looks aesthetically pleasing, whether spacing is reasonable, whether animations interfere with reading—these judgments depend on rendered pixels. The model must map code to the rendered result: after modifying one style rule, which part of the page changes, and whether that change matches the design intent. This closed loop from code to pixels and back to code is what distinguishes a visual agent from pure text generation.

    This capability can be understood on three levels:

    • Structure layer: understanding tag hierarchy, component nesting, and data formats.
    • Style layer: understanding layout, typography, color schemes, and responsive rules.
    • Visual layer: judging the rendered output from screenshots and adjusting the code accordingly.

    Current models perform relatively reliably at the structure layer, while the visual layer remains the main challenge.

    Implementing a Scroll-Triggered Page

    Consider the task of converting a personal blog into a scroll-triggered style. Such requirements often lead to pages filled with showy effects. A technically sound implementation should address three aspects: content information hierarchy, performance cost of animations, and accessibility.

    Task Breakdown

    1. Parse the original page’s sections, headings, images, and navigation structure.
    2. Define the state transition for each content block when it enters the viewport.
    3. Check the first screen, long-page layout, and mobile view using rendered screenshots.
    4. Verify the degraded behavior when the user has enabled reduced-motion preferences.

    Using IntersectionObserver for Triggering

    Example code:

    1. observer = new IntersectionObserver(callback, { threshold: 0.15 })
    2. for each block:
    3. observer.observe(block)
    4. callback(entries):
    5. for each entry:
    6. if entry.isIntersecting:
    7. entry.target.classList.add("is-visible")
    8. observer.unobserve(entry.target) // trigger only once to reduce repeated work

    In terms of styling, the inactive state should only change opacity and transform (e.g., translateY), with durations between 200 and 400 milliseconds. Avoid running complex shadow or blur animations on many elements simultaneously, as this can cause dropped frames on low-performance devices.

    Respecting User Motion Preferences

    Most operating systems offer a “reduce motion” option. The frontend should read this preference and disable translate and scale animations when enabled, retaining only fade-ins or direct content display.

    Basic Patterns for Parallel Multi-Agent Systems

    A multi-agent system breaks a large task into multiple execution units that process concurrently, with a coordinator aggregating the results. Common roles include:

    • Planner: decomposes the overall goal into subtasks and specifies dependencies.
    • Executors: each handles one subtask, such as layout analysis, copy checking, or style generation.
    • Reviewer: checks consistency across outputs and requests rework when conflicts are found.
    • Aggregator: merges results and produces the final deliverable.

    Concurrency Control

    Higher concurrency is not always better. Model services usually have rate limits, and file I/O can contend for resources. In practice, three measures are common:

    • Set a concurrency limit to avoid excessive simultaneous requests.
    • Define a timeout and retry count for each subtask.
    • Log the input, output, and status of each subtask to identify failures.

    Example code:

    1. semaphore = createSemaphore(limit=4)
    2. async function executeSubtask(task):
    3. await semaphore.acquire()
    4. for attempt in 1..2:
    5. result = await callAgent(task, timeout=60s)
    6. if result.success:
    7. semaphore.release()
    8. return result
    9. log("Subtask failed", task)
    10. semaphore.release()
    11. return failureMarker
    12. results = await Promise.all(taskList.map(executeSubtask))
    13. finalOutput = aggregate(results)

    Result Consistency

    Parallel execution can cause conflicts. Two executors might modify the same style file simultaneously. A typical solution is to partition write permissions by file or module, so each executor only modifies its own file. Shared variables should be placed in a unified configuration that the aggregator writes once at the end.

    The Role of Capability Description Files

    Writing a domain-specific process as a description file is a common way to let agents reuse experience. Such files usually contain four parts:

    1. Trigger conditions: which requests should invoke the workflow.
    2. Operational steps: actions in order, with checkpoints.
    3. Constraint rules: for example, do not alter existing links, do not delete historical content.
    4. Examples: paired input and expected output.

    Each step should be verifiable. “The generated page has no horizontal scrollbar at three screen widths” is easier to check than “the page should look beautiful.” The more specific the instructions, the lower the chance the agent will drift from the goal in long tasks.

    Evaluating Parallel Capability and Task Completeness

    Judging a system’s concurrency ability should not rely on a single demonstration. Instead, design a fixed test set and run the same task at different concurrency levels, recording the following metrics:

    • Completion rate: proportion of outputs that meet all acceptance criteria.
    • End-to-end latency: time from task submission to usable output.
    • Manual correction count: number of changes a human user must make.
    • Resource consumption: number of requests and cost estimation.

    Because results vary between runs, repeat each configuration several times and report the average and the range.

    Identifying Automated Access from Traffic Logs

    Personal website statistics sometimes show “multiple visitors at the same instant.” In the absence of new content, the probability of real readers visiting simultaneously is very low. This phenomenon usually has several sources: web crawlers, monitoring probes, link preview services, proxy services, or automation scripts.

    Concluding that “several agents are accessing in parallel” purely based on visit counts is not well supported by evidence. A more reliable approach is to look for multi-dimensional evidence in the logs, such as:

    • Consistent user-agent patterns or unusual browser fingerprints.
    • Unusually short session intervals or repeated access to the same resource.
    • Requests originating from IP ranges associated with cloud providers or data centers.
    • Absence of typical human behavior (e.g., scrolling, hover events, or time-on-page).

    Aggregate these signals before making any determination about automated or parallel access.