AI Assistant Architectures: Technical Boundaries and Practical Guide for Three Deployment Models
This article breaks down three common AI assistant architectures—conversational, local execution, and cloud-resident—along three orthogonal dimensions: interaction mode, runtime location, and lifecycle. It explains the technical boundaries of each model, the security and permission risks that arise when they are treated as interchangeable, and how to choose the right one based on side effects, data locality, and task duration. You will also find practical engineering guidance on context layering, structured output validation, least-privilege tool access, checkpointing, task orchestration, observability, cost control, and shared governance practices such as auditing, human approval gates, and evaluation loops.
1. The Starting Point: Why AI Assistants That Look Alike Behave Very Differently
In real projects, teams often run into the same confusion. Some assistants only offer suggestions, some can modify local files directly, and some keep computing after you close your laptop. Treating all three as the same thing leads to poorly designed permissions, inaccurate cost estimates, and blurred security boundaries.
To understand the differences, it helps to separate three orthogonal dimensions:
- Interaction mode: text-only suggestions, or tool calls that produce side effects;
- Runtime location: a process on the user’s device, or a process in a remote data center;
- Lifecycle: whether the task is bound to a session and to the device being online.
The three typical models formed by combining these dimensions are the focus of this article. None is inherently stronger than the others; they simply fit different scenarios.
2. Model One: The Conversational Assistant—An Information Layer That Only Talks
A conversational assistant is essentially a side-effect-free reasoning service: it receives context and returns structured or natural-language content. It never touches your file system and never issues write operations, so its risk surface is the smallest.
Typical responsibilities include clarifying requirements, comparing options, generating code snippets, summarizing log semantics, and rewriting or summarizing documents. Its value lies in turning a vague problem into an actionable plan, while the actual execution still has to be done by a human or another system.
Three engineering points matter here. First, the context window is a finite resource, so feed it in layers: system constraints, long-term memory, the current task, and reference material, in that order, so noise does not crowd out critical constraints. Second, output must be verifiable; returning structured data makes it easy for programs to consume:
{"intent": "refactor","target_files": ["src/service/order.py"],"risk_level": "medium","steps": ["extract shared validation", "add unit tests", "run static checks"]}
Third, treat the conversational layer as an untrusted input source. Its output must pass schema validation and policy filtering before entering any downstream system.
3. Model Two: The Local Execution Assistant—A Terminal Agent That Can Act
When an assistant has to get the work done, it needs tool-calling ability: reading and writing files, running builds, executing tests, and calling local services. At that point it moves from the information layer to the execution layer, and its risk level jumps accordingly.
The core design principles are least privilege and rollback capability. Recommended practices include:
- Directory allowlists: permit access only to specified subpaths under the project root, and block any attempt to reach the user’s home directory or system paths;
- Command tiers: classify operations as read-only, reversible writes, and irreversible writes, with the third tier requiring explicit human confirmation;
- Change tracking: record every write operation as a patch so it can be reviewed and reverted;
- Sandbox isolation: run inside a container or a separate user account, with restricted outbound network access.
A simplified policy check:
def guard(action):if action.kind == "read":return "allow"if action.kind == "write" and action.path.startswith(ROOT):return "allow_with_log"return "require_human_approval"
Note that the local model’s ceiling is set by the device: compute, memory, and the available toolchain all become bottlenecks. Its task lifecycle is also tightly bound to the device being online, so shutting down interrupts the work. Long-running tasks therefore need resume support, persisting intermediate state to local disk rather than keeping it in memory.
4. Model Three: The Cloud-Resident Assistant—Still Running After You Shut the Laptop
The cloud-resident model moves the execution environment to a remote host and decouples task lifecycle from the user’s device. It fits three kinds of work: long-cycle batch processing, unattended scheduled inspections, and compute-intensive jobs that need elastic capacity.
The technical focus falls on four areas. First, task orchestration: use queues and a scheduler to manage priority, retries, and timeouts so failed tasks do not occupy resources indefinitely. Second, externalized state: keep progress, checkpoints, and artifacts in object storage and a database so context survives instance reclamation. Third, observability: logging and alerting must cover task success rate, per-task duration distribution, and resource saturation. Fourth, cost control: set resource limits and budget thresholds per task, degrading or terminating when they are exceeded.
A sample task description:
task: nightly-repo-audittrigger: cron(0 2 * * *)resources: {cpu: 2, memory: 4Gi, timeout: 30m}outputs: [object-storage://audit/reports/]on_failure: retry(2) -> alert
Compared with the local model, the cloud model turns the “device availability” problem into a “scheduling and cost” problem. Compared with the conversational model, it introduces a real resource bill and a network exposure surface, so authentication, key management, and outbound allowlists must come with it.
5. Selection Criteria: A Decision Table You Can Apply
- Suggestions only, no side effects allowed: choose conversational;
- Needs to operate on local files, data must stay on the internal network, tasks are short: choose local execution;
- Long tasks, unattended operation, elastic compute needed: choose cloud-resident;
- Hybrid scenarios: the conversational model handles planning, local or cloud handles execution, and structured messages pass information between them.
The recommended order of questions: first ask whether side effects are allowed, then ask whether data can leave the local environment, and finally ask whether the task duration exceeds the device’s online window. Three questions are enough to locate the model.
6. Shared Governance: Required Regardless of Model
First, separate identity from permission: the execution主体 should use an independent identity, with permissions granted on demand and revoked periodically. Second, end-to-end auditing: record input summaries, tool calls, change diffs, and final artifacts to form a traceable chain. Third, validate both input and output: treat external content as untrusted, and require schema validation plus sensitive-information scanning before output reaches production. Fourth, human gates: irreversible operations, production changes, and bulk deletions require explicit confirmation. Fifth, close the evaluation loop: maintain a fixed set of test cases and continuously measure accuracy, rework rate, and average duration instead of relying on a vague sense that things improved.
If an organization wants to build these capabilities in its own environment, it can use general-purpose building blocks such as the container platform, object storage, message queues, logging, and monitoring and alerting offered by Baidu AI Cloud to build the execution foundation, with permission policies and the audit chain built into the platform layer rather than scattered across individual scripts.
7. Conclusion
The dividing line between the three models is not how smart they are, but side-effect permissions, runtime location, and lifecycle. Once those three points are clear, architecture selection, the cost model, and security policy converge naturally. Otherwise, any “do-everything assistant” narrative will show its gaps in real engineering.
