Core AI Agent Concepts Explained: Skills, MCP, Workflows, Rules, and Memories
This article breaks down five foundational components of modern AI agents: Skills, MCP (Model Context Protocol), Workflows, Rules, and Memories. It explains what each component does, how it is structured, and how they work together, with illustrative scenarios for AI coding assistants and general-purpose agent design. Readers will learn how to choose between semantic, model-driven Skills and deterministic Workflows, when to route tool and data access through MCP, and how to use Rules and Memories to keep agent behavior consistent and continuous across sessions.
Core AI Agent Concepts Explained: Skills, MCP, Workflows, Rules, and Memories
When building an intelligent coding assistant, or an AI agent system more broadly, developers repeatedly run into five foundational components: Skills, MCP (Model Context Protocol), Workflows, Rules, and Memories. Together, these components form the capability backbone of a modern agent. It is worth emphasizing that intelligent coding is just one vertical application of agents; once you understand these five components, you understand the core methodology behind general-purpose agent design.
This article breaks down each component one by one, covering its definition, internal structure, and design intent, and uses illustrative scenarios to show how they work together.
1. Skill: A Reusable, Modular Capability Package
1.1 Definition and Essence
A Skill is a modular unit of capability encapsulation. It typically consists of a structured description, execution steps, constraint notes, and optional supporting resources such as scripts, templates, and reference documents. Its core goal is to capture the “how-to” of a certain class of tasks, so that the model can automatically load and follow it whenever it encounters a semantically matching scenario.
From an implementation standpoint, the body of a Skill is usually a carefully organized prompt. But it adds two layers of engineering design on top of an ordinary prompt: first, metadata (a name and a capability description) that the model uses for capability routing; second, portable deterministic resources, such as scripts for reading data or converting formats.
1.2 A Typical Scenario
Suppose a business team has produced a fixed-format report in spreadsheet software and now needs to generate a web-based report that can be presented in a browser, based on the existing layout and data. You could define a Skill like this:
name: spreadsheet-to-html-reportdescription: Convert spreadsheet data into a web report following the existing layout, for presentationsteps:1. Call the script to read the source file and extract headers, data regions, and style information2. Generate the page structure according to the layout rules3. Output a single-file web page and run basic validationresources:- read_table.py <file path>
Once the model recognizes an intent like “generate a presentation report,” it automatically matches this Skill, executes the steps, and calls the bundled script to perform deterministic reading. This illustrates the key value of a Skill: hand the error-prone, fixed-procedure parts to scripts, and hand the parts that require understanding and generation to the model.
1.3 Design Guidelines
- Write descriptions for routing: the name and description are what the model uses to choose a Skill, so state clearly when it applies and when it does not.
- Keep steps executable: avoid abstract slogans and provide verifiable intermediate outputs wherever possible.
- Minimize resources: carry only the scripts and templates that are necessary to control context overhead.
2. MCP: A Standardized Context and Tool Access Layer
2.1 Definition and Value
MCP (Model Context Protocol) is a general protocol approach for standardizing how a model connects to external data and tools. It addresses the problem that a large amount of duplicate adaptation work exists across different tools, different data sources, and different models, which calls for a standardized access convention.
You can think of it as a “socket standard” between the agent and the outside world: as long as a data source or tool exposes its capabilities according to the protocol, the model side can discover, invoke, and receive results in a unified way, without custom integration for each individual tool.
2.2 Relationship to Skills
A Skill describes “how to do it,” while MCP provides “what to do it with.” Within its execution steps, a Skill can connect through MCP to capabilities such as database queries, file reading, log retrieval, or monitoring data access. The two represent a division of labor between strategy and resources.
3. Workflow: Deterministic Process Orchestration
3.1 Definition
A Workflow organizes multiple steps into a repeatable process according to a predefined order, branches, and conditions. Unlike the “semantic auto-triggering” of a Skill, a Workflow emphasizes determinism: it is driven by an orchestration engine, with clear input/output contracts between nodes.
3.2 Applicability Boundaries
When a task demands high stability and auditability (for example, automated checks after a code commit, or build and release pipelines), prefer a Workflow. When a task is open-ended and requires the model’s understanding and judgment, a Skill is a better fit. A common pattern in practice is to let the Workflow provide the main skeleton and invoke a Skill or MCP at key nodes to handle intelligent processing.
Example flow:Pull changes -> Static checks (deterministic) -> Intelligent review (Skill) -> Summary report -> Notification
4. Rules: Global Constraints and Preferences
4.1 Definition
Rules are constraints and conventions that are always in effect. They unify team style and baseline requirements, such as naming conventions, directory structure, comment requirements, prohibited dependency types, and security and compliance boundaries.
4.2 Difference from Skills
Rules are continuous constraints that must be followed “at all times” and generally do not need to be “selected”; a Skill is a capability package loaded only “in specific scenarios.” Capturing team conventions as Rules can significantly reduce inconsistency in generated output and lower review costs.
5. Memories: Cross-Session State and Accumulated Experience
5.1 Definition
Memories refer to the information an agent retains across multiple interactions, including project background, user preferences, past decisions, and lessons learned from mistakes. They move an agent from “stateless Q&A” toward a “collaborator with continuity.”
5.2 Practical Recommendations
- Manage in layers: distinguish short-term session context from long-term project memory.
- Make it updatable and rollback-able: memory should support revision and deletion to prevent incorrect experience from causing long-term contamination.
- Privacy and minimization: retain only necessary information, and keep sensitive data out of long-term memory.
6. How the Five Components Work Together and How to Choose
| Component | Core Role | Trigger | Typical Use |
|---|---|---|---|
| Skill | Modular how-to method | Automatically loaded via semantic matching | Report generation, framework-specific usage |
| MCP | Standardized tool and data access | Invoked by a Skill or flow | Data queries, file and log access |
| Workflow | Deterministic process orchestration | Driven in sequence by the engine | Build, checks, release |
| Rules | Global continuous constraints | Always in effect | Code conventions, security boundaries |
| Memories | Cross-session state retention | Recalled on demand | Project background, user preferences |
Three principles can guide the choice. First, use a Workflow for stable, enumerable processes and a Skill for open-ended tasks that require judgment. Second, route all external data and tool access through MCP whenever possible to reuse standardized capabilities. Third, write team consensus into Rules and project evolution into Memories.
In agent engineering practice on platforms such as Baidu AI Cloud, the layered combination of these five components has become a general paradigm for building maintainable systems: Rules hold the baseline, MCP connects resources, Skills and Workflows carry execution, and Memories preserve continuity. Understanding their boundaries and how they collaborate is the key step toward moving from “able to converse” to “able to complete tasks reliably.”
