Skip to content

Agentic Software Engineering & MCP ​

AI-Native Engineering Curriculum · From LLM APIs to Production Agents & Custom MCP Servers

Tech Minds Academy's flagship 4-month (16-week) AI engineering programme — designed as the direct technical sequel to Prompt Engineering & AI Tools and our Web & Full-Stack Engineering sequence. Go beyond chat wrappers to architect deterministic tool-calling loops, cited Retrieval-Augmented Generation (RAG) pipelines on pgvector, custom Model Context Protocol (MCP) servers in TypeScript, multi-agent orchestrators, defence-in-depth guardrails, and automated evaluation benchmarks.

16Weeks
5Stages
70+Lessons
10Projects
JS / TSFoundation

Programme Overview ​

Core Topics: Spec-Driven AI Development · TypeScript LLM SDKs & zod Schemas · Function Calling & Agent Loops · Vector Search (pgvector) & Cited RAG · Model Context Protocol (@modelcontextprotocol/sdk) · Multi-Agent Orchestration · Guardrails & Automated Evals · Streaming Full-Stack Deployment

StageFocusDurationLevelPrerequisite
Stage 1AI-Native Software Engineering Foundations3 weeks (Weeks 1–3)IntermediateBasic JS/Python or Cohort Ramp
Stage 2Tool Calling, Function Execution & Cited RAG3 weeks (Weeks 4–6)IntermediateStage 1
Stage 3Model Context Protocol (MCP) Architecture3 weeks (Weeks 7–9)AdvancedStage 2
Stage 4Multi-Agent Workflows, Memory & Guardrails4 weeks (Weeks 10–13)AdvancedStage 3
Stage 5Production Full-Stack AI Systems & Capstone3 weeks (Weeks 14–16)ProductionStage 4

Curriculum Rationale — Key Decisions Explained ​

QuestionTech Minds Academy Engineering Decision
Why Agentic Engineering instead of basic chatbots?Modern software teams no longer ship static text-in/text-out wrappers. Employers need engineers who can wire LLMs safely to live databases, payment APIs, ticketing systems, and internal documents — where an AI agent can reason, inspect state, execute verified tools, recover from errors, and know when to pause for human approval.
Why make Model Context Protocol (MCP) a dedicated 3-week stage?Just as REST and OpenAPI standardised web service integration, MCP has become the universal open protocol connecting AI hosts (Claude Desktop, Cursor, VS Code, custom enterprise agents) to data sources and tools. Engineers who can build, secure, and deploy custom MCP servers make any company's internal systems instantly AI-operable without N-by-M custom glue code.
Why enforce Evals, Guardrails & Cost Engineering?An agent demo takes an afternoon; a reliable production agent takes engineering discipline. Without automated eval suites, zod schema validation, prompt-injection defences, and per-tenant token budgets, agentic apps fail silently in production or rack up runaway API bills. We treat evals with the same rigour as unit and integration tests.
What prerequisite background do I need?Familiarity with JavaScript (or Python), async/await, JSON, and Git — such as completing JavaScript Fundamentals or Stage 5 of Prompt Engineering & AI Tools. Week 1 rapidly levels every student up on strict TypeScript, Node.js 22+, and spec-driven development.

Stage 01 · AI-Native Software Engineering Foundations ​

Duration: 3 Weeks (Weeks 1–3) · Level: Intermediate
Mastering TypeScript, frontier LLM SDKs, schema-locked structured outputs, and cost/latency engineering.

Stage 1 establishes the engineering bedrock for production AI software: writing tight technical specifications for AI coding agents, configuring a modern TypeScript + Node.js runtime, unifying calls across OpenAI, Anthropic, and Google GenAI SDKs, and guaranteeing deterministic JSON outputs validated at runtime with zod.

Week 1: Spec-Driven Development & Modern TypeScript AI Stack (6 Lessons · 5 Hours) ​

  1. 01 — What is an AI agent vs a deterministic workflow? Distinguishing fixed Directed Acyclic Graphs (DAGs) from autonomous model-driven control loops — and knowing when simpler code wins.
  2. 02 — Spec-driven development with AI coding agents: Writing SPEC.md architecture contracts, interface invariants, and acceptance tests before delegating implementation slices to Cursor, Claude Code, or Copilot.
  3. 03 — TypeScript & Node.js 22+ setup for AI engineering: Configuring strict tsconfig.json, tsx, native .env loading, ESLint, and Vitest for fast feedback loops.
  4. 04 — Designing clean modular boundaries for LLM services: Separating prompt templates, model adapters, domain business logic, and transport layers.
  5. 05 — Reviewing and verifying AI-generated code: Auditing subtle concurrency bugs, hallucinated package APIs, security regressions, and missing edge cases.
  6. 06 — Git workflows & secret hygiene for AI repositories: Pre-commit secret scanning, .env.example conventions, and reproducible project scaffolding (see Git & GitHub Workflow).

IMPORTANT

Week 1 Project — Spec-Driven TypeScript CLI & Benchmark Harness: Write a formal SPEC.md and build a typed Node.js CLI tool with Vitest coverage that benchmarks local/remote endpoints, logs latency percentiles (p50, p95), and enforces strict TypeScript types.

Week 2: Frontier LLM SDKs — OpenAI, Anthropic & Google GenAI (6 Lessons · 6 Hours) ​

  1. 01 — Official SDK architecture vs raw REST requests: Type safety, automatic exponential-backoff retries, timeout handling, and request IDs in openai, @anthropic-ai/sdk, and @google/genai.
  2. 02 — Message roles, multimodal inputs & document blocks: Sending images, PDFs, system instructions, and multi-turn transcripts cleanly across model providers.
  3. 03 — Reasoning models & thinking budgets: Controlling extended thinking tokens (reasoning_effort / thinking blocks) for hard planning vs fast classification tasks.
  4. 04 — Streaming protocols in Node.js & Web Streams: Transforming SDK token streams into async iterators (for await...of) and Server-Sent Events (SSE).
  5. 05 — Building a provider-agnostic model router: Designing a lightweight TypeScript adapter interface so your application can fail over from Anthropic to OpenAI or Gemini seamlessly.
  6. 06 — Handling rate limits (429), overloaded servers (529), and graceful fallbacks: Implementing jittered retries, circuit breakers, and model downgrade policies.

IMPORTANT

Week 2 Project — Multi-Provider Resilient Gateway: Build a TypeScript LLM gateway module supporting Anthropic Claude, OpenAI, and Google Gemini behind one typed interface with streaming support, automatic fallback on 429/5xx errors, and structured request logging.

Week 3: Deterministic Structured Outputs (zod) & Cost/Latency Engineering (6 Lessons · 6 Hours) ​

  1. 01 — Why free-text parsing breaks production pipelines: Eliminating brittle regexes by enforcing grammar-constrained JSON Schema decoding at the model layer.
  2. 02 — Runtime schema contracts with zod: Designing expressive z.object(), z.discriminatedUnion(), enums, descriptions, and validation refinements.
  3. 03 — Native Structured Outputs across providers: Using OpenAI zodResponseFormat, Anthropic structured tool schemas, and Gemini responseSchema for 100% schema adherence.
  4. 04 — Prompt caching & KV-cache economics: Structuring static system instructions, tool definitions, and reference documents to achieve up to 75–90% input token cost savings via prompt caching.
  5. 05 — Latency engineering — TTFT, tokens/sec, and parallelisation: Measuring Time-To-First-Token (TTFT), routing sub-tasks to small fast models (Haiku / gpt-4o-mini / Gemini Flash), and executing independent calls with Promise.all().
  6. 06 — Building token & Naira/USD budget ledgers: Calculating exact per-request cost from usage metadata and enforcing per-user daily spend ceilings.

Runnable TypeScript Example — Deterministic Extraction with zod ​

typescript
import OpenAI from 'openai'
import { zodResponseFormat } from 'openai/helpers/zod'
import { z } from 'zod'

const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY })

// Strict schema contract for parsing messy vendor invoices & bank alerts
const InvoiceExtractionSchema = z.object({
  vendorName: z.string().describe('Registered business or merchant name'),
  invoiceNumber: z.string().nullable(),
  currency: z.enum(['NGN', 'USD', 'GBP', 'EUR']),
  subtotal: z.number(),
  vatAmount: z.number().describe('7.5% Nigerian VAT if itemized, otherwise 0'),
  totalAmount: z.number(),
  lineItems: z.array(
    z.object({
      description: z.string(),
      quantity: z.number().int().positive(),
      unitPrice: z.number()
    })
  ),
  riskFlags: z
    .array(z.enum(['MATH_MISMATCH', 'MISSING_TIN', 'DUPLICATE_SUSPECTED', 'UNUSUAL_AMOUNT']))
    .describe('Audit anomalies detected while verifying arithmetic')
})

export type InvoiceExtraction = z.infer<typeof InvoiceExtractionSchema>

export async function extractVerifiedInvoice(rawDocumentText: string): Promise<InvoiceExtraction> {
  const completion = await openai.beta.chat.completions.parse({
    model: 'gpt-4o-mini',
    temperature: 0,
    messages: [
      {
        role: 'system',
        content:
          'Extract structured accounting data from the invoice text. Verify that lineItems + vatAmount equal totalAmount; if they differ, add MATH_MISMATCH to riskFlags.'
      },
      { role: 'user', content: rawDocumentText }
    ],
    response_format: zodResponseFormat(InvoiceExtractionSchema, 'invoice_extraction')
  })

  const parsed = completion.choices[0]?.message.parsed
  if (!parsed) {
    throw new Error('Model refused or failed structured extraction.')
  }
  return parsed
}

IMPORTANT

Week 3 Project — Schema-Locked Financial Document Extractor: Build an ingestion pipeline that converts unstructured Nigerian receipts, invoices, and procurement emails into strict zod-validated TypeScript objects with arithmetic verification and a real-time token/cost ledger.


Stage 02 · Tool Calling, Function Execution & Cited RAG ​

Duration: 3 Weeks (Weeks 4–6) · Level: Intermediate · Prerequisite: Stage 1
Giving AI models hands to execute deterministic code and grounded memory over private knowledge bases.

In Stage 2 you build the two core pillars of useful enterprise agents: Tool Calling (letting the LLM invoke typed functions in a controlled while loop) and Retrieval-Augmented Generation (RAG) (indexing domain documents in PostgreSQL + pgvector so every claim carries a verifiable citation).

Week 4: Designing Deterministic Tools & The Agentic Loop (6 Lessons · 6 Hours) ​

  1. 01 — How tool calling actually works: Understanding that LLMs never execute code directly — they emit structured tool_use / tool_calls JSON requests that your host runtime validates and executes.
  2. 02 — Designing agent-ergonomic tool interfaces: Writing crystal-clear tool names, parameter descriptions, narrow enums, and actionable error messages so the model recovers when a tool call fails.
  3. 03 — Implementing the core while agentic execution loop: Managing stop_reason === 'tool_use', executing parallel tool calls safely, appending tool_result blocks, and enforcing maxIterations ceilings.
  4. 04 — Idempotency, dry-runs & read-vs-write separation: Distinguishing safe read tools (getOrderStatus, searchInventory) from mutating side-effect tools (issueRefund, sendCustomerEmail).
  5. 05 — Sandboxing untrusted computation: Running dynamic calculations or code snippets inside isolated worker sandboxes with strict CPU, memory, and network limits.
  6. 06 — Structured tool telemetry: Logging tool arguments, execution duration, success/error rates, and loop step counts for debugging.

Runnable TypeScript Example — Anthropic Claude tool_use Agent Loop ​

typescript
import Anthropic from '@anthropic-ai/sdk'

const anthropic = new Anthropic({ apiKey: process.env.ANTHROPIC_API_KEY })

const tools: Anthropic.Tool[] = [
  {
    name: 'lookup_waybill_status',
    description:
      'Fetch live shipment status, current hub location in Nigeria, and estimated delivery date by waybill ID (e.g., ABJ-88412).',
    input_schema: {
      type: 'object',
      properties: {
        waybill_id: {
          type: 'string',
          description: 'Waybill code formatted like ABJ-XXXXX or LOS-XXXXX'
        }
      },
      required: ['waybill_id']
    }
  }
]

async function executeLocalTool(name: string, input: Record<string, unknown>): Promise<string> {
  if (name === 'lookup_waybill_status') {
    const id = String(input.waybill_id).toUpperCase()
    // Simulated database/API lookup
    return JSON.stringify({
      waybill_id: id,
      origin: 'Victoria Island, Lagos',
      destination: 'Bwari, Abuja',
      current_hub: 'Gwagwalada Distribution Hub',
      status: 'IN_TRANSIT',
      eta: 'Tomorrow by 2:00 PM WAT'
    })
  }
  return JSON.stringify({ error: `Unknown tool: ${name}` })
}

export async function runLogisticsAgent(userPrompt: string): Promise<string> {
  const messages: Anthropic.MessageParam[] = [{ role: 'user', content: userPrompt }]
  const MAX_STEPS = 5

  for (let step = 0; step < MAX_STEPS; step++) {
    const response = await anthropic.messages.create({
      model: 'claude-sonnet-4-20250514',
      max_tokens: 1024,
      system:
        'You are a logistics support agent. Always call lookup_waybill_status before answering tracking questions; never guess shipment locations.',
      tools,
      messages
    })

    messages.push({ role: 'assistant', content: response.content })

    if (response.stop_reason !== 'tool_use') {
      const textBlock = response.content.find((b) => b.type === 'text')
      return textBlock?.type === 'text' ? textBlock.text : ''
    }

    const toolResults: Anthropic.ToolResultBlockParam[] = []
    for (const block of response.content) {
      if (block.type === 'tool_use') {
        const output = await executeLocalTool(
          block.name,
          block.input as Record<string, unknown>
        )
        toolResults.push({
          type: 'tool_result',
          tool_use_id: block.id,
          content: output
        })
      }
    }

    messages.push({ role: 'user', content: toolResults })
  }

  throw new Error('Agent exceeded maximum tool-calling iterations.')
}

IMPORTANT

Week 4 Project — Tool-Using Operations Assistant: Build a CLI/API agent equipped with 4 typed tools (database query, inventory check, shipping calculator, and ticket creator) featuring loop-cap protection, structured error recovery, and full step logs.

Week 5: Embeddings, Chunking Strategies & Vector Search (pgvector) (6 Lessons · 6 Hours) ​

  1. 01 — Semantic embeddings explained mathematically & practically: Dense vector representations, cosine similarity vs inner product, and choosing embedding dimensions (text-embedding-3-small / Voyage / Gemini embeddings).
  2. 02 — Document ingestion & structure-aware chunking: Why naive fixed-character slicing breaks tables and legal clauses; implementing Markdown-heading, recursive semantic, and contextual chunking with overlap.
  3. 03 — Setting up PostgreSQL + pgvector: Creating vector(1536) columns, HNSW indexes for sub-10ms approximate nearest-neighbour search, and relational metadata filters (paired with concepts from Node.js & Backend Dev).
  4. 04 — Managed vector stores — Pinecone & Supabase Vector: Comparing operational trade-offs between unified Postgres + pgvector and dedicated cloud vector databases.
  5. 05 — Metadata filtering & multi-tenant access control: Enforcing tenant isolation (WHERE org_id = $1) before or during vector retrieval so users never see another customer's private documents.
  6. 06 — Incremental re-indexing & content hashing: Using SHA-256 chunk hashes to update only modified pages without re-embedding entire repositories.

Week 6: Hybrid Search, Reranking & Cited Agentic RAG (6 Lessons · 6 Hours) ​

  1. 01 — Why pure vector search misses exact IDs, acronyms, and legal sections: Combining PostgreSQL Full-Text Search (tsvector / BM25) with pgvector semantic similarity using Reciprocal Rank Fusion (RRF).
  2. 02 — Cross-encoder reranking (Cohere Rerank / LLM rerankers): Boosting top-K precision before stuffing retrieved chunks into the prompt context.
  3. 03 — Agentic RAG vs static single-shot RAG: Giving the agent a search_knowledge_base tool so it can rewrite queries, decompose multi-part questions, and retrieve iteratively.
  4. 04 — Enforcing inline source citations & abstention: Structuring outputs so every factual statement cites [Doc ID, Section/Page] and explicitly states when evidence is absent.
  5. 05 — Measuring retrieval quality: Tracking Recall@K, Mean Reciprocal Rank (MRR), faithfulness, and answer relevance on a golden Q&A dataset.
  6. 06 — Handling tables, PDFs & scanned Nigerian policy/business documents: Parsing complex regulatory circulars, CBN/FIRS guidelines, and company handbooks cleanly into searchable Markdown.

IMPORTANT

Weeks 5–6 Milestone Project — Cited Hybrid-RAG Compliance & Policy Assistant: Index a realistic corpus of Nigerian business, HR, and regulatory policy documents into PostgreSQL + pgvector, implement hybrid keyword + vector search, and ship a Q&A service that returns verified answers with exact section citations and zero ungrounded claims.


Stage 03 · Model Context Protocol (MCP) Architecture ​

Duration: 3 Weeks (Weeks 7–9) · Level: Advanced · Prerequisite: Stage 2
Engineering standardized, secure MCP Servers and Clients using @modelcontextprotocol/sdk.

Stage 3 focuses on the Model Context Protocol (MCP) — the open specification that lets you write an integration once and plug it into Claude Desktop, Cursor, VS Code, or your own custom enterprise agent host.

Week 7: The MCP Specification — Hosts, Clients, Servers & Primitives (6 Lessons · 6 Hours) ​

  1. 01 — Why MCP exists — solving the M × N integration bottleneck: Understanding how JSON-RPC 2.0 capability negotiation decouples AI applications (Hosts/Clients) from data & tool providers (MCP Servers).
  2. 02 — The three core server primitives:
    • Resources: Read-only URI-addressable context (postgres://schema/orders, company://runbooks/incident-response) controlled by the application.
    • Prompts: Reusable, parameterised workflow slash-templates exposed by the server for user selection.
    • Tools: Executable model-invoked actions (query_read_only_sql, create_linear_issue) validated with zod.
  3. 03 — Connection lifecycle & capability negotiation: Initialisation handshakes, protocol versioning, dynamic tool-list notifications, and graceful shutdown.
  4. 04 — Inspecting & debugging with the official MCP Inspector: Testing resources, prompts, and tool schemas visually before connecting an LLM host.
  5. 05 — Connecting custom servers to Claude Desktop, Cursor & VS Code: Writing host configuration files and troubleshooting environment isolation.
  6. 06 — Designing clean domain boundaries for MCP servers: Avoiding bloated 50-tool servers that pollute context windows and degrade tool-selection accuracy.

Week 8: Building Custom MCP Servers in TypeScript (@modelcontextprotocol/sdk) (6 Lessons · 7 Hours) ​

  1. 01 — Scaffolding a production TypeScript MCP server: Project layout, @modelcontextprotocol/sdk, zod input validation, and structured isError responses.
  2. 02 — Exposing database schemas as MCP Resources & safe query Tools: Connecting PostgreSQL/Prisma with read-only database roles and row-count ceilings.
  3. 03 — Wrapping external REST APIs (GitHub, Paystack, Slack, CRM) as MCP Tools: Translating verbose third-party JSON payloads into compact, token-efficient Markdown/JSON summaries for the model.
  4. 04 — Authoring MCP Prompt templates for recurring engineering workflows: Packaging PR review, incident triage, and customer account audit prompts directly inside the server.
  5. 05 — Pagination, resource subscriptions & large-output truncation: Preventing a single tool response from overflowing the host model's context window.
  6. 06 — Automated unit & integration testing for MCP servers: Driving your server programmatically with an in-memory Client transport inside Vitest.

Complete Working TypeScript MCP Server Example (@modelcontextprotocol/sdk) ​

typescript
import { McpServer, ResourceTemplate } from '@modelcontextprotocol/sdk/server/mcp.js'
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
import { z } from 'zod'

// Initialize a typed Tech Minds Operations MCP Server
const server = new McpServer({
  name: 'techminds-sme-ops-mcp',
  version: '1.0.0'
})

// Simulated read-only ledger store (replace with PostgreSQL / Prisma in your project)
const ACCOUNTS: Record<string, { company: string; plan: string; balanceNgn: number; active: boolean }> = {
  'ACC-101': { company: 'Zuma Solar Abuja Ltd', plan: 'Enterprise', balanceNgn: 1_450_000, active: true },
  'ACC-102': { company: 'Kano Agro Logistics', plan: 'Growth', balanceNgn: 320_000, active: true }
}

// 1. Expose a URI-addressable MCP Resource: account://{accountId}
server.resource(
  'customer-account',
  new ResourceTemplate('account://{accountId}', { list: undefined }),
  async (uri, { accountId }) => {
    const id = String(accountId).toUpperCase()
    const record = ACCOUNTS[id]
    if (!record) {
      throw new Error(`Account ${id} not found`)
    }
    return {
      contents: [
        {
          uri: uri.href,
          mimeType: 'application/json',
          text: JSON.stringify({ accountId: id, ...record }, null, 2)
        }
      ]
    }
  }
)

// 2. Expose a Zod-validated MCP Tool for safe invoice simulation
server.tool(
  'calculate_enterprise_quote',
  'Calculate a Naira (NGN) subscription quote including 7.5% VAT and volume discounts.',
  {
    seats: z.number().int().min(1).max(500).describe('Number of team seats requested'),
    billingCycle: z.enum(['monthly', 'annual']).describe('Annual billing grants a 15% discount')
  },
  async ({ seats, billingCycle }) => {
    const basePerSeatMonthly = 25_000
    const months = billingCycle === 'annual' ? 12 : 1
    const discountRate = billingCycle === 'annual' ? 0.15 : 0
    const gross = seats * basePerSeatMonthly * months
    const subtotal = Math.round(gross * (1 - discountRate))
    const vat = Math.round(subtotal * 0.075)
    const totalNgn = subtotal + vat

    return {
      content: [
        {
          type: 'text',
          text: JSON.stringify({ seats, billingCycle, subtotal, vat, totalNgn, currency: 'NGN' })
        }
      ]
    }
  }
)

// 3. Connect via stdio transport (compatible with Claude Desktop, Cursor & MCP Inspector)
async function main() {
  const transport = new StdioServerTransport()
  await server.connect(transport)
  console.error('Tech Minds SME Ops MCP Server running on stdio')
}

main().catch((err) => {
  console.error('Fatal MCP Server error:', err)
  process.exit(1)
})

Week 9: Remote MCP Transports (Streamable HTTP), Auth & Human-in-the-Loop (6 Lessons · 6 Hours) ​

  1. 01 — Local stdio vs Remote Streamable HTTP transports: When to run MCP as a local subprocess vs deploying a shared multi-user HTTP MCP service in the cloud.
  2. 02 — OAuth 2.1, Bearer tokens & scoped permissions in remote MCP: Authenticating user identity so tool calls enforce least-privilege access per user.
  3. 03 — Human-in-the-Loop (HITL) approval gates: Requiring explicit cryptographic or UI confirmation before executing destructive or financial tools (delete_record, transfer_funds, publish_release).
  4. 04 — Defending against MCP tool poisoning & rug-pull attacks: Auditing third-party MCP servers, pinning versions, and sanitising untrusted tool outputs.
  5. 05 — Building a custom MCP Client inside your own Node.js backend: Connecting your web application's agent loop to multiple MCP servers simultaneously.
  6. 06 — Containerising and deploying remote MCP servers: Packaging TypeScript MCP servers with Docker and health checks.

IMPORTANT

Weeks 7–9 Milestone Project — Production Custom MCP Server & Client Host: Build, test with Vitest + MCP Inspector, and document a custom TypeScript MCP Server exposing Resources, Prompts, and Tools over PostgreSQL + an external API (e.g., GitHub, Paystack test mode, or Linear), complete with read/write permission scopes and Human-in-the-Loop confirmation for state-changing actions.


Stage 04 · Multi-Agent Workflows, Memory & Guardrails ​

Duration: 4 Weeks (Weeks 10–13) · Level: Advanced · Prerequisite: Stage 3
Composable multi-agent architectures, durable memory, adversarial defence, and automated Eval Suites.

Week 10: Composable Agent Patterns — Routers, Planners & Parallel Workers (6 Lessons · 6 Hours) ​

  1. 01 — Composable workflows before heavyweight frameworks: Mastering Anthropic's five core building blocks — Prompt Chaining, Routing, Parallelisation, Orchestrator-Workers, and Evaluator-Optimizer — in clean TypeScript before evaluating LangGraph, Mastra, or Vercel AI SDK.
  2. 02 — Intent Routers: Classifying incoming requests with fast lightweight models and dispatching to specialized narrow agents with minimal toolsets.
  3. 03 — Orchestrator-Worker (Planner-Executor) architecture: Breaking complex software or research tasks into dynamic sub-tasks executed in parallel worker contexts.
  4. 04 — Evaluator-Optimizer loops: Pairing a Generator agent with an independent Rubric Critic agent that rejects outputs failing quality or compliance checks.
  5. 05 — Preventing infinite agent ping-pong & context explosion: Passing structured handoff artefacts instead of dumping entire raw message histories between sub-agents.
  6. 06 — Comparing TypeScript agent SDKs (Vercel AI SDK, LangGraph.js, OpenAI Agents SDK): Choosing the right abstraction level for long-term maintainability.

IMPORTANT

Week 10 Project — Parallel Research & Verification Swarm: Build an Orchestrator-Worker system that decomposes a complex due-diligence query into 3 parallel worker investigations, reconciles contradictions, and passes an Evaluator critique gate before returning an executive brief.

Week 11: Short-Term State, Episodic Memory & Durable Checkpoints (6 Lessons · 6 Hours) ​

  1. 01 — Conversation state vs long-term memory: Distinguishing active thread messages, rolling context compaction/summarisation, user profile facts, and episodic task history.
  2. 02 — Context window compaction strategies: Summarising older turns while preserving exact IDs, tool outputs, and unresolved constraints.
  3. 03 — Persisting agent threads & checkpoints in PostgreSQL / Redis: Resuming interrupted multi-step workflows across HTTP requests, browser refreshes, or server restarts.
  4. 04 — Extracting & updating structured user/account memories safely: Letting agents remember preferences without storing sensitive PII or hallucinated assumptions permanently.
  5. 05 — Resumable Human-in-the-Loop state machines: Pausing an agent thread in AWAITING_APPROVAL status in Postgres and resuming execution days later when a manager clicks "Approve".
  6. 06 — Memory expiration, GDPR/NDPA privacy & right-to-erasure: Designing clean tenant and user memory deletion routines aligned with the Nigeria Data Protection Act (NDPA).

IMPORTANT

Week 11 Project — Stateful Resumable Agent Backend: Engineer a Postgres-backed agent runner supporting persistent threads, automatic context compaction past token thresholds, and pause/resume Human-in-the-Loop approval checkpoints.

Week 12: AI Security, Prompt Injection Defence & Guardrails (6 Lessons · 6 Hours) ​

  1. 01 — Direct vs Indirect Prompt Injection: How untrusted text hidden inside emails, PDFs, web pages, or database rows attempts to hijack an agent's instructions and exfiltrate data.
  2. 02 — Architectural privilege separation (The Lethal Trifecta defence): Why an agent that simultaneously accesses private data, processes untrusted input, and can communicate externally requires strict deterministic policy boundaries.
  3. 03 — Input & Output Guardrails: Running fast pre-flight classifiers, PII redaction filters, topic-boundary checks, and output link/exfiltration validators in parallel with the main model.
  4. 04 — Enforcing deterministic authorization outside the prompt: Verifying userId / tenantId ownership inside every tool function — never trusting the LLM to enforce access control via system prompt politeness.
  5. 05 — Rate limiting, abuse detection & anomaly kill-switches: Protecting public AI endpoints from wallet-draining bot attacks (connecting directly with practices in Cyber Security & SOC Ops).
  6. 06 — Red-teaming your own agent: Running a structured adversarial test suite of 25 jailbreak, indirect-injection, and unauthorised tool-invocation payloads.

IMPORTANT

Week 12 Project — Red-Team Hardening & Guardrail Middleware: Wrap an existing tool-using agent with deterministic authorization checks, PII redaction, and an indirect-prompt-injection guardrail suite, documenting pass/block metrics across 25 adversarial test attacks.

Week 13: Automated Eval Suites, LLM-as-a-Judge & Tracing (6 Lessons · 7 Hours) ​

  1. 01 — Eval-Driven Development (EDD): Why changing a single word in a system prompt or swapping models requires running an automated benchmark before merging a pull request.
  2. 02 — Building a Golden Dataset: Curating 30–100 representative real-world inputs covering happy paths, multi-step tool calls, ambiguous requests, and adversarial traps.
  3. 03 — Deterministic code graders vs LLM-as-a-Judge: Using exact assertions for tool calls, JSON fields, and citations first, and calibrated pairwise/rubric LLM judges for open-ended quality.
  4. 04 — Calibrating LLM judges against human experts: Avoiding verbosity bias, self-preference bias, and vague 1–10 scales (using binary PASS/FAIL criteria instead).
  5. 05 — End-to-end distributed tracing (OpenTelemetry / Langfuse / Braintrust): Inspecting nested spans across routers, embeddings, rerankers, MCP tool calls, and token usage.
  6. 06 — Wiring Evals into GitHub Actions CI: Blocking regressions automatically whenever accuracy drops below threshold or latency/cost spikes.

Runnable TypeScript Example — Automated Eval Runner with Deterministic + Rubric Checks ​

typescript
export interface EvalCase {
  id: string
  input: string
  expectedTool?: string
  mustIncludeSubstring?: string
}

export interface EvalResult {
  id: string
  passed: boolean
  latencyMs: number
  reasons: string[]
}

export async function runDeterministicEvalSuite(
  cases: EvalCase[],
  agentFn: (prompt: string) => Promise<{ answer: string; toolsCalled: string[] }>
): Promise<{ passRate: number; results: EvalResult[] }> {
  const results: EvalResult[] = []

  for (const testCase of cases) {
    const start = performance.now()
    const { answer, toolsCalled } = await agentFn(testCase.input)
    const latencyMs = Math.round(performance.now() - start)
    const reasons: string[] = []

    if (testCase.expectedTool && !toolsCalled.includes(testCase.expectedTool)) {
      reasons.push(
        `Expected tool "${testCase.expectedTool}" but agent called [${toolsCalled.join(', ')}]`
      )
    }

    if (
      testCase.mustIncludeSubstring &&
      !answer.toLowerCase().includes(testCase.mustIncludeSubstring.toLowerCase())
    ) {
      reasons.push(`Answer missing required ground-truth fact: "${testCase.mustIncludeSubstring}"`)
    }

    results.push({
      id: testCase.id,
      passed: reasons.length === 0,
      latencyMs,
      reasons
    })
  }

  const passedCount = results.filter((r) => r.passed).length
  return {
    passRate: Number(((passedCount / cases.length) * 100).toFixed(1)),
    results
  }
}

IMPORTANT

Week 13 Project — Automated Agent Eval & Trace Benchmark: Create a 30-case golden evaluation dataset combining deterministic tool-selection assertions, citation faithfulness checks, and binary LLM-as-a-judge rubrics that outputs a clean scorecard report in CI.


Stage 05 · Production Full-Stack AI Systems & Capstone ​

Duration: 3 Weeks (Weeks 14–16) · Level: Production · Prerequisite: Stage 4
Streaming generative React UIs, background durable execution, observability, and your flagship Capstone launch.

Week 14: Streaming Agent UIs in React & Next.js (6 Lessons · 6 Hours) ​

  1. 01 — Designing trustworthy AI UX beyond plain chat boxes: Surfacing live tool-execution steps ("Searching policy handbook...", "Checking invoice #1042..."), expandable source citation cards, and inline approval buttons.
  2. 02 — Streaming tokens & structured UI states to React: Using Server-Sent Events / Vercel AI SDK useChat & data streams to render incremental Markdown, tables, and interactive widgets smoothly (building on React.js Mastery).
  3. 03 — Optimistic UI, stop/cancel controls & retry UX: Handling network drops on mobile connections gracefully with AbortController and resumable stream IDs.
  4. 04 — Rendering Human-in-the-Loop confirmation cards: Letting users inspect, edit parameters, approve, or reject proposed agent actions directly inside the frontend.
  5. 05 — Inline feedback loops (👍 / 👎 + trace capture): Turning real production user feedback directly into new regression test cases for your Week 13 eval suite.
  6. 06 — Accessibility & latency perception in AI interfaces: Skeleton states, progressive disclosure, and keyboard-accessible artifact panels.

IMPORTANT

Week 14 Project — Full-Stack Streaming Agent Workspace UI: Build a React / Next.js frontend that streams real-time reasoning/tool status pills, interactive source citations, and Human-in-the-Loop approval cards connected to your stateful backend.

Week 15: Background Agents, Observability & Production Deployment (6 Lessons · 6 Hours) ​

  1. 01 — Long-running background agents & queues: Offloading 2-to-10-minute deep research, batch document processing, and webhook-triggered workflows to BullMQ / Redis or durable workers.
  2. 02 — Webhook-driven autonomous workflows: Triggering background agents safely from GitHub PR events, Paystack webhooks, or support inbox events with idempotency keys.
  3. 03 — Production observability dashboards: Monitoring daily token burn, cache hit ratio, tool error rates, guardrail blocks, and p95 latency per tenant.
  4. 04 — Multi-tenant authentication, quotas & billing tiers: Enforcing JWT/session auth, per-organisation rate limits, and graceful quota exhaustion UX.
  5. 05 — Containerisation, secrets management & cloud deployment: Deploying frontend, backend API, MCP server, and PostgreSQL + pgvector cleanly to Railway, Render, Fly.io, or AWS (aligned with Cloud Computing & DevOps).
  6. 06 — Incident runbooks & model-upgrade playbooks: Rolling out new frontier model versions behind feature flags validated by your automated eval suite.

Week 16: Production Agentic Capstone Defence (6 Sessions · 12 Hours) ​

  1. 01 — Problem scoping & system architecture specification: Defining target users, agent capabilities, non-goals, threat model, and cost budget per task.
  2. 02 — Custom MCP Server & RAG/Data Layer implementation: Connecting real structured data + cited knowledge retrieval.
  3. 03 — Agent orchestration, guardrails & HITL approvals: Implementing deterministic authorization and adversarial defences.
  4. 04 — Streaming React frontend & UX polish: Shipping a responsive, transparent interface showing live tool execution and citations.
  5. 05 — Golden Eval Benchmark & Red-Team Verification: Running a minimum 30-case automated evaluation suite + prompt-injection audit.
  6. 06 — Cloud Deployment, Architecture Docs & Live Cohort Demo: Presenting the live URL, telemetry dashboard, eval scorecard, and codebase before the Tech Minds engineering panel.

IMPORTANT

Week 16 Production Agentic Capstone: Ship a deployed, full-stack AI agent software product featuring (1) a streaming React/Next.js UI, (2) a custom TypeScript MCP Server, (3) grounded RAG or live relational database tools with Human-in-the-Loop approvals, and (4) an automated 30+ case Eval Benchmark Suite. Example capstone tracks include:

  • Autonomous Engineering PR & Incident Triage Copilot (connects GitHub + logs + runbooks via MCP)
  • Cited Nigerian Tax, Regulatory & Contract Compliance Analyst (hybrid pgvector RAG + structured audit export)
  • Multi-Channel SME Operations & Order Resolution Agent (Postgres inventory + Paystack/logistics lookups + manager refund approval gate)
  • Automated Recruitment & Technical Portfolio Evaluator (structured rubric grading + candidate briefing pipeline)

Assessment & Completion ​

ComponentDescriptionWeight
Weekly & Milestone Projects (×10)Typed LLM gateways, zod extractors, tool loops, pgvector RAG, custom MCP server, stateful memory, guardrail middleware, eval suite, and streaming UI pushed to GitHub40%
Stage Assessments (×5)Live architectural code reviews, MCP debugging labs, and security/eval practical challenges at the close of each stage30%
Production Agentic CapstoneDeployed full-stack AI agent system + custom MCP server + automated evaluation benchmark + live architecture defence30%

Learning Outcomes — What You Can Do on Completion ​

On graduating from Agentic Software Engineering & MCP, you will be able to:

  • Architect AI-native TypeScript/Node.js backends across OpenAI, Anthropic Claude, and Google Gemini SDKs with automatic retries, fallbacks, and prompt caching.
  • Guarantee schema-valid outputs using zod and track exact per-tenant token latency and cost economics.
  • Build reliable multi-step tool-calling loops with idempotent execution, sandboxing, and structured error recovery.
  • Engineer hybrid keyword + pgvector Retrieval-Augmented Generation (RAG) systems that return verifiable inline citations and abstain when ungrounded.
  • Design, build, test, and secure custom Model Context Protocol (MCP) servers (stdio and Streamable HTTP) using @modelcontextprotocol/sdk.
  • Implement composable multi-agent patterns (Routers, Orchestrator-Workers, Evaluator-Optimizers) backed by persistent PostgreSQL thread checkpoints and Human-in-the-Loop approvals.
  • Defend production AI systems against direct and indirect prompt injection, PII leaks, and unauthorised tool execution.
  • Build automated Eval Suites combining deterministic assertions, LLM-as-a-judge rubrics, and OpenTelemetry/Langfuse distributed traces in CI.
  • Deploy full-stack streaming React/Next.js agent applications ready for real users and engineering hiring interviews.

Tools & Resources — Everything You Need ​

Tool / StackPurpose in the CurriculumCost Tier
TypeScript 5+ & Node.js 22+Primary runtime and type system for agent loops, APIs, and MCP serversFree / Open Source
OpenAI, Anthropic & Google GenAI SDKsOfficial frontier model SDKs for tool use, structured outputs, and reasoningPay-as-you-go API credits
@modelcontextprotocol/sdk & InspectorOfficial SDK and visual debugger for building custom MCP Servers & ClientsFree / Open Source
zodRuntime schema validation for structured outputs and MCP tool inputsFree / Open Source
PostgreSQL + pgvectorUnified relational store for persistent agent state, checkpoints, and vector searchFree (Docker / Neon / Supabase free tier)
React / Next.js + Vercel AI SDKStreaming generative UI components, SSE transport, and HITL approval cardsFree / Open Source
Vitest + Langfuse / OpenTelemetryAutomated evaluation test runner, golden datasets, and end-to-end agent tracingFree / Open-source self-host
VS Code / Cursor / Claude CodeSpec-driven AI-assisted engineering workflowFree / Pro tiers

G5 Plaza (Before AEDC Office, Sabon-Gari Road), Bwari, Abuja, Nigeria · info@techmindsacademy.org · (+234) 814 732 8332