A hands-on learning repository for Cloud and DevOps engineers stepping into Generative AI and Agentic AI. Every concept is grounded in infrastructure analogies you already know.
You deploy containers. You write Terraform. You've been paged at 3am. Now AI is showing up everywhere in your stack — in CI/CD pipelines, incident response tooling, and the platforms your company is building.
This repo takes you from "I've used ChatGPT" to "I understand how this works and I can build with it."
Assumed background:
- Comfortable with Python (scripts, not data science)
- Hands-on experience with Kubernetes, Terraform, Docker, or similar cloud/DevOps tools
- Some AWS/GCP/Azure exposure helpful but not required
Not required:
- Math background
- Machine learning experience
- Data science background
| # | Session | Key Tools | API Key? | Status |
|---|---|---|---|---|
| 01 | How LLMs Actually Work | tiktoken, sentence-transformers |
No | ✅ Available |
| 02 | Prompt Engineering | anthropic |
Yes | ✅ Available |
| 03 | Local LLMs with Ollama | ollama, requests |
No (local) | ✅ Available |
| 04 | Tool Calling (Function Calling) | openai, ollama |
Depends on provider | ✅ Available |
| 05 | MCP Servers with FastMCP | fastmcp, mcp |
No | ✅ Available |
| 06 | Memory Management in Agentic AI | Python standard library | No | ✅ Available |
| 07 | Retrieval-Augmented Generation (RAG) | pypdf, tiktoken, sentence-transformers, chromadb, openai |
Optional | ✅ Available |
| 08 | Agent2Agent (A2A) Protocol | Python standard library | No | ✅ Available |
| 09 | Fine-Tuning LLMs | Python standard library, openai optional |
Optional | ✅ Available |
| 10 | GenAI Evals and Red Teaming | Python standard library | No | ✅ Available |
| 11 | LLMOps and Production GenAI | Python standard library | No | ✅ Available |
| 12 | GenAI Security Frameworks | Python standard library | No | ✅ Available |
| 13 | Modern Agent Runtime | Python standard library | No | ✅ Available |
| 14 | Multimodal and Realtime AI | Python standard library | Optional | ✅ Available |
| 15 | Open Model Production Serving | Python standard library | No | ✅ Available |
| 16 | GenAI Observability | Python standard library | No | ✅ Available |
| 17 | AI Governance, Risk, and Compliance | Python standard library | No | ✅ Available |
sessions/XX_topic_name/
├── README.md ← Start here: objectives, prereqs, estimated time
├── concepts/ ← The "why" and "how" — read before coding
│ ├── 01_topic.md
│ └── ...
├── labs/ ← Hands-on coding exercises
│ ├── lab01_name/
│ │ ├── lab.py ← You write the code (has TODO markers)
│ │ └── solution.py ← Reference implementation (peek only when stuck)
│ └── ...
└── demos/ ← Ready-to-run scripts — observe and learn
└── ...
How to use labs:
- Open
lab.pyand read it top to bottom — understand the goal - Fill in the
# TODOsections — use the concept docs if stuck - Run with
python lab.pyand verify your output matches the expected output in comments - If truly stuck after trying: check
solution.py
# 1. Clone
git clone <repo-url>
cd LearningGenAI
# 2. Create a virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Verify your setup
python setup_check.py
# 5. Start Session 01
cd sessions/01_how_llms_work
cat README.mdSession 01 requires no API key. You learn tokenization and embeddings completely offline.
For cloud-provider labs, copy and configure .env:
cp .env.example .env
# Open .env and fill only the keys you need:
# - ANTHROPIC_API_KEY (Session 02)
# - OPENAI_API_KEY / provider-compatible keys (Session 04)Optional local path:
- Session 03 runs fully local with Ollama.
- Session 04 can also run locally through Ollama's OpenAI-compatible
/v1endpoint. - Sessions 05, 06, and 08 do not require API keys for the included labs and demos.
- Session 07 core labs run without API keys; the optional generated-answer demo can use
OPENAI_API_KEY. - Session 09 core labs run without API keys; optional hosted fine-tuning examples use
OPENAI_API_KEY. - Sessions 10-17 core labs run without API keys. Optional extensions can connect to provider APIs, realtime APIs, OpenTelemetry collectors, or GPU model servers.
- No notebooks. DevOps engineers live in terminals and editors. Every exercise is a plain
.pyscript. - Offline-first. Session 01 runs entirely without an internet connection after the initial
pip install. - DevOps analogies first. Every concept is introduced with an infrastructure analogy before the AI theory.
- Build things that matter. Labs produce code patterns (semantic search, context management, agent loops) you will actually use in production.
Found a bug, a better analogy, or want to contribute a session? Open an issue or PR — contributions welcome.
MIT — use freely for learning and teaching.