14-lesson Node.js course portal for building AI agents from first principles.
CA: A4qQ4Rk42S4smtxD2fGGSFLxsoMPykDtQJXuioTMpump
A full-stack learning portal for AI Agents from Scratch. Each lesson covers one foundational agent pattern — model loading, function calling, memory, ReAct, DAG planning, tree/graph/chain of thought — with an embedded AI tutor backed by Claude.
- Skill tree roadmap — Visual node graph of all 14 lessons grouped into 3 stages. Click any node to jump directly into that lesson.
- Per-lesson chat tutor — Server-side Claude integration answers questions in the context of each lesson. API key never touches the browser.
- GitHub content sync — Lesson concept and code content is fetched from the upstream repo at build time (ISR, 1-hour revalidation). No manual copy-paste, no stale content.
- 4 pages — Landing, Branch (roadmap), Chat (per-lesson tutor), Docs (technical reference)
| Feature | Detail |
|---|---|
| 14 lessons | 3 stages: Fundamentals → Agent patterns → Advanced reasoning |
| AI tutor | Claude Sonnet, server-side only via /api/tutor route |
| ISR content | GitHub raw API, revalidate: 3600 — stays in sync automatically |
| Vercel dark design | Locked token system: --bg, --bd, --purple, --green — no deviations |
| Geist fonts | Geist Sans (prose) + Geist Mono (labels, code, breadcrumbs) |
graph LR
root["AI Agents from Scratch"] --> S1["Stage 01 — Fundamentals\n6 lessons"]
root --> S2["Stage 02 — Agent patterns\n4 lessons"]
root --> S3["Stage 03 — Advanced reasoning\n4 lessons"]
S1 --> L1["01 Introduction"]
S1 --> L2["02 OpenAI intro"]
S1 --> L3["03 Translation"]
S1 --> L4["04 Think"]
S1 --> L5["05 Batch"]
S1 --> L6["06 Streaming"]
S2 --> L7["07 Simple agent"]
S2 --> L8["08 Memory agent"]
S2 --> L9["09 ReAct agent"]
S2 --> L10["10 AoT agent"]
S3 --> L11["11 Error handling"]
S3 --> L12["12 Tree of thought"]
S3 --> L13["13 Graph of thought"]
S3 --> L14["14 Chain of thought"]
graph TD
Browser["Browser"] --> Landing["/ Landing page"]
Browser --> Branch["/learn Skill tree"]
Branch --> Chat["/learn/[id] Lesson + tutor"]
Chat --> API["/api/tutor Server route"]
API --> Claude["Anthropic SDK\nclaude-sonnet-4-20250514"]
Chat --> GH["GitHub raw API\nCONCEPT.md + CODE.md"]
Branch --> Docs["/docs Reference"]
git clone https://github.com/muaddib14/ai-agents-from-scratch
cd ai-agents-from-scratch
npm install
# Add your Anthropic API key
echo "ANTHROPIC_API_KEY=sk-ant-..." > .env.local
npm run devOpen http://localhost:3000.
src/
├── app/
│ ├── page.tsx ← Landing (/)
│ ├── learn/
│ │ ├── page.tsx ← Branch — skill tree (/learn)
│ │ └── [id]/page.tsx ← Chat — lesson + tutor (/learn/[id])
│ ├── docs/page.tsx ← Technical reference (/docs)
│ └── api/tutor/route.ts ← Server-side Anthropic route
├── components/
│ ├── shared/TopNav.tsx ← Navigation bar
│ └── chat/ChatPanel.tsx ← AI tutor client component
└── lib/
├── lessons.ts ← Lesson metadata + GitHub fetch
└── tutor.ts ← System prompt builder
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Required. Anthropic API key for the tutor route. |
The API key lives in .env.local only. It is never bundled into client code.
| # | Title | Tag | Stage |
|---|---|---|---|
| 01 | Introduction | basic llm | Fundamentals |
| 02 | OpenAI intro | hosted llms | Fundamentals |
| 03 | Translation | system prompts | Fundamentals |
| 04 | Think | reasoning | Fundamentals |
| 05 | Batch | parallelism | Fundamentals |
| 06 | Streaming | response control | Fundamentals |
| 07 | Simple agent | function calling | Agent patterns |
| 08 | Memory agent | persistent state | Agent patterns |
| 09 | ReAct agent | reason + act | Agent patterns |
| 10 | AoT agent | atomic planning | Agent patterns |
| 11 | Error handling | resilience | Advanced reasoning |
| 12 | Tree of thought | beam search | Advanced reasoning |
| 13 | Graph of thought | dag merge | Advanced reasoning |
| 14 | Chain of thought | auditable reasoning | Advanced reasoning |
# Install Vercel CLI
npm i -g vercel
# Deploy
vercel --prodSet OPENROUTER_API_KEY in your Vercel project's Environment Variables dashboard.
npm run build
npm start # runs on port 3000 by defaultRequires Node.js 18+. Set OPENROUTER_API_KEY in your environment before starting.
| Variable | Required | Description |
|---|---|---|
OPENROUTER_API_KEY |
Yes | OpenRouter API key for the AI tutor route |
- Fork the repo and clone it locally
- Create a branch:
git checkout -b feature/your-feature - Make your changes with conventional commits:
feat(scope): description - Run tests:
npm test - Open a pull request against
main
Commit types: feat, fix, refactor, docs, test, chore, ci
MIT