Runnable Blueprints & Scaffolds
Root code-examples/

Production Code Scaffolds

11 tested, standalone engineering scaffolds and architectural blueprints demonstrating core AI engineering patterns — from multi-server MCP routing and LangGraph supervisors to Deep Agents composite backends and Docker GPU serving.

Total Blueprints11
Active Runnable7
Reference Designs4
Test Coverage100%
Architecture Blueprint
Retrieval & Search
Python 3.12+ / PostgreSQL
Production RAG Pipeline (FastAPI + pgvector)
Hybrid retrieval-augmented generation with reciprocal rank fusion and citation verification

Enterprise RAG reference architecture featuring FastAPI, PostgreSQL with pgvector for HNSW vector indexing, BM25 keyword search, reciprocal rank fusion (RRF), and sentence-level citation verification.

Architecture Layers:
Ingress GatewayVector StorageRRF Fusion EngineCitation Guardrail
Prerequisites:
  • •Python 3.12+
  • •PostgreSQL 16+ with pgvector extension
  • •OpenAI or Cohere API Key
Terminal Run Command:click to select all
pip install -r requirements.txt && uvicorn main:app --reload
code-examples/rag-pipeline
Architecture Blueprint
Data Systems & Embeddings
Python 3.12+ / pgvector
Vector Search & Hybrid Retrieval
HNSW and IVFFlat index tuning with pgvector and dense embedding generation

Deep-dive blueprint on vector indexing mechanics. Demonstrates generating dense embeddings, benchmarking HNSW vs. IVFFlat index build times and recall@k, and executing hybrid cosine + lexical queries.

Architecture Layers:
Embedding PipelineVector Index EngineSimilarity Search
Prerequisites:
  • •Python 3.12+
  • •PostgreSQL with pgvector
  • •NumPy / Sentence-Transformers
Terminal Run Command:click to select all
python search.py
code-examples/vector-search
Architecture Blueprint
Agentic Systems
Python 3.12+ / LangGraph
Multi-Step Agent Workflow State Machine
Deterministic cyclic control flow, tool calling, and conditional branching in LangGraph

Architectural blueprint for mission-critical agent workflows. Demonstrates explicit cyclic state machines, conditional routing edges, error recovery loops, and conversational turn persistence.

Architecture Layers:
State MachineControl Flow RouterMemory Persistence
Prerequisites:
  • •Python 3.12+
  • •Google Gemini or Anthropic API Key
  • •LangGraph SDK
Terminal Run Command:click to select all
pip install -r requirements.txt && python workflow.py
code-examples/agent-workflow
Architecture Blueprint
Distributed Agents
Python 3.11+ / LangGraph
Hierarchical Deep Agent Cluster
Distributed multi-agent cluster with delegated sub-graphs and isolated thread state

Scaled enterprise blueprint implementing a hierarchical agent cluster. Features a root orchestrator coordinating partitioned sub-agent clusters, boundary checkpointers, and distributed event channels.

Architecture Layers:
Cluster TopologyDistributed Event ChannelsPartitioned Checkpointing
Prerequisites:
  • •Python 3.11+
  • •pip / uv
  • •Redis or PostgreSQL for distributed checkpointers
Terminal Run Command:click to select all
pip install -r requirements.txt && python cluster.py
code-examples/langgraph-deep-agent-cluster