Multi-Agent Deployment with Domestic LLMs: One-Click Setup and Automation Practices
This article explains how to move from single-terminal agents to a unified, team-oriented agent workbench powered by domestic large language models. It breaks down a five-layer architecture (interaction, orchestration, model gateway, tool integration, and skill definitions), walks through a repeatable one-click deployment flow with pre-checks, configuration generation, startup ordering, and cross-platform adaptation, and covers key practices for stable and secure model integration. It also defines safety boundaries for browser and desktop automation, standardizes document generation, and outlines a phased rollout path so teams can balance efficiency with security.
1. Problem Background: From Single-Terminal Agents to a Team-Based Workbench
In current intelligent coding and automation workflows, developers often invoke different types of agents from the terminal. The terminal is lightweight and direct, but it has three clear problems.
First, task context is scattered. A complex task usually spans planning, coding, retrieval, verification, and documentation. If each stage runs in a separate terminal, context is hard to share and task state is easily lost.
Second, tool capabilities are fragmented. To do real work, an agent cannot rely on text generation alone; it also needs to access web pages, read local files, operate desktop software, and generate office documents. Without a unified access layer, every new capability requires separate integration.
Third, switching models is costly. Different models may differ in reasoning style, context length, tool-calling conventions, and billing. If keys, endpoints, and parameters are scattered across scripts, replacing a model means repeated edits.
A more reasonable approach is not to keep stacking terminal windows, but to build a unified agent workbench: place multiple agents in a single web-based interface, connect domestic models through a unified model gateway, extend browser and desktop capabilities through a tool integration protocol, capture reusable workflows through skill definitions, and reduce setup cost through one-click deployment.
2. Overall Architecture: Five Layers Supporting Multi-Agent Collaboration
A practical domestic-model multi-agent platform can be abstracted into five layers.
2.1 Interaction Layer: A Web-Based Workbench
The interaction layer presents tasks, conversations, execution processes, and results. Compared with a pure terminal, a web-based workbench is better suited to team collaboration because it can present in one place:
- The multi-agent task list;
- The execution status of each agent;
- Tool invocation records;
- Previews of documents, spreadsheets, code, and other artifacts;
- Entry points for human confirmation and approval.
The workbench itself does not perform model inference; it serves as the entry point for task orchestration and visualization.
2.2 Agent Orchestration Layer: From Single-Point Execution to Role Separation
A complex task is not well suited to completion by a single agent in one pass. A more reliable approach is to split the task across roles:
- Planner agent: breaks down the goal and produces an execution plan;
- Executor agent: invokes tools to perform concrete actions;
- Reviewer agent: checks whether results meet requirements;
- Documentation agent: organizes the process and conclusions into a formal document;
- Operations agent: monitors task status and handles exceptions.
The orchestration layer needs to maintain a task state machine, for example “pending planning, running, pending confirmation, completed, failed-retry.” This prevents multiple agents from repeating work or overwriting each other.
2.3 Model Access Layer: A Unified Gateway That Hides Differences
The model access layer is the core of the platform. It unifies how different domestic models are invoked and exposes a consistent request and response structure.
A unified gateway typically handles:
- Centralized key management;
- Model routing and switching;
- Timeouts, retries, and rate limiting;
- Invocation logs and auditing;
- Input/output redaction;
- Fallback strategy on failure.
A sample configuration:
model_gateway:default_provider: domestic_model_afallback_provider: domestic_model_bapi_key_ref: secret://model_gateway_keytimeout_seconds: 30retry:max_attempts: 2backoff_seconds: 5
With this design, the business side does not need to care about underlying model differences. To switch models, you only change the gateway configuration rather than the code of every agent.
2.4 Tool Integration Layer: Giving Agents “Hands and Feet”
To complete real tasks, an agent must be able to call external tools. The tool integration layer can adopt a unified protocol specification and register different capabilities as callable tools.
Common tool types include:
- Browser tools: open pages, read page content, fill forms, click buttons;
- Desktop tools: launch local applications, read window information, perform controlled operations;
- Document tools: generate documents, convert formats, extract outlines, insert tables;
- File tools: read and write the working directory, archive artifacts, verify file integrity;
- Retrieval tools: search for material in a knowledge base;
- Notification tools: push task results to team channels.
Tools can be registered with a declarative structure:
{"name": "browser_open_page","description": "Open a given address and return a page summary","input_schema": {"url": "string","wait_until": "enum:load,idle,network"},"permission": "read_only"}
The key point is permission tiering. Browser tools can be divided into three levels: read-only, clickable, and form-submittable; desktop tools can be divided into read-only window, input-capable, and executable. The default should be least privilege, and high-risk actions must require human confirmation.
2.5 Skill Definition Layer: Turning Experience into Reusable Workflows
A skill definition is not a simple prompt; it is a structured operating manual. It tells the agent what steps to follow in a specific scenario, what inputs are required, how to verify results, and how to handle failures.
A complete skill definition typically includes:
- Applicable scenario;
- Prerequisites;
- Input parameters;
- Execution steps;
- Tool invocation order;
- Output format;
- Exception handling;
- Human confirmation points.
For example, a “generate project weekly report” skill can be defined as:
Skill name: Project weekly report generationInputs: project code directory, task records, time rangeSteps:1. Read task records and filter this week's items;2. Summarize code changes and document changes;3. Generate a summary organized by "progress, risks, next-week plan";4. Output a structured document;5. Wait for human confirmation, then archive.Validation:- Time range is correct;- No sensitive information;- Each risk item has a clear owner.
The value of skill definitions lies in reuse. Once captured, different agents can follow the same standard, reducing inconsistency.
3. One-Click Deployment: Collapsing a Complex Environment into a Repeatable Process
The goal of one-click deployment is not simply to run a few commands, but to combine environment checks, dependency installation, configuration generation, service startup, tool registration, and status verification into a repeatable process.
3.1 Pre-Deployment Checks
The deployment script should first identify the runtime environment, including operating system type, available runtimes, disk space, network connectivity, and required ports. For desktop automation capabilities, it also needs to check whether a graphical environment is available.
A pseudo-flow:
check_platform()check_runtime()check_network()check_ports()check_permissions()
If a check fails, it should return a clear message rather than continue and leave a half-built environment.
3.2 Configuration Generation
Configuration should be managed centrally to avoid hardcoding. It is recommended to split configuration into three categories:
- Model configuration: model endpoints, key references, timeouts, and retries;
- Tool configuration: permissions and paths for browser, desktop, and document tools;
- Task configuration: default agents, concurrency, and log level.
Example:
workbench:port: 8080log_level: infoagents:planner:model: defaultexecutor:model: defaulttools: [browser, file, document]reviewer:model: default
3.3 Startup Order
Service startup must preserve dependency order:
- Start the model gateway;
- Register tool capabilities;
- Load skill definitions;
- Start the agent orchestration service;
- Start the web workbench;
- Run health checks.
Health checks can include model connectivity, the number of registered tools, the number of loaded skills, and web workbench page availability.
3.4 Cross-Platform Adaptation
Different operating systems differ in paths, permissions, graphical interfaces, and process management. One-click deployment should abstract a unified adaptation layer:
- Unix-like environments use user-level service management;
- Desktop environments must handle window focus and permission prompts;
- Headless environments should disable desktop tools and keep only browser and file capabilities;
- All paths are normalized to a platform-independent format.
4. Key Practices for Integrating Domestic Models
When using domestic models, the focus is not “can it be called” but “can it be called stably, securely, and replaceably.”
4.1 Centralized Key Management
Keys should not be committed to code repositories or stored in plaintext in task configuration. The recommended approach is to inject them by reference:
api_key_ref: secret://model_gateway_key
The gateway resolves the key at runtime, and task logs record only the redacted identifier.
4.2 Unified Request Abstraction
Different models may differ in their support for system prompts, tool calling, and streaming output. The gateway should provide a unified abstraction:
request = {task_id,agent_role,messages,tools,skill_context,timeout}
The gateway then converts this into the specific model invocation format, so upper-layer agents do not need to be aware of the differences.
4.3 Observability
Every model invocation should record:
- Task ID;
- Agent role;
- Model identifier;
- Input summary;
- Output summary;
- Latency;
- Status code;
- Retry count.
Logs must not record full keys or sensitive raw text; hashing or redaction should be applied when necessary.
4.4 Fallback and Retry
When the primary model is unavailable, the system should be able to switch to a backup model. Fallback strategies can include:
- Switching to a model with the same capability;
- Reducing context length;
- Disabling non-essential tools;
- Moving to a human-handling queue.
5. Security Boundaries for Browser and Desktop Automation
Browser and desktop capabilities are the most valuable part of an agent, and also the highest risk.
5.1 Browser Automation
Browser automation should prefer read-only mode. When submitting forms, downloading files, or modifying data is required, a confirmation mechanism should be in place.
Recommended rules:
- Block access to unknown domains by default;
- Require secondary confirmation for logged-in operations;
- Impose type and size limits on downloaded files;
- Summarize page content before feeding it into the model context;
- Record the full operation trail.
5.2 Desktop Automation
Desktop automation is higher risk and should be off by default. Enabling it requires:
- Explicit authorization;
- A limited application scope;
- A ban on system-level sensitive operations;
- Pop-up confirmation at critical steps;
- Traceable operation logs.
5.3 Sandboxing and Isolation
Tool execution should take place in an isolated environment. File reads and writes are limited to the working directory, the browser uses a separate configuration directory, and desktop operations are limited to specified windows. This prevents accidental actions from affecting the main system.
6. Document Generation and Knowledge Capture
Agents must not only execute tasks but also produce deliverable results. Document generation capability should be standardized.
6.1 Document Structure Templates
Common templates include:
- Technical proposal;
- Project weekly report;
- Meeting minutes;
- Test report;
- Operating manual;
- Retrospective summary.
Templates should contain fixed sections, variable placeholders, and validation rules.
6.2 Content Generation Flow
The recommended flow is:
- Collect task data;
- Extract key facts;
- Generate a first draft based on the template;
- Run sensitive-information and format validation;
- Archive after human confirmation.
6.3 Version Management
Each generated document should retain a version number, generation time, input sources, and the confirmer. This makes tracing easier and facilitates later reuse.
7. Recommended Implementation Steps
Teams can proceed along the following path:
- First build the model gateway to achieve unified access and key management;
- Then integrate file and document tools to complete low-risk tasks;
- Add read-only browser capability to verify page reading and summarization;
- Introduce skill definitions to capture high-frequency workflows;
- Finally, carefully open desktop automation and write operations;
- Establish auditing, alerting, and human confirmation mechanisms.
8. Summary
Building a multi-agent team on domestic models is not about stacking more terminals, but about establishing a unified workbench, model gateway, tool integration protocol, and skill definition system. One-click deployment lets teams quickly obtain a reusable agent runtime environment, while permission tiering and auditing balance efficiency with security. In the end, agents evolve from “able to chat” into productivity tools that “can collaborate, can execute, and can deliver.”
