02 / Programme
AI Engineering with Python
Build working AI systems in Python — agents, retrieval, and the production concerns that decide whether a prototype can leave the lab.
3 days · Up to 12 participants · On-site or remote · From £10,000
Who it is for
Software engineers and technical leads who will design, integrate and own LLM systems.
Who it is not
This is not an executive overview, and it is not a survey of products. Delegates write, test and run code.
What they will be able to do
- 01
Call, stream and constrain an LLM from Python, with prompts and structured outputs that can be tested.
- 02
Build a tool-calling agent with a registry, allowlists, rate limits, audit logs and an evaluation harness.
- 03
Stand up MCP servers and wire them into an agent over stdio, including live tools and structured data.
- 04
Index a corpus, retrieve with citations, and compare dense, sparse, hybrid and reranked search.
- 05
Extract facts into a graph, add memory with decay, and run ReAct and plan-and-execute loops.
- 06
Take a system toward production: tracing, retries, cost controls, guardrails, and a deployable FastAPI service.
Outline
Day 01
Build a working agent
- 00
Python fundamentals
The engineering substrate the rest of the week sits on: dataclasses and Protocols, CLI and logging, asyncio (tasks, queues, timeouts, cancellation), then HTTP with FastAPI and httpx.
- 01
Working with the LLM
Chat completions, message roles and parameters; token streaming; prompting for structured outputs, grounding and tool calling; a console chat with session storage.
- 02
Tool calling
Tool-call message format and agent state. A decorator-based registry (schema, validation, routing, errors). Safety rails: allowlists, rate limits, redaction, audit logs. An evaluation harness with golden tests, replay and deterministic mocks.
- 03
MCP servers
MCP as a protocol: tool discovery, schemas, calling conventions. FastMCP servers over stdio, dynamic discovery, and practical tools — structured data, web fetch, file I/O — connected to a live agent.
- 04
A research assistant
Day 1 closer. Model selection, structured outputs, multimodal (vision and transcription), FastAPI with SSE streaming, and MCP tools inside a web API. The agent leaves the console.
Day 02
Knowledge and retrieval
- 05
RAG fundamentals
Chunking (size, overlap, structure-aware), embeddings, vector stores. Dense, sparse, hybrid retrieval and reranking. Grounded prompting with citations, a comparison with and without retrieval, RAG evaluation, then the same index exposed as an MCP server.
- 06
Structured facts
Pydantic and JSON Schema structured outputs. Fact extraction with provenance and confidence. Knowledge graphs: entities, relations, path queries. Grounded QA that must cite [Fact N] or refuse.
- 07
Agent memory
Short-term session buffer versus long-term profile. Summarisation against a token budget. Decay and “do not remember”. Memory exposed as an MCP server so the agent can read and write it as a tool.
- 08
Structured workflows
Day 2 closer. ReAct (reason, act, observe), plan-and-execute with replanning, tool routing, and structured execution traces — workflows as software, not a prompt that hopes the next step will work.
Day 03
Ship it
- 09
Multi-agent systems
When multiple agents help, and when they add failure modes. Roles (router, specialist, critic). Coordination: supervisor, swarm, debate, blackboard. Shared context, scoped tools, peer handoffs, consensus and conflict.
- 10
LangChain, as a choice
LCEL, prompt templates, output parsers, AgentExecutor, RetrievalQA, LangServe. The same loops already written by hand, now in a framework — so participants can judge the abstraction rather than start inside it.
- 11
Edge topics
Pick-and-choose, according to the group: hybrid search, reranking, HyDE, agentic RAG, citation verification, web-search backends, text-to-SQL, LLM evaluation, fine-tuning datasets, guardrails, semantic caching, multimodal RAG, contextual chunking.
- 12
Productionisation
Tracing, retries, circuit breakers, cost controls, deployment. Capstone: a production FastAPI backend for a real interface — RAG with hybrid search and reranking, agentic RAG with tools, or chat + MCP with cost controls.
How it is taught
Live engineering education. Delegates work in a Python lab with pytest on every exercise. Demonstrations are run, not presented as slides. The programme can be tailored to your organisation’s stack; the spine stays the same.
Delivery and price
From £10,000 for up to 12 participants, on-site or remote. Talk to us to confirm dates, location, and any tailoring.
Instructor
Nicholas Johnson, AI architect and software engineer. He has a degree in Artificial Intelligence and around twenty years of professional technology training. About.