Skip to main content
GACS will never ask for your seed phrase, private keys, or payment. free and ad-free.
Back to lessonLab · Module 12 / 12
Lab

Capstone Preparation

Hands-on lab with starter code you can copy + run, and guided steps to produce the artifact for this module.

Setup

  1. Open a fresh terminal in a new folder, e.g. mkdir lab-12 && cd lab-12.
  2. Create a Python 3.11 venv: python -m venv .venv && source .venv/bin/activate.
  3. Install the dependencies noted on each starter snippet (the small pip install … line above the code).
  4. Copy each starter into a file with the suggested name, then run it and capture the output.

Starter code

01 · End-to-end capstone — agent with RAG, tools, eval, deploy
save as: 12_01_lab.py
python
# 1. Index your knowledge base
# python scripts/ingest.py --src docs/ --table mem

# 2. Define tools the agent can call
TOOLS = {
    "search_kb":   lambda q: recall(q, k=5),
    "calc":        lambda e: str(eval(e, {"__builtins__":{}})),
    "open_ticket": lambda t: ticket_api.create(title=t),
}

# 3. Wrap the ReAct loop in FastAPI (see deployment module)
# 4. Run the eval harness against a golden test set
# 5. Add OTel traces + budget guards (see observability module)
# 6. Containerise and ship:
#      docker build -t my-agent . && docker run -p 8080:8080 my-agent
Run with: python 12_01_lab.py

Guided steps

Work through each step in order. Stop when your output matches the expected artifact — then push your work to your lab folder.

  1. 1
    Capstone scope doc

    Do — Write a 1-page scope: target user, problem, tools required, success metric, eval set size.

    Expected artifact — scope.md reviewed by a peer.

    Run free:
  2. 2
    Full pipeline

    Do — Ship an agent with RAG + tools + guardrails + traces + tests + FastAPI + Docker.

    Expected artifact — Git repo with one-command `make run` that brings up the service end-to-end.

    Run free:
  3. 3
    Capstone report

    Do — Write a 5-page report covering architecture, eval results, failure modes, cost per request.

    Expected artifact — report.pdf with ≥2 diagrams, an eval table, and a cost section in USD.

    Run free:

Authoritative sources

Independent primary sources used to check and corroborate the guidance on this page.