Capstone Preparation
Hands-on lab with starter code you can copy + run, and guided steps to produce the artifact for this module.
Setup
- Open a fresh terminal in a new folder, e.g.
mkdir lab-12 && cd lab-12. - Create a Python 3.11 venv:
python -m venv .venv && source .venv/bin/activate. - Install the dependencies noted on each starter snippet (the small pip install … line above the code).
- Copy each starter into a file with the suggested name, then run it and capture the output.
Starter code
# 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-agentpython 12_01_lab.pyGuided steps
Work through each step in order. Stop when your output matches the expected artifact — then push your work to your lab folder.
- 1Capstone 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: - 2Full 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: - 3Capstone 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.
- NIST National Initiative for Cybersecurity Education (NICE)
US national framework for cybersecurity work roles and competencies.
- Financial Action Task Force (FATF)
Global AML/CFT standards referenced by financial-crime curricula.
- FBI Internet Crime Complaint Center — Annual Reports
Primary loss and typology data used in fraud-investigation training.
- US Federal Trade Commission — Consumer Sentinel Data Book
Official complaint statistics for teaching fraud trend analysis.
