Appearance
Generative AI & Autonomous Agent Architecture β
Engineering Master Training Program
Trainee: Huy Chau (Senior Software Architect & Engineer)
Primary Stack: Python 3.12+, LangGraph v1, LangChain (LCEL), Model Context Protocol (MCP), LangFuse, Pydantic v2
Curriculum Source:[Huy Chau] Generative AI Training Plan(Google Docs)
π― Purpose & Engineering Philosophy β
This repository serves as the dedicated laboratory, knowledge base, and implementation workspace for mastering Generative AI & Autonomous Agent Systems Engineering.
Guiding Architectural Principles β
Rather than treating LLMs as conversational chatbots or crafting ad-hoc prompts, this project approaches Generative AI through rigorous production engineering paradigms:
- Stochastic Runtimes & Defensive Scaffolding: Treating foundation models as non-deterministic runtime engines requiring defensive programming, boundary assertions, fallback degradation, and deterministic scaffolding.
- Deterministic Structured Schemas & Type Safety: Enforcing immutable Pydantic v2 schemas and strict boundary validation to guarantee computer-readable outputs, reject malformed payloads, and prevent schema drift.
- Hierarchical Observability & Tracing: Instrumenting multi-turn agentic workflows with nested traces, spans, token economics, latency profiling, and reasoning trajectory evaluations (LangFuse / LangSmith).
- Build-Verify-Fix (BVF) Verification Loops: Scaffolding autonomous agents with deterministic verification tools (linters, static analyzers, test runners, execution checkers) to eliminate hallucinations and enforce verifiable correctness.
- Zero-Trust AI Security & Privilege Gates: Operationalizing OWASP Top 10 for Agentic Applications and NIST AML standards (prompt injection containment, honeypot tokens, context sanitization, and human-in-the-loop privileged action gates).
π Workspace Architecture β
text
ai/
βββ README.md # Workspace manifesto, architecture, and navigation
βββ .env # Local environment variables & secrets (gitignored)
βββ .env.example # Template of required API keys and configuration
βββ .gitignore # Protection against leaking secrets, tokens, or cache
β
βββ .agents/ # Antigravity agent customizations & MCP configs
β βββ mcp_config.json # Active workspace MCP servers (Notion, Google Docs)
β βββ MCP_SETUP_GUIDE.md # Comprehensive credential setup documentation
β βββ plugins/
β βββ workspace-integrations/# Namespaced integration bundle
β βββ plugin.json
β βββ mcp_config.json
β
βββ docs/
β βββ plan/ # Canonical Source of Trust (cloned from Google Doc)
β β βββ README.md # Curriculum overview & syllabus index
β β βββ 00_master_plan.md # Master 10-week roadmap & prerequisites
β β βββ 01_phase1_engine_and_prompting.md
β β βββ 02_phase2_engineering_of_reasoning.md
β β βββ 03_phase3_modular_chaining_lcel.md
β β βββ 04_phase4_context_engineering_agentic_rag.md
β β βββ 05_phase5_harness_engineering_mcp.md
β β βββ 06_phase6_stateful_graphs_hitl.md
β β βββ 07_capstone_nexus_deep_researcher.md
β β βββ 08_production_evaluation_engineering.md
β β βββ 09_beyond_industrialization_ecosystems.md
β β βββ 10_rapid_development_deepagents.md
β β
β βββ learning/ # Deep engineering guides, math mechanics & tutorials
β βββ phase_1_engine/ # Phase 1 deep-dive guides & reading checklists
β βββ phase_2_reasoning/ # Phase 2 deep-dive guides & reasoning patterns
β
βββ labs/ # Executable Python modules, benchmarks & tests
βββ phase_1/ # Hardened Classifier & Parameter Stability benchmarks
βββ phase_2/ # Tree of Thoughts Planner, ReAct Agent, AlignmentCheckπΊοΈ Curriculum & Milestone Roadmap β
| Phase | Duration | Core Deliverable | Status |
|---|---|---|---|
| Phase 1: The Engine & Prompting | 1 Week | Hardened Classifier & Parameter Stability Report | π‘ Current Focus |
| Phase 2: Reasoning Engineering | 1 Week | Multi-Path ToT Planner & Self-Correcting ReAct Agent | βͺ Planned |
| Phase 3: Modular Chaining & LCEL | 1 Week | Schema-Enforced Extractor & Self-Healing Multi-Provider Pipeline | βͺ Planned |
| Phase 4: Context & Agentic RAG | 1.5 Weeks | Memory-Enabled Travel Chatbot & Ragas Benchmark Dashboard | βͺ Planned |
| Phase 5: Harness Engineering & MCP | 1.5 Weeks | Onboarded Developer Agent & Loop-Detection Interceptor | π’ MCP Active |
| Phase 6: Stateful Graphs & HITL | 2 Weeks | Stateful Essayist & Privileged Action Gatekeeper | βͺ Planned |
| Capstone: NEXUS Deep Researcher | 3.5 Weeks | Autonomous Deep Researcher with VFS & Enterprise Swarm | βͺ Planned |
| Production Evaluation Engineering | 1 Week | Automated Regression Flywheel & LLM-as-a-Judge System | βͺ Planned |
| Beyond: Industrial Ecosystems | 2 Weeks | Redis Semantic Caching & A2A / Layer 9 Swarms | βͺ Planned |
π Connected Ecosystem & Integrations β
The workspace is configured with two-way Model Context Protocol (MCP) servers allowing the AI assistant to read, update, and manage live documents:
- Notion MCP (
notion-mcp-server):- Active Page:
[Huy Chau] Generative AI Training Notes - Teamspace:
Huy Chau Training(Teamspace Home) - Token Config: Stored securely in .env under
NOTION_TOKEN.
- Active Page:
- Google Docs & Drive MCP (
@piotr-agier/google-drive-mcp):- Canonical Document:
[Huy Chau] Generative AI Training Plan(Doc ID:1E80LeQMymp0Yu88JlNP0MV_6Kva1fISlIw5jXNuPAh0) - Authentication: Desktop OAuth 2.0 authorized via
~/.config/google-drive-mcp/.
- Canonical Document:
β‘ Quick Start for Development β
1. Environment Setup β
bash
# Ensure Python 3.12+ is active
python3 --version
# Create and activate virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Install baseline dependencies
pip install pydantic langfuse langchain-core pytest2. Configure Environment Variables β
Copy .env.example to .env and populate your keys:
bash
cp .env.example .envKey variables:
NOTION_TOKEN: Notion internal integration secretNOTION_PAGE_ID: Primary training notes page IDLANGFUSE_PUBLIC_KEY&LANGFUSE_SECRET_KEY: Tracing credentialsGEMINI_API_KEYorOPENAI_API_KEY: Model provider keys
3. Verify Active Tools β
In Antigravity IDE chat, verify integrations at any time using @ mentions (e.g. @notion_read, @createGoogleDoc).
π Deep-Dive Engineering Guides β
Phase 1: The Engine & Programmatic Prompting β
- π 1.1 The GenAI Mindset & Spiky Intelligence
- π 1.2 Engine Parameters (The Knobs)
- π 1.3 Systematic Prompt Structure & ICL
- π 1.4 Instrumentation & Tracing Hierarchy
- π 1.5 Compulsory Security & Threat Awareness
- π§ͺ Phase 1 Lab Deliverables Specification