What Reusable Artifacts Does Each Lesson Provide in AI Engineering from Scratch?

Every lesson in the AI Engineering from Scratch curriculum produces exactly one reusable artifact—categorized as either a Skill, Prompt, Agent, or MCP Server—delivered via a standardized outputs/ directory structure defined in the repository's AGENTS.md contract.

The rohitg00/ai-engineering-from-scratch repository enforces a strict lesson contract that ensures every educational module yields a tangible, portable output. According to the curriculum's operating manual in AGENTS.md, each lesson must place a single reusable artifact inside an outputs/ folder, enabling learners to compose functionality across phases without rewriting boilerplate code.

The Four Categories of Reusable Artifacts

The curriculum explicitly limits artifacts to four distinct types, each serving a specific role in the AI development pipeline.

Skills

Skills are self-contained, reusable modules that expose clean APIs for specific functionality. These artifacts function as small libraries that learners can import directly into downstream projects.

Located at phases/<phase-slug>/<lesson-slug>/outputs/, a Skill typically implements a focused utility such as mathematical operations, data processing, or algorithmic implementations. For example, a matrix multiplication skill provides a matmul function that can be reused across multiple lessons:


# Import the skill from the lesson outputs directory

from phases.01_math_foundations.02_matrix_multiplication.outputs.matrix_mul import matmul

# Apply the skill in your own code

A = [[1, 2], [3, 4]]
B = [[5, 6], [7, 8]]
C = matmul(A, B)
print(C)   # → [[19, 22], [43, 50]]

Prompts

Prompts are version-controlled prompt templates stored as JSON or text files that capture exact wording for specific LLM tasks. These artifacts ensure consistency when interacting with language models across different lessons.

A prompt artifact follows the structure phases/<phase-slug>/<lesson-slug>/outputs/<prompt-name>.json and contains templated strings ready for injection into API calls:

{
  "name": "extract_entities",
  "template": "Extract all named entities from the following text:\n\n{{text}}\n\nReturn a JSON list of entities."
}

Learners can load and render these templates programmatically:

import json
from pathlib import Path

# Load the prompt template from the outputs directory

prompt_path = Path("phases/11_llm_engineering/01_prompt_engineering/outputs/extract_entities.json")
prompt = json.loads(prompt_path.read_text())

def render_prompt(text):
    return prompt["template"].replace("{{text}}", text)

# Example usage

sample = "Alice visited Paris in July."
print(render_prompt(sample))

Agents

Agents are minimal, fully-functional implementations demonstrating the perception-reasoning-action loop. These artifacts are typically single scripts or modules written in the lesson's target language—Python, TypeScript, Rust, or Julia.

An agent artifact encapsulates the complete cognitive loop and can be instantiated directly from the outputs/ directory. For instance, a TypeScript agent exports a class that handles the entire interaction cycle:

import { Agent } from "./phases/14_agent_engineering/02_simple_agent/outputs/simple_agent";

async function main() {
  const agent = new Agent();
  const response = await agent.think("What is the weather in London?");
  console.log(response);
}

main();

MCP Servers

MCP Servers implement the Model-Context-Protocol (MCP) specification, providing lightweight, stateless HTTP or WebSocket endpoints. These artifacts allow lessons to expose local inference services that other modules can consume.

Located at phases/<phase-slug>/<lesson-slug>/outputs/mcp_server.js (or equivalent), these servers follow the MCP JSON schema for request/response semantics:


# Launch the MCP server from the lesson outputs

node phases/13_tools_and_protocols/06_mcp_fundamentals/outputs/mcp_server.js

The server can be imported and started programmatically:

import { startMCP } from "./phases/13_tools_and_protocols/06_mcp_fundamentals/outputs/mcp_server";

startMCP({ port: 8080 });

Clients then POST to http://localhost:8080/mcp following the standardized MCP protocol.

File Structure and Naming Conventions

The repository enforces a one-artifact-per-lesson rule to maintain curriculum focus and ensure portability. The strict directory layout follows the pattern:


phases/<phase-slug>/<lesson-slug>/outputs/<artifact-name>.<ext>

This structure is documented in AGENTS.md under the "Lesson contract" section, which mandates that the outputs/ folder contain "reusable artifact (skill / prompt / agent / MCP server)". By standardizing artifact locations, the curriculum enables deterministic imports across phases, allowing learners to compose complex systems from individual lesson outputs without path ambiguity.

Summary

  • Every lesson in rohitg00/ai-engineering-from-scratch produces exactly one reusable artifact stored in an outputs/ directory.
  • Artifacts conform to four strict categories: Skills (reusable modules), Prompts (LLM templates), Agents (cognitive loops), and MCP Servers (protocol endpoints).
  • The lesson contract defined in AGENTS.md mandates standardized file paths following the pattern phases/<phase-slug>/<lesson-slug>/outputs/<artifact>.
  • All artifacts are designed for immediate reuse via direct import, instantiation, or API calls without modification to the source code.

Frequently Asked Questions

Where are reusable artifacts located within the repository?

Each artifact resides in a lesson-specific outputs/ directory following the path structure phases/<phase-slug>/<lesson-slug>/outputs/<artifact-name>.<ext>. This location is strictly enforced by the curriculum contract defined in the repository's AGENTS.md file.

Can artifacts from different lessons be combined in a single project?

Yes. The standardized outputs/ structure allows direct import and composition. For example, you can import a Skill from a mathematics phase and feed its output into an Agent from a later engineering phase, or use a Prompt artifact to initialize an MCP Server's request handling logic.

Which programming languages support the artifact outputs?

The curriculum supports Python, TypeScript, Rust, and Julia. The specific language for each artifact depends on the lesson's target language, but the interface patterns remain consistent—Skills expose functions, Agents expose classes, and MCP Servers expose runnable entry points regardless of implementation language.

How do I determine which artifact type a specific lesson provides?

Consult the lesson's documentation in phases/<phase-slug>/<lesson-slug>/docs/en.md, which explicitly states the artifact category. Additionally, the file extension and structure within the outputs/ directory indicate the type: .py/.ts/.rs modules indicate Skills or Agents, .json files indicate Prompts, and server entry points indicate MCP Servers.

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 →