How LLM Applications Are Built: Workflows, Agents, MCP & Skills
This article explains the architecture of large language model applications, distinguishing between simple chat, fixed workflows, autonomous agents, the Model Context Protocol (MCP) for tool integration, and reusable skills, providing a decision framework for choosing the right approach based on task complexity and stability requirements.
Most people first encounter large models through chat: ask a question, get a text answer. But real work often requires more than text — data retrieval, file operations, business logic, and multi-step processes. This article breaks down how a large model becomes a usable application by connecting models to data, tools, and structured execution.
01 Introduction
A model can understand and generate content, but it does not natively connect to company databases or have file permissions. Bridging that gap — organizing data, tools, and processes around the model — is the core of LLM application development.
02 Anatomy of an LLM Application
A complete application consists of five components:
Large Model — understands requirements, generates content, participates in deciding next actions.
Prompts & Context — tell the model the current task, available information, and execution constraints.
Data & Knowledge — provide business data, documents, and information the model wasn't trained on.
Tools — query databases, search, run code, generate files. A tool can be a function, a script, or an API.
Application Program — orchestrates execution, manages permissions, presents results.
The model does not directly control external systems. The application tells the model which tools are available; the model chooses a tool and parameters; the application executes and returns the result. The model handles understanding, generation, and judgment; the surrounding program connects data, tools, and business flow.
03 Direct Chat: Model as Content Generator
The simplest application is a chat loop: User Input → Large Model → Text Response Q&A, translation, summarization, and content creation fit this pattern. Users state needs without learning menus. However, without data, tools, or permissions, the model cannot complete a business task end-to-end.
04 Workflow: Fixed Process with Model Steps
When steps are predictable, developers can predefine a workflow (orchestration) and let the model handle only language-heavy stages. Example: generating a sales report.
Read sales data
↓
Calculate fixed metrics
↓
Call model to summarize anomalies & trends
↓
Write results into report template
↓
Generate Word or PPT fileFile selection, metric rules, and template are fixed. The model only interprets data and drafts language. Workflows are easy to test and suit stable tasks like daily reports, contract extraction, ticket classification. Limitation: any exception (missing field, unexpected rule) must be pre-handled with branches. Key distinction: in a workflow the next step is predetermined; in an agent the model decides the next step based on intermediate results.
05 Agent: Model Decides the Next Step
When the path cannot be fully predetermined, an agent lets the model choose actions based on current state. The application provides tool descriptions, parameter schemas, and confirmation rules. Execution loop:
Understand task
↓
Select tool & parameters
↓
Application executes tool
↓
Return result to model
↓
Continue judging or produce final answerIn the sales example, an agent might read monthly data, notice an anomaly in East China, decide to query last month's records, then check return data, and finally generate the report. The path adapts to intermediate findings.
Higher autonomy is not always better. Models err; tools fail. Sensitive actions (delete data, send messages, modify orders) need safeguards. A production agent requires:
Explicitly defined tools and parameter bounds.
Maximum step limits and stop conditions.
Full logging of every action and result.
Human confirmation for sensitive operations.
Graceful handoff to user on failure or insufficient information.
Fixed, error-intolerant steps stay in workflows; dynamic judgment goes to agents.
06 MCP: Unified Tool & Data Access
Agents need to know tool names, parameters, and return schemas. If every AI application uses a different integration format, each tool must be re-adapted. The Model Context Protocol (MCP) standardizes how AI applications connect to external tools and data.
MCP uses a Host–Client–Server architecture:
Host — the AI application hosting the model and interaction loop.
Client — connects to a specific MCP Server.
Server — exposes tools, resources, and prompt templates per the protocol.
Example: a Sales MCP Server exposes "query monthly sales" and "read return data". Any MCP-compatible AI application can discover and call these tools via a uniform structure.
Agent in AI App
↓
MCP Client
↓
MCP Server
↓
Sales Database or other business systemMCP is often likened to a USB for AI, but the analogy stops at communication standardization. MCP does not solve tool development, authentication, permissions, user confirmation, or error recovery — those remain the application's responsibility. Server capability declaration does not guarantee full Host support. Agents do not require MCP; for a few fixed interfaces, direct API calls are simpler. MCP shines when the same toolset must be reused across multiple AI applications.
07 Skill: Teaching Agents How to Complete a Task
Even with tools, an agent may not know the proper method for a specific job. A database tool returns sales rows, but a proper sales analysis follows business rules: which fields to check, how to flag anomalies, required report sections, mandatory data-backed conclusions.
Such reusable task methods are packaged as a Skill — essentially a work instruction for the agent. A skill typically defines:
Applicable task types.
Step-by-step execution procedure.
Allowed templates, references, and tools.
Output format requirements.
Stop or human-confirmation conditions.
A Sales Analysis skill could mandate: verify data completeness → compare historical trends → flag anomalies → generate report using standard template. When business rules change, update the skill and template without rewriting core code.
Some agent systems load skills on demand: the model sees skill names and brief descriptions, then fetches full details only when relevant, avoiding context bloat. Skill file structures and loading mechanisms vary across platforms; the key practice is extracting task experience so agents can discover, reuse, and maintain it.
Skill and MCP address different problems:
Skill — how an agent should complete a class of tasks.
MCP — how an AI application connects to external tools and data.
A skill can direct an agent to call tools via MCP, built-in tools, or plain APIs. They complement, not replace, each other.
08 Real Applications Combine Multiple Approaches
It's a misconception that chat, workflow, agent, MCP, and skill form a linear evolution where later replaces earlier. Real projects mix them simultaneously. A sales analysis application might combine:
User submits task in app UI
↓
Workflow handles auth & data prep
↓
Agent decides which anomalies to analyze
↓
Load Sales Analysis skill on demand
↓
Query business data via MCP or direct API
↓
Workflow validates format & generates final doc
↓
Wait for human confirmation on external actionsEach piece owns a clear slice:
Workflow — stable, fixed steps.
Agent — dynamic judgment where paths can't be enumerated.
Skill — task method and business know-how.
MCP / API — external data & tool connectivity.
Application — permissions, state, logging, presentation.
Instead of debating terminology, first draw boundaries: where is model judgment valuable, where must deterministic code remain in control.
09 Choosing the Right Approach
Start with three questions: need external data? are steps fixed? does execution require mid-course changes?
Only Q&A, summarization, content generation → direct model call.
Fixed steps, need reproducible results → workflow.
Next step depends on intermediate results → agent.
Multiple AI apps reuse same tools → MCP.
Want to codify reusable task methods → skill.
Both fixed steps and dynamic judgment → workflow + agent combination.
Also weigh error cost. Many-step but well-defined tasks suit workflows. Open-ended investigation (research, anomaly analysis) justifies agent flexibility within guardrails.
If a simple method reliably completes the task, don't force it into a fully autonomous agent just to chase "intelligence."
Practical principle: start with a single model call. Add retrieval, tool use, and agent decision-making only when real problems demand it. Every layer adds debugging and maintenance overhead; complexity must earn its keep.
10 Conclusion
Chat tools hand the model's reply to the user. LLM applications go further: secure reliable data, execute necessary operations, deliver a usable artifact. No single concept covers everything. Workflows structure fixed steps; agents handle dynamic decisions; MCP or APIs connect external capabilities; skills capture repeatable task methods. The application designer decides how far the model's involvement should extend.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Cambridge Mofang Notes
Upholding classic programming, focusing on AI human‑machine collaboration, technology implementation and practice sharing.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
