AI Workflow One-Click Deployment: Multi-Agent Collaboration Powered by Domestic LLMs

    This article explains how to turn scattered model, tool, and execution capabilities into a deployable, orchestrated, and governable AI workflow. It presents a four-layer architecture, a practical approach to one-click installation, adaptation notes for using domestic LLMs as the reasoning core, methods for generating real documents, controlled browser and desktop automation, a lead-and-member multi-agent pattern, and security governance for cross-device session continuity. Readers will find a deployment checklist for building an AI workflow foundation in their own environment where models are replaceable, tools are extensible, and execution is auditable.

    1. Background: From “Chat” to an Executable Workflow

    Over the past two years, the capability boundaries of large language models have been pushed forward rapidly. However, developers and enterprise users quickly ran into a practical problem: a model is only a “reasoning core.” What actually determines productivity is whether it can be reliably connected to toolchains, access real data, and execute actions in a controlled environment.

    The scenario in the original requirements—driving an AI coding tool with a domestic model in a web page, generating real spreadsheet and document files, having agents open a browser to search for information, launching desktop applications to complete tasks, splitting work in parallel with a “lead plus members” structure, and resuming a local session from a phone or laptop while away—essentially points to the same technical question: how to converge scattered model capabilities, tool capabilities, and execution environments into a workflow that can be deployed, orchestrated, and governed.

    This article does not focus on any specific product. Instead, it abstracts these requirements into a general architecture problem and offers a practical approach that can be deployed with one click on mainstream desktop operating systems.

    2. Overall Architecture: Four Decoupled Layers

    A robust AI workflow platform should be designed with four decoupled layers:

    1. Model access layer: A unified wrapper around inference interfaces that hides differences between models in context length, function-calling formats, and streaming output protocols.
    2. Capability orchestration layer: Built around a “tool registry + task graph,” it registers file read/write, terminal execution, browser operations, and desktop interaction as atomic capabilities that models can invoke.
    3. Execution sandbox layer: Provides isolated environments, permission allowlists, and audit logs for high-risk actions.
    4. Interaction and access layer: A local browser interface as the primary entry point, supplemented by a remote access channel to enable cross-device session continuity.

    The key benefit of this layering is that swapping models requires no changes to orchestration logic, adding tools requires no changes to the interface, and adjusting security policies requires no changes to business code.

    3. How to Implement One-Click Deployment

    “One-click” does not mean stuffing every component into a single process. It means converging environment differences into the installation script. The recommended approach:

    • Dependency self-check: On startup, the script checks runtime versions, port usage, disk space, and GPU/memory resources, and gives clear remediation hints for anything missing.
    • Layered configuration: Split configuration into three layers—system (paths, ports), model (inference endpoint and authentication), and policy (permissions and auditing)—with environment variable overrides.
    • Idempotent installation: Repeated runs produce no side effects, and failures can be rolled back.
    • Health check: After deployment, automatically issue a minimal inference request and a tool call to confirm the pipeline works.

    Example configuration structure (pseudocode, only to express the layering idea):

    1. system:
    2. bind: "127.0.0.1"
    3. port: 8080
    4. workspace: "~/ai-workspace"
    5. model:
    6. provider: "local-gateway"
    7. base_url: "http://127.0.0.1:11434/v1"
    8. api_key_env: "MODEL_KEY"
    9. context_window: 32768
    10. policy:
    11. allow_shell: true
    12. allow_browser: true
    13. allow_desktop: false
    14. audit_log: "~/ai-workspace/audit.log"

    4. Adaptation Notes for Domestic Models as the Reasoning Core

    When using domestic models to drive an agent team, three types of differences need to be handled carefully:

    First, function calling and structured output. Models differ in field naming for tool calls, support for parallel calls, and error return formats. It is recommended to implement a “call adapter” in the model access layer that compiles the internal unified tool description into a schema the target model understands, and normalizes and validates returned results. If validation fails, trigger one retry with the error information included.

    Second, balancing long context and cost. Multi-agent collaboration rapidly amplifies context consumption. In practice, manage system prompts, tool lists, and history summaries in layers, apply rolling summaries to earlier conversation, and keep only decision-level conclusions.

    Third, Chinese semantics and localization. Domestic models generally perform well on Chinese instruction understanding, local document formats, and office contexts, but output structure still needs to be constrained with explicit prompt templates—for example, requiring a plan first, then tool calls, and finally a result summary.

    5. Real Document Generation: From Text to Binary Files

    Producing usable spreadsheets, documents, and presentation files from a single sentence is a typical high-value scenario. The implementation path is to abstract document generation into a combination of a template engine and data binding:

    • Spreadsheets: The model outputs structured data (row/column definitions, cell types, formulas), and the rendering layer writes it into a standard spreadsheet format, avoiding having the model assemble binary content directly.
    • Documents: Use a three-stage “outline—sections—body” generation flow. Confirm the table of contents structure first, then fill in each section, which significantly reduces rework.
    • Presentations: Describe each slide as a JSON object with a title, bullet points, and image placeholders, then apply a unified theme style after rendering.

    The key engineering constraint is that all artifacts are first written to a temporary directory in the workspace, then atomically moved to the target location after validation (can be opened, no blank pages, formulas compute), with real-time preview and diff comparison provided in the interface.

    6. Browser and Desktop Automation: Controlled Execution

    To let agents “open a web page to look up information” and “open software on the desktop to get work done,” the action space must be converged into allowlisted atomic operations: page navigation, element location and clicking, form filling, and content extraction; window enumeration, application launch, and keyboard/mouse events. Every action should carry a timeout, a retry limit, and precondition checks.

    A three-tier strategy is recommended for risk control: read-only actions are freely allowed; write actions require a second confirmation; irreversible actions (deletion, sending, payment) are disabled by default and allowed only when explicitly enabled and logged. Also generate a replayable step log for each session to make troubleshooting and accountability easier.

    7. Multi-Agent Collaboration: The Lead-and-Member Orchestration Pattern

    The essence of parallel division of labor is task decomposition and result aggregation. A “one lead, multiple members” structure is recommended: the lead agent handles requirement clarification, task breakdown, dependency ordering, and conflict resolution; member agents execute in parallel across dimensions such as files, testing, documentation, and retrieval; the lead agent then collects the artifacts and performs consistency merging.

    Three rules must be clear in orchestration: task granularity is based on “independently verifiable”; the shared workspace uses file locks or branch-style directories to avoid write conflicts; each subtask must return a structured conclusion (artifact path, verification method, remaining issues), otherwise it is considered failed and reassigned.

    8. Cross-Device Continuity and Security Governance

    For remotely resuming a local session, it is recommended to expose a controlled entry point through intranet penetration or a self-hosted reverse proxy, enforce authentication, restrict sources, enable transport encryption, and persist session state so that mobile devices can read progress and issue new instructions.

    Governance should cover at least: full operation auditing, sensitive information masking, keys injected via environment variables or a key management service, restricted model egress scope, and quota management for artifact directories. In enterprise scenarios, artifacts can be archived with object storage, and anomaly tracking can be implemented with logging services and monitoring alerts.

    9. Implementation Checklist

    1. Define three high-frequency scenarios (coding assistance, document production, information retrieval) and get one end-to-end pipeline working first.
    2. Build a tool registry and a unified invocation protocol, and keep tool descriptions versioned.
    3. Disable desktop and irreversible actions by default, and enable them gradually per scenario.
    4. Set task acceptance criteria and failure retry strategies for multi-agent setups.
    5. Deploy monitoring and auditing, and periodically review permission allowlists.

    Following this path, a team can build an AI workflow foundation in its own environment where models are replaceable, tools are extensible, and execution is auditable—upgrading a “conversational assistant” into an “execution body that delivers results.”