AI Agent Architectures Explained: Why the Same Model Behaves Differently

    The same large language model can behave differently depending on the system around it. This article examines four complementary agent architecture patterns—lightweight execution, shared services, skills and memory, and multichannel integration—and explains their trade-offs in state management, tool safety, experience reuse, and reliability. It also outlines how to choose and evaluate an architecture based on business constraints rather than feature count.

    1. Agent Performance Depends on More Than the Model

    Using the same large language model in different agent systems often produces different behavior. One system may work well for short tasks, another may support access from multiple clients, a third may reuse past experience, and a fourth may handle messages from several channels.

    These differences do not necessarily reflect changes to the model. They reflect differences in the engineering systems built around it.

    An agent that can execute tasks typically includes five layers:

    • Model layer: Interprets goals, generates plans, and decides what to do next.
    • Context layer: Organizes the current task, conversation history, tool results, and relevant knowledge.
    • Execution layer: Calls tools, processes their responses, and advances the task.
    • State layer: Stores task progress, execution records, and information needed for recovery.
    • Governance layer: Enforces permissions, budgets, auditing, and human approval.

    A simplified flow illustrates how these layers interact:

    1. User goal
    2. ↓
    3. Identity and permission checks
    4. ↓
    5. Context assembly → Model decision → Action validation
    6. ↑ ↓
    7. └── Tool execution results
    8. ↓
    9. State persistence and feedback

    The arrows do not imply an unlimited execution loop. Step limits, time budgets, tool costs, and risk levels should all provide explicit stopping conditions.

    Choosing an agent architecture therefore means deciding how tasks progress, who maintains state, how experience is retained, and how the system connects to its environment.

    2. Four Design Priorities, Not Four Mutually Exclusive Categories

    Common agent designs can be grouped into four patterns:

    1. Lightweight execution
    2. Shared services
    3. Skills and memory
    4. Multichannel integration

    These are not mutually exclusive product categories. A system can use a lightweight execution core, expose it as a shared service, and add reusable skills and multiple message channels.

    Each pattern emphasizes a different engineering problem. Ranking them by which is “most advanced” is less useful than understanding what each solves and what costs it introduces.

    3. Lightweight Execution: A Minimal, Bounded Task Loop

    Core approach

    A lightweight execution architecture centers on a clear, bounded loop: receive a task, assemble context, let the model choose an action, execute a tool, and then continue or stop based on the result.

    1. Receive task
    2. ↓
    3. Assemble context
    4. ↓
    5. Decide next action
    6. ├─ Answer directly → Return result
    7. ├─ Call a tool → Check result → Decide again
    8. └─ Cannot proceed → Request information or hand off to a human

    With fewer components, developers can more easily trace why a tool was called or why a task did not finish. A simple architecture also helps teams validate business assumptions quickly while requirements are still evolving.

    Suitable use cases

    This pattern suits tasks with clear goals, short execution times, and a limited tool set, such as looking up information, organizing documents, reading business records, or generating operational recommendations.

    The main requirement is often reliable completion of a single task, not sophisticated planning. Introducing layered scheduling, complex memory, or cross-node coordination too early can create more debugging work than practical value.

    Essential controls

    Lightweight does not mean uncontrolled. Even a minimal implementation should include:

    • Maximum execution steps and an overall timeout
    • Tool input validation
    • A per-task cost budget
    • Failure classification and bounded retries
    • Human confirmation for high-risk actions
    • Final results and execution records

    Avoid an endless loop in which every failure triggers another model attempt. Insufficient permissions, missing inputs, and temporary network errors are different problems and require different responses.

    4. Shared Services: Separate Execution from Clients

    Core approach

    When multiple clients need access to the same agent capabilities, execution logic can run on the server. Clients submit tasks, check status, and display results.

    1. Web client ──────┐
    2. Mobile client ───┼→ Access layer → Task service → Workers → Tools
    3. Business client ┘ ↓
    4. State storage and auditing

    This centralizes model configuration, tool registration, permission policies, and version updates instead of requiring each client to maintain its own execution logic.

    Centralization does not mean every request must run sequentially in one process. A task service can schedule multiple workers according to load and isolation requirements.

    State ownership is the key boundary

    The service capability is shared; user context is not.

    The system must distinguish between users, sessions, tasks, and tenants. Two users calling the same tool should not automatically share conversation history, credentials, or task results.

    For long-running work, the client connection should also be separate from the task lifecycle. After a client disconnects, a task may continue, pause, or be canceled—but that behavior should follow an explicit policy rather than depend on an incidental network event.

    Concurrency and recovery

    Shared services must handle duplicate submissions, concurrent updates, and interrupted tasks.

    For example, a user who receives no feedback may submit the same request again, potentially causing the same write operation to execute twice. Idempotency should therefore be designed around the business operation:

    • Can an identical request reuse an existing result?
    • Which steps are safe to retry?
    • Which actions require checking their execution status before proceeding?

    Long-running tasks should persist key checkpoints, including the goal, completed steps, summaries of tool results, and pending actions.

    Recovery should not simply replay the entire history. Some external operations may already have produced irreversible effects.

    5. Skills and Memory: Turn Experience into Governed Assets

    Memory is not the same as retaining every conversation

    A system that “remembers” may use at least three distinct mechanisms:

    • Conversation context: Information needed to understand the current exchange.
    • Long-term memory: Authorized preferences, facts, or background information that remains valid.
    • Skill assets: Reusable task procedures, decision rules, and validation methods.

    These mechanisms serve different purposes and have different lifecycles. Putting all historical content into the model input increases cost and can allow outdated information to distort current decisions.

    What a reusable skill should contain

    A skill should be more than a copy of a successful answer. It needs a defined structure:

    1. Goal: What type of problem the skill solves
    2. Applicability: When the skill can be used
    3. Input requirements: Information required before execution
    4. Procedure: How to advance the task
    5. Tool scope: Capabilities the skill is allowed to use
    6. Validation rules: How to determine whether the result is correct
    7. Failure handling: When to stop or request human intervention
    8. Version information: When it was updated and who reviewed it

    For example, generating a recurring business summary can become a reusable workflow. The specific data, personal information, and temporary credentials used in one execution should not become part of the skill.

    Storing experience is not autonomous model learning

    Writing execution experience to external memory typically changes the context available for retrieval in later tasks. It does not, by itself, update model parameters.

    Technical descriptions should distinguish external memory, prompt optimization, and model training rather than treating them as the same mechanism.

    Skills also require validation before production use. A single successful run may depend on unusual inputs or favorable conditions and does not establish general reliability.

    A more dependable process is to generate a candidate skill, remove sensitive information, test it against representative cases, and use rule-based or human review to decide whether to publish it. Published skills should support version tracking, deactivation, and rollback.

    6. Multichannel Integration: Unify Business Meaning, Not Just Messages

    Core approach

    Multichannel integration focuses on routing messages from different entry points into a common task system. These entry points may include web interfaces, mobile apps, enterprise messaging systems, or business event notifications.

    1. Message channels
    2. ↓
    3. Channel adaptation and event normalization
    4. ↓
    5. Identity mapping, deduplication, and permission checks
    6. ↓
    7. Session and task routing
    8. ↓
    9. Agent execution
    10. ↓
    11. Responses adapted to channel capabilities

    The number of connected channels is not a measure of maturity. Channels differ in message length, attachment support, interaction options, and response deadlines. The harder problem is preserving consistent business meaning across them.

    Identity mapping requires trusted evidence

    The same person may use different accounts across channels. Identity mapping should rely on trusted authentication or an explicit account-linking process, not matching display names.

    The system must also define whether context can be used across channels. Sensitive information submitted through one channel should not appear in another without authorization.

    Handle duplicate, out-of-order, and delayed messages

    Message delivery may be duplicated or delayed. Systems should track message identifiers and processing status and, where necessary, enforce ordering within a conversation.

    Long-running tasks should use asynchronous feedback: acknowledge receipt, report progress, and then deliver the result. Otherwise, a channel timeout may be mistaken for task failure and trigger duplicate execution.

    Responses must also fit the channel. If it cannot display the full result, return the key findings and a secure way to retrieve the complete output. If it does not support interactive buttons, use an explicit text-based confirmation process.

    7. Every Architecture Needs Safe Tool Execution Boundaries

    A tool call proposed by the model is a candidate action, not an automatically authorized operation.

    A safer execution sequence is:

    1. Generate candidate action
    2. ↓
    3. Validate input format
    4. ↓
    5. Check identity and resource permissions
    6. ↓
    7. Assess action risk
    8. ↓
    9. Request human confirmation when required
    10. ↓
    11. Execute and record the result

    Tool access should follow least privilege. Where possible, separate capabilities for reading, writing, deleting, and sending information externally. High-risk operations require stronger confirmation controls.

    External documents, web pages, and tool responses may also contain instructions intended to redirect the agent. Treat that content as data to process, not as instructions that can change permission policies.

    Authorization must be enforced by the execution layer. A prompt telling the model to “be careful” is not an adequate security boundary.

    8. Choose an Architecture Based on Constraints, Not Feature Count

    Primary business constraint Design priority Issues requiring particular attention
    Short tasks, few tools, rapid iteration Lightweight execution Stopping conditions and tool validation
    Multiple clients accessing the same capabilities Shared services State isolation, concurrency, and recovery
    Repeated tasks of the same type Skills and memory Experience quality, expiration, and rollback
    Messages arriving from varied sources Multichannel integration Identity mapping, duplicate events, and response adaptation

    Projects can combine these capabilities incrementally.

    Start with lightweight execution to verify that a task can be completed reliably. Move execution into a shared service when multiple clients need access. Introduce reviewed skill assets once recurring tasks justify them. Add channel adapters as actual business entry points require them.

    Before adding a module, answer three questions:

    1. What observed problem does it solve?
    2. What operating costs does it introduce?
    3. How will its effectiveness be verified?

    9. Evaluate the Complete System, Not Just Its Answers

    Architecture should be evaluated with representative task sets, not a handful of demonstrations.

    At a minimum, measure:

    • Task completion rate: Whether results meet business acceptance criteria.
    • Result correctness: Whether key facts, calculations, and execution outcomes are correct.
    • Tool-call effectiveness: Whether calls are useful and whether actions are duplicated.
    • Latency and cost: Including model calls, tool execution, retrieval, and queueing.
    • Recovery capability: Whether tasks can resume safely after timeouts or interruptions.
    • Permission violations: Whether the system attempts unauthorized access or actions.
    • Memory reliability: Whether it uses outdated, incorrect, or unauthorized information.

    Tests should cover both normal operation and missing information, tool failures, duplicate messages, permission denials, and human handoffs.

    For complex tasks, distinguish model decision errors from engineering execution errors. Otherwise, prompt adjustments may conceal defects in state management.

    10. Conclusion: Reliable Architecture Makes Capabilities Controllable

    Lightweight execution keeps the task loop simple. Shared services centralize execution and state management. Skills and memory enable experience reuse. Multichannel integration manages the complexity of external interactions.

    These are complementary design dimensions, not four competing paths.

    The strongest starting point is not a large feature set. It is a clear definition of task boundaries, tool permissions, acceptance criteria, and failure handling.

    First make a narrowly scoped task reliable, explainable, and safely recoverable. Adding memory, shared services, or more channels can then increase system value rather than amplify uncontrolled complexity.