The Four Types of Artifacts in AI Engineering: Prompts, Skills, Agents, and MCP Servers

The ai-engineering-from-scratch curriculum defines four core artifact types—prompts, skills, agents, and MCP servers—that serve as reusable building blocks for production-grade AI systems.

The repository rohitg00/ai-engineering-from-scratch treats every reusable curriculum output as an artifact. These artifacts fall into four distinct families that range from static text templates to runnable network services. Understanding these four types—prompts, skills, agents, and MCP servers—is essential for building modular AI systems according to this curriculum.

Prompts

A prompt is a text template—often a system prompt or few-shot example—that an LLM consumes. In the repository, prompts are stored as Markdown files under outputs/ and referenced by both skills and agents. The prompt taxonomy is documented in site/assets/figures/INDEX.md, which maps icon 001.A to the prompt artifact family.

A minimal prompt artifact looks like a Markdown file containing instructions and formatting requirements:

**System Prompt**  
You are a helpful AI assistant that only returns JSON objects with the fields `title` and `summary`.

Files following this pattern are saved as outputs/prompt-*.md and imported into larger skill definitions.

Skills

A skill is a reusable bundle that combines one or more prompts with tool definitions and input/output schemas. The curriculum emits skills as skill-*.md files inside each lesson's outputs/ folder. A representative example is phases/19-capstone-projects/87-end-to-end-safety-gate/outputs/skill-end-to-end-safety-gate.md, which packages a prompt, schema, and execution context into a single artifact.

The following Markdown illustrates how a skill wraps a prompt and JSON schemas:


# Skill: Summarize-Article  

**Prompt**  
You are given the full text of an article. Return a concise summary in JSON.

**Input schema**  

```json
{
  "type": "object",
  "properties": {
    "article": { "type": "string" }
  },
  "required": ["article"]
}

Output schema

{
  "type": "object",
  "properties": {
    "title":   { "type": "string" },
    "summary": { "type": "string" }
  },
  "required": ["title", "summary"]
}

By packaging prompts and schemas together, skills become portable units that any agent can discover and execute.

## Agents

An **agent** is the runnable implementation—written in Python, TypeScript, Rust, or Julia—that orchestrates prompts, skills, and tool calls. Agent code lives under `phases/*/*/code/` and is exercised by each lesson's tests. The capstone workbench at [`phases/14-agent-engineering/42-agent-workbench-capstone/code/main.py`](https://github.com/rohitg00/ai-engineering-from-scratch/blob/main/phases/14-agent-engineering/42-agent-workbench-capstone/code/main.py) demonstrates a complete agent that loads skills and manages execution logic.

Below is a minimal Python agent that consumes a skill artifact:

```python
"""
Agent that uses the Summarize-Article skill.
"""

import json
from pathlib import Path

def run(article: str) -> dict:
    # Load the skill definition (normally fetched from the skill artifact)

    skill_path = Path(__file__).parent.parent / "outputs" / "skill-summarize-article.md"
    # In a real lesson we parse the markdown to get the prompt & schemas.

    # Here we just mock the call.

    response = {
        "title": "Generated title",
        "summary": "A short summary of the article."
    }
    return response

if __name__ == "__main__":
    print(json.dumps(run("...article text..."), indent=2))

This pattern shows how agents act as the execution layer that selects and invokes skills at runtime.

MCP Servers

An MCP server exposes tools, resources, and prompts via the Model Context Protocol (MCP), a stable RPC interface. The curriculum builds MCP servers with the FastMCP framework and ships them as skill-mcp-server.md artifacts in outputs/. The canonical example is phases/19-capstone-projects/13-mcp-server-with-registry/outputs/skill-mcp-server.md, which documents the server's contract and registered capabilities.

A FastMCP server declaration looks like this:

"""
FastMCP server exposing a read-only Postgres query tool and a destructive Jira-create tool.
"""

from fastmcp import FastMCP, Tool

app = FastMCP()

@app.tool(name="postgres_query", description="Run a read-only SQL query")
def postgres_query(sql: str) -> str:
    # Example stub – real implementation would connect to a DB.

    return "query result"

@app.tool(name="jira_create", description="Create a Jira issue (destructive)", scopes=["approved:by:human"])
def jira_create(summary: str, description: str) -> str:
    return "JIRA-1234"

if __name__ == "__main__":
    app.run(host="0.0.0.0", port=8000)

MCP servers decouple tool implementations from agents, allowing multiple agents to call the same Postgres or Jira surface through a standardized protocol.

How Prompts, Skills, Agents, and MCP Servers Work Together

These four artifact families form a progressive stack. Prompts give LLMs intent and formatting rules. Skills wrap those prompts plus tool schemas into reusable packages. Agents run the logic that selects which skills to invoke and marshal data between them. MCP servers expose tool and resource surfaces over the network so that agents—and ultimately end-users—can interact with external systems safely.

In the ai-engineering-from-scratch curriculum, learners produce each artifact type in sequence: they author prompts, bundle them into skills, implement agents that consume those skills, and finally wrap services as MCP servers for production deployment.

Summary

Frequently Asked Questions

What is the difference between a prompt and a skill in ai-engineering-from-scratch?

A prompt is a standalone text template consumed by an LLM, while a skill packages one or more prompts together with tool definitions and JSON schemas. Skills are emitted as skill-*.md files and represent a higher-level, reusable unit that agents can discover and execute.

How does an agent use skills and MCP servers?

An agent loads skill artifacts at runtime to determine which prompts and schemas to apply. When a skill requires an external tool, the agent calls an MCP server over its stable RPC interface. This separation lets agents remain generic while MCP servers handle database connections, API calls, and other external operations.

What framework does the curriculum use to build MCP servers?

The repository uses the FastMCP framework for Python, as shown in phases/19-capstone-projects/13-mcp-server-with-registry/outputs/skill-mcp-server.md. FastMCP decorators such as @app.tool() register functions as MCP tools with names, descriptions, and authorization scopes.

Where are the four artifact types stored in the repository?

Prompts and skills live as Markdown files under each lesson's outputs/ directory, with skill files following the skill-*.md naming convention. Agent source code is located under phases/*/*/code/, such as phases/14-agent-engineering/42-agent-workbench-capstone/code/main.py, while MCP server skills are also stored in outputs/ as skill-mcp-server.md.

Have a question about this repo?

These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:

Share the following with your agent to get started:
curl -s "https://instagit.com/install.md"

Works with
Claude Codex Cursor VS Code OpenClaw Any MCP Client

Maintain an open-source project? Get it listed too →