Native Multimodal and Agent Swarms: A Deep Dive into Upgrading AI Agents

    This article examines two complementary routes for upgrading AI agents: native multimodal architectures at the model layer and Agent Swarms at the system layer. It compares post-hoc multimodal adaptation with native unified architectures, then walks through native-resolution vision encoding, full weight sharing from images to video, and a decoupled encoder training process. It also explains how dependency-graph-based parallel orchestration reduces end-to-end latency, and why real gains depend on task structure. Finally, it covers engineering essentials such as inference serving, orchestration reliability, and observability, along with current limitations and outlook.

    1. Introduction: Why Multimodal Agents Need a Paradigm Shift

    Over the past couple of years, the center of gravity in large language model (LLM) capabilities has shifted from “answering questions” to “completing tasks.” Agents no longer just emit text. They must read webpage screenshots, parse tables and charts, operate desktop software, call external tools, and continuously verify results across multi-step loops. This means a model has to handle text, images, and video at the same time, and interact with real environments through tools.

    Yet the multimodal agents widely used in the industry today face three broad bottlenecks:

    1. Capability misalignment caused by modality “stitching.” Many models follow a route of first training a pure-text model and then bolting on a vision encoder. This route is simple to implement, but because vision and language lack sufficient interaction early in training, it tends to produce one of two problems: either visual descriptions are accurate but reasoning is weak, or language and reasoning capabilities regress after adaptation.
    2. Latency bottleneck from single-agent sequential execution. When one agent handles a task, it typically goes through an “observe–think–call tool–observe again” loop, and tool calls involve many network round trips. For complex tasks that can be decomposed, each step stacks up serially, so end-to-end latency grows roughly linearly with task size, making smooth interaction hard to guarantee.
    3. Disjointed image and video handling. If images and videos each use different encoding paths, the understanding accumulated during the image stage is hard to transfer to video, and video understanding requires extra investment in data and compute.

    To address these issues, the industry has gradually converged on two complementary technical routes:

    • Model layer: a native multimodal unified architecture centered on “full-process joint optimization of text and vision”;
    • System layer: a dynamic parallel orchestration framework exemplified by the Agent Swarm.

    The former strengthens a model’s understanding from the architecture up; the latter boosts task throughput and responsiveness at the execution layer. Openly released, high-quality model weights also let a broader set of developers reuse these two routes in practice. The sections below expand on each.

    2. Native Multimodal: From “Post-hoc Adaptation” to “Full-process Joint Optimization”

    2.1 Comparing the Two Paradigms

    Dimension Post-hoc multimodal model Native unified multimodal architecture
    Training order Train a pure-text model first, then attach a vision encoder for adaptation Text and vision are optimized jointly across pre-training and post-training stages
    Capability balance Language or vision capability may regress; modality conflict appears The two modalities reinforce each other, producing bidirectional enhancement
    Vision input handling Usually requires unified cropping or scaling to a fixed size Native-resolution input that preserves the original aspect ratio
    Image and video Often uses separate branches or an extra temporal module Modeled together with the same set of weights
    Typical advantage Simple to implement; can reuse existing models stage by stage Deep modality fusion; more natural transfer from images to video

    It is worth noting that post-hoc adaptation is not without value: it has a low engineering barrier and fully reuses mature text models. Its main limitation lies in the depth of modality coordination. The idea behind a native unified architecture is to let visual signals take part in language modeling throughout training: vision is not just “material to be described,” but also one of the inputs to the model’s reasoning chain.

    2.2 Overall Architecture and Data Flow

    A native multimodal architecture typically consists of three parts:

    • Vision encoder: responsible for extracting unified visual features from images and videos;
    • Projection layer: usually a lightweight structure such as a multi-layer perceptron (MLP) that maps visual features into the language model’s embedding space;
    • Language backbone: mainstream solutions mostly adopt a mixture-of-experts (MoE) architecture. In the sense that it decouples parameter count from compute, MoE lets model capacity scale up substantially while activating only some experts per token, thereby balancing capability and inference efficiency under the same compute budget.

    The data flow can be summarized as “visual feature extraction → cross-modal projection → unified modeling by the language backbone.” An image or video first passes through the vision encoder to produce a sequence of features; the projection layer aligns those features to the same vector space as text word embeddings; they are then concatenated with text tokens and fed into the language backbone. Visual and text tokens reference each other within the same attention mechanism, forming a unified semantic representation.

    Two frequently overlooked engineering details in this pipeline:

    1. Modality tags. The model needs to clearly distinguish the source of each segment. A common approach is to assign learnable dedicated embeddings to the projected visual features so that they are distinguishable from text tokens in vector space.
    2. Variable-length sequences. A single high-resolution image can produce hundreds or thousands of visual tokens, which directly affects memory usage and time-to-first-token latency during inference. As a result, the granularity and compression strategy for visual tokens is one of the core trade-offs in system design.

    2.3 Native-Resolution Vision Encoding: Seeing Clearly Without Preprocessing Limits

    Traditional vision preprocessing usually forces input to a fixed size or crops it to a uniform aspect ratio. This looks like it simplifies the pipeline, but it actually introduces two problems:

    • Details such as small objects, dense text, and fine-grained textures get compressed and lost;
    • Charts, code screenshots, and long documents with non-standard aspect ratios lose semantic completeness after cropping.

    Native-resolution encoding adopts a “patch packing” strategy: the image is first split into fixed-size patches, then flattened into a one-dimensional sequence fed to the encoder. Position encoding is generated from the 2D coordinates of each patch in the original image, so the model does not require uniform input sizes and can natively support arbitrary resolutions and aspect ratios.

    For developers, this means screenshots, scans, and wide tables can be fed in at close to their original clarity. But higher resolution is not always better: the larger the image, the more visual tokens it produces, and the compute and memory cost grow roughly quadratically (attention computation has quadratic complexity in sequence length). In practice, patch-wise encoding or adaptive sampling is often combined to strike a balance between clarity and cost.

    2.4 Full Weight Sharing Across Images and Text: Zero-Cost Transfer to Video

    Video is essentially “images plus time.” If a separate encoder or temporal branch is designed just for video, knowledge between images and video is hard to share, and training and maintenance costs multiply. Full weight sharing across images and text extends the “patch packing” idea from the spatial dimension to the temporal dimension:

    • Divide several consecutive frames (for example, in groups of 4 frames) into multiple patches, extracting the spatial patches of each frame;
    • Jointly and flatly pack these 2D patches along the temporal dimension into a single “spatiotemporal volume”;
    • Feed them to the same vision encoder to perform joint spatial–temporal modeling within a unified attention mechanism.

    The engineering value here: video training and inference need no extra modules—all weights are shared with images; capabilities learned during the image stage such as object recognition, text recognition, and layout understanding transfer naturally to video; and image-text and video data can be trained in a mixed way to further improve data efficiency. The cost is the token overhead along the temporal dimension, so actual deployment needs frame-sampling rates and keyframe-selection strategies to control sequence length.

    2.5 Decoupled Encoder Training: Stable and Efficient at Scale

    The engineering challenge in multimodal pre-training is “modality imbalance.” Visual data usually goes through heavy template-based descriptions or manual annotation, and has lower text density than web-scale corpora; if mixed directly with massive text data during training, the visual signal can easily be drowned out, resulting in “improving language capability while visual understanding stalls.” A decoupled encoder training process is designed precisely to address this: it separates the training of the vision encoder from the training of the language backbone in both time and objectives.

    A general engineering approach can be summarized in three stages:

    1. Alignment stage: Freeze the language backbone and train only the vision encoder and projection layer. At this point the model mainly learns to “map image features into the language space”—that is, to learn “describing what it sees.”
    2. Joint pre-training stage: Unfreeze or partially unfreeze the language backbone, and jointly train on mixed image-text, video, and pure-text data so that visual signals genuinely participate in building the reasoning chain.
    3. Post-training stage: Fine-tune and align for tasks such as instruction following, tool calling, and agent trajectories, so that the model’s visual understanding connects to its action decisions.

    This layered design makes it easy to monitor each stage’s loss curve separately, and to roll back quickly if a modality behaves abnormally. From a distributed-training perspective, the vision encoder and the language backbone can be configured separately in terms of parameter count, parallelism strategy, and communication pattern, which helps improve the overall efficiency and stability of large-scale training.

    3. Agent Swarm: From “Lone Combat” to “Dynamic Parallel Orchestration”

    3.1 Root Cause: Latency Accumulation in Serial Loops

    A single agent tackling a complex task usually follows a “plan–act–observe” loop. Take “research a technical approach and give implementation recommendations” as an example:

    1. Retrieve materials (one tool-call round trip);
    2. Read and extract key points (one inference);
    3. Keep retrieving to resolve doubts (another round trip);
    4. Summarize into a report (one inference).

    If the task can be further split into several mutually independent subtasks, serial execution makes total latency roughly equal to the sum of the subtask latencies. The core insight of parallel orchestration is that most complex tasks have a “partially parallelizable” structure. As long as dependencies between subtasks are correctly identified and scheduling is dynamic, the critical path can be shortened.

    Parallelism is not free: the more subtasks there are, the greater the overhead of scheduling, communication, and result aggregation, and the larger the failure surface. By Amdahl’s law, the overall speedup is bounded by the serial portion that cannot be parallelized. So the design of an orchestration framework focuses on accurately modeling dependencies while keeping coordination overhead within an acceptable range.

    3.2 Core Elements of an Orchestration Framework

    An Agent Swarm framework typically includes four stages:

    1. Task decomposition: Break the overall goal into multiple independently executable subgoals, while recording their inputs, outputs, and dependencies. If the decomposition is too coarse, it loses the point of parallelism; if too fine, it amplifies coordination cost.
    2. Dependency modeling: Use a directed acyclic graph (DAG) to describe the ordering between subtasks. A subtask enters the “ready queue” only when its inputs have been provided by upstream tasks.
    3. Dynamic scheduling: At runtime, allocate execution resources based on the task queue, each agent’s load, and tool availability. Ready tasks start in parallel immediately, without waiting for an entire batch to finish.
    4. Result aggregation and validation: An aggregation agent integrates the subtask results and triggers re-check or retry on conflicts. This improves task-completion quality and ensures result reliability.

    3.3 Example Code: Dependency-Graph-Based Parallel Orchestration

    The following code is for illustration only. It shows the basic scheduling loop of “submitting ready tasks in parallel and filling in dependencies as they complete”:

    1. from concurrent.futures import ThreadPoolExecutor, FIRST_COMPLETED, wait
    2. from dataclasses import dataclass, field
    3. @dataclass
    4. class SubTask:
    5. name: str
    6. deps: set = field(default_factory=set) # names of dependency sub-tasks
    7. class SwarmOrchestrator:
    8. def __init__(self, plan, executor_fn, max_workers=8):
    9. self.tasks = {t.name: t for t in plan} # task dependency graph
    10. self.executor = ThreadPoolExecutor(max_workers=max_workers)
    11. self.execute = executor_fn # invokes the agent or tool to execute
    12. self.results, self.running = {}, {}
    13. def _ready(self):
    14. return [n for n, t in self.tasks.items()
    15. if n not in self.results
    16. and n not in self.running
    17. and t.deps <= self.results.keys()]
    18. def run(self):
    19. pending = self._ready()
    20. while pending or self.running:
    21. for name in pending:
    22. self.running[name] = self.executor.submit(self.execute, name)
    23. pending = []
    24. if not self.running:
    25. break
    26. done, _ = wait(self.running.values(), return_when=FIRST_COMPLETED)
    27. for fut in done:
    28. name = next(n for n, f in self.running.items() if f is fut)
    29. self.results[name] = fut.result() # retry per policy on failure
    30. del self.running[name]
    31. pending = self._ready() # dynamically discover newly ready tasks
    32. return self.results

    Compared with traditional batch parallelism, the key difference in this design is “dynamically discovering ready tasks”: when one branch finishes early, its downstream tasks can start immediately, without waiting for the rest of the batch.

    3.4 Performance Gains and Failure Boundaries

    The effect of parallelization on latency can be approximated by:

    T ≈ T_serial + max(T_parallel) + T_overhead

    where:

    • T_serial is the non-parallelizable part, such as final aggregation;
    • max(T_parallel) is the slowest path among the parallel branches;
    • T_overhead is the overhead of scheduling, communication, and aggregation.

    This yields three takeaways:

    1. Gains depend on task structure. The benefit is largest when branches are balanced and dependencies are clear; when tasks are nearly fully serial, parallelism is almost useless and instead adds coordination cost.
    2. The bottleneck is often the “slowest branch.” A subtask that depends on an external interface with high network latency can drag down the whole batch. Here you should set timeouts and fallback strategies rather than waiting indefinitely.
    3. Overhead must be counted. Scheduling and aggregation themselves consume model calls and compute. Evaluation should be based on “end-to-end wall-clock time,” not just single-inference speed.

    As for how much parallelization can improve end-to-end latency, public sources indicate that a well-designed parallel orchestration framework can achieve latency reductions on the order of several times on complex tasks. But the specific figure depends on task type, decomposition quality, concurrency limits, and the throughput of the underlying inference service, and does not constitute a general promise. So it is advisable to run benchmark measurements on your own set of real tasks in your own business scenario, and then decide on the concurrency level and timeout strategy accordingly.

    4. Engineering Implementation

    4.1 Inference as a Service: Supporting High-Concurrency Vision Requests

    Multimodal inference has higher demands on memory and bandwidth. When deploying, it is worth paying attention to:

    • Use a container platform to host inference services and elastically scale replicas by load;
    • Use continuous batching to dynamically batch multiple requests together and improve GPU utilization;
    • Add a caching layer for high-frequency, repetitive image-text requests to reduce redundant computation;
    • Visual data is large, so object storage can centrally manage training and inference assets, while logging services and monitoring/alerting systems continuously track latency, memory, and error rates.

    Take Baidu AI Cloud as an example: general-purpose cloud capabilities such as its container platform, object storage, message queue, logging service, and monitoring/alerting can serve as the underlying foundation for building this kind of inference and orchestration service. These capabilities can be combined flexibly according to specific business scenarios.

    4.2 Reliability Design for Agent Orchestration

    Parallel execution means “many places can fail.” Recommended practices:

    • Timeouts and retries: Set an independent timeout for each subtask, and use exponential backoff for retries to avoid failure propagation;
    • Idempotent design: Make tool calls idempotent where possible to prevent retries from producing duplicate side effects (such as placing an order twice);
    • Result validation: Validate the structure of subtask outputs before aggregation (for example, JSON field completeness), and send non-conforming results back for rework;
    • Cost control: Limit the maximum concurrency and the total token budget to prevent the orchestration process from “sprawling out of control.”

    4.3 Observability and Evaluation

    Agent systems have long behavior chains and many states, so observability should cover three layers:

    • Model layer: input/output token counts, time-to-first-token, generation speed;
    • Orchestration layer: task-graph structure, per-node latency, number of retries;
    • Tool layer: call success rate, error-code distribution, average response time.

    For evaluation, it is recommended to cover multiple dimensions at once: code generation, visual understanding (chart and document parsing, fine-grained recognition), math and logic reasoning, agent task execution, and computer control. It is also important to keep watching for benchmark contamination: building a private evaluation set from your own business data gives a more realistic picture of actual performance.

    5. Limitations and Outlook

    Despite a clear route, native multimodal agents still have room to break through:

    1. Visual token efficiency. High resolution and long video bring sequence inflation, calling for more efficient token compression and hierarchical encoding schemes.
    2. Long-horizon consistency. Agents tend to drift from their goal after dozens of interactions, requiring more reliable memory mechanisms and mid-course validation.
    3. Intelligence of parallel coordination. Current orchestration mostly relies on preset rules or a single planning model; how to let the model autonomously judge “when to parallelize and when to serialize” remains an open question.
    4. Safety and controllability. Visual input can carry prompt-injection risks, and tool calls involve real side effects, requiring permission isolation and human-in-the-loop confirmation.

    6. Summary

    The upgrade of multimodal agents is essentially the coordination of two lines: on the model side, a native unified architecture connects “seeing clearly” with “thinking deeply”; on the system side, dynamic parallel orchestration connects “computing fast” with “executing reliably.” The former sets the upper bound of capability; the latter sets the lower bound of usability. For developers, understanding the design trade-offs and failure boundaries of these two routes is more valuable in the long run than focusing on a single model’s single metric. As high-quality open weights continue to be released, enterprises can quickly validate and continuously optimize in their own scenarios, gradually building their own general-purpose agent capabilities.