This course is about enhancing safety of multi-agent systems in which agents may use LLMs.
AI has changed computer science and many aspects of life. When you leave Caltech you are going to help determine the safety of multi-agent systems at this critical time. You are here to think for yourselves, explore, and prepare for a changing world in which safety and resilience will be critical.
Build a multi-agent application in an area that interests you. Talk to people for whom you build applications. Consider building your application for people outside computer science - your family, biologists, economists, humanists.
Submit a short proposal after the first week; turn in a progress report later in the term, and turn in a final report and make a presentation at the end of term.
Look at:Alongside your application, describe how your application could be attacked and safety features of the application.
The course uses a distributed systems framework called DisSysLab designed specifically for teaching distributed systems algorithms. Install it on your computer and set up an API key for the LLM you want to use. You can also build applications using any framework you like, such as Claude Code, OpenAI, or OpenRouter.
Allow about an hour to install the software and work through the setup guide on your computer.
Read the following:
The classes follow these notes.
The micro-course: the office file, roles, contracts, routers and coordinators, guards and sinks, choosing models, and what to expect of them: nondeterminism, hallucination, cost, and what gets recorded.
Contracts, refusals, guards and dsl check are in the
micro-course; Lab 1 puts them to work.
Safety question. What happens when one agent is talked into something? In Lab 1 a customer's message makes a salesperson agree to sell a car for a dollar, and you build the guard that stops it.
Timeline diagrams, computations, interleaving of agent computations, sequential execution of actions.
Safety question. When something goes wrong, can we record a consistent state of the whole system, and go back to it?
Logical clocks, snapshots at a logical time, vector clocks, termination detection and deadlock detection.
Three detectives, one piece of evidence each, and a shared whiteboard. No detective can solve the case alone. The class covers:
Safety question. If one agent is wrong, how far does its mistake spread?
The lab: the cake room. Run the detectives, read the board note by note, find where each one first names Cal, run it again and compare. Then build a whiteboard team of your own.
Safety question. How do we say exactly what must always hold, and what must eventually happen?
Safety question. How do we prove it? Safety properties (nothing bad ever happens) and progress properties (something good eventually happens), and proofs that rely on each agent keeping its contract.
“Agent X knows P”: a formal definition of knowledge. Using agent knowledge in determining message flows.
Consensus: agents propose values and agents must collectively agree on a single consensus value. Requirements of validity, agreement and termination. Why no deterministic algorithm can guarantee all three if even one agent may halt — the FLP theorem.
Agents made in plain English with Claude Code, on two small problems. The course staff run them and keep every trace; you read the agents, predict, and check the traces.
Safety question. When an agent with tools is given a goal it cannot reach honestly, what does it do, and what stops it?
Hash functions, commitments, search puzzles, block chains, Merkle trees and digital signatures.
Goofycoin, Scroogecoin and the double-spending problem; then consensus without a trusted party: proof of work, the longest chain, incentives and attacks, and how Bitcoin is engineered.
Two agents cannot use an indivisible resource at the same time. Algorithms that guarantee that no agent waits for a resource for ever.
Agents compete for indivisible resources such as write-access to files. Algorithms that share resources fairly.
Not a class: the term has 19. For students who want to go further.
When an agent hands a task to other agents, which hand it on again, how does the first agent learn that everything it started has stopped?