Agentic Software Engineering
Agentic software engineering is the craft of building reliable software around large language models that plan, call tools and act, and of using such agents to build software. This site shares the slides, notes and labs I teach in Building Usable Software (BUS), a University of Birmingham module offered in the January term, with anyone who wants to learn.
BUS students
The same slides and labs are on Canvas, together with quizzes and assessment details, which are not published here.
Everyone else
The topics build on each other, so start from the top if the subject is new to you. Basic Python is enough; no machine-learning background is assumed.
Contents
Topics are linked as the slides are finalised during the term. "Soon" marks material not yet published.
| # | Topic | Sub-topics | Slides | Notes |
|---|---|---|---|---|
| Part I · Foundations | ||||
| 1 | Introduction to agentic engineering | From vibe coding to agentic engineering · from a model to a system · the parts of an agent · workflows vs agents · the capability–reliability gap · the running example | Soon | Soon |
| 2 | Large language models for engineers | Tokens and generation · sampling · the Transformer and attention · the context window · training: pretraining to assistant, reasoning and tool use · inference cost and the KV cache · reasoning models · large and small models · hallucination | Soon | Soon |
| 3 | APIs for software and agents | Clients, servers and resources · HTTP · REST principles · methods and idempotency · status codes · authentication · designing REST APIs · OpenAPI · the model as a web API · stateless conversations | Soon | Soon |
| 4 | Prompt engineering | Instructions, roles and system prompts · zero-shot and few-shot · chain of thought and its cost · self-consistency and self-checking · decomposition and chaining · prompt optimisation and DSPy · background context · structured output and constrained decoding | Soon | Soon |
| Lab | Lab: Setting up Ollama and prompt engineering | Running a small open model with Ollama in Colab · prompt engineering in practice | Lab sheet: Soon | |
| 5 | Retrieval-augmented generation | Why retrieval · chunking · embeddings and similarity · storing and searching · grounded prompts · tracing failures · hit rate · keyword and hybrid search · re-ranking and filters · limits and security | Soon | Soon |
| Lab | Lab: Retrieval-augmented generation | Building a RAG pipeline over TuneFinder's song notes · measuring retrieval | Lab sheet: Soon | |
| Part II · Building agents | ||||
| 6 | Complex tasks | What makes a task complex · limits of one prompt · accuracy as tasks grow · splitting into subtasks | Soon | Soon |
| 7 | Workflow patterns | Systems as graphs: state and transitions · prompt chaining · routing · parallelisation · orchestrator–workers · evaluator–optimiser · plan-and-execute · choosing a pattern | Soon | Soon |
| 8 | Tools, the agent loop and MCP | Why tools · function calling step by step · how models choose tools · small models and tools · the agent loop and ReAct · designing robust tools · errors, retries and fallbacks · the Model Context Protocol · MCP security | Soon | Soon |
| 9 | Workflows or agents? | The agent loop as a graph · planning first vs step by step · when to use each · token cost and autonomy · token-budget-aware development | Soon | Soon |
| Lab | Lab: Agents | Building and running an agent with tools | Lab sheet: Soon | |
| Part III · Running agentic systems | ||||
| 10 | Context engineering and memory | Where tokens go · prompt caching · compaction · agentic RAG · Agent Skills and progressive disclosure · short- and long-term memory · writing, reading and forgetting · memory vs RAG | Soon | Soon |
| 11 | Multiple agents and A2A | One agent or several · evidence for and against · topologies · how multi-agent systems fail · design rules · the Agent-to-Agent protocol: agent cards, tasks, risks · MCP vs A2A | Soon | Soon |
| 12 | Observability and human oversight | Traces and spans · OpenTelemetry · failure signatures · replay · metrics across traces · privacy of traces · where to place a person · pausing and resuming · the cost of asking | Soon | Soon |
| 13 | Building a harness | What a harness is · the agent–computer interface · a minimal coding-agent harness · tool and context layers · memory across sessions · permissions and sandboxes · checks the harness runs | Soon | Soon |
| Part IV · Building software with agents | ||||
| 14 | Coding agents | Measuring coding agents · localise, edit, verify · agent or fixed workflow · context quality · plan before code · instruction files · checks that steer the agent · reviewable pull requests | Soon | Soon |
| 15 | The life cycle and specifications | The life cycle with agents · what the evidence says · why specs · user stories, EARS, Given/When/Then, ADRs · spec to plan to tasks · spec to tests | Soon | Soon |
| 16 | Designing maintainable software | Maintainability of agent-written code · design patterns: Singleton, Adapter, Decorator, Observer, publish–subscribe · patterns in the spec · limits | Soon | Soon |
| 17 | Safety and guardrails | What can go wrong · threat models · prompt injection and the lethal trifecta · limiting what agents can do · guardrail layers · testing safety | Soon | Soon |
| Part V · Quality assurance | ||||
| 18 | Software testing | Software quality · test scenarios and cases · levels and types · equivalence partitioning and boundary values · coverage · test plans · automation with pytest · test doubles | Soon | Soon |
| Lab | Lab: Testing with pytest | Writing and running tests with pytest | Lab sheet: Soon | |
| 19 | Testing agentic systems | Why classic tests break · testing the code around the model · golden sets and graders · LLM judges · trajectory evaluation and pass^k · adversarial evaluation · evals in CI | Soon | Soon |
| 20 | Testing with agents | Agents that write tests · agents as fuzzers · reviewing AI-written tests · mutation and property-based testing | Soon | Soon |
| Planned | ||||
| — | Responsible AI | Accountability for agent-written code · over-reliance · licence and provenance · regulation | Soon | Soon |
| — | Case study: computer-use agents | Agents that operate graphical interfaces | Soon | Soon |
The running example
Most topics return to TuneFinder, a music assistant that turns a request such as "something upbeat from the eighties" into a song search and plays the result. It grows from a single model call into a system with retrieval, tools, several agents, monitoring and tests.
Labs and tools
Labs run in Google Colab with small open models (1 billion parameters or fewer) served by Ollama, so no paid API key is needed; the same code runs against hosted models. Libraries include LangChain, LangGraph, Chroma, FastMCP and pytest.
Updates
- 1 December 2026: site created with the topic structure.
Get involved
If you are interested in these topics, feel free to contact me. I am always looking for collaborators who can contribute, suggest new topics and edit the materials.