The Language of Agents Is Modal and Epistemic Logic
Modal and epistemic logic are the formal languages agents use to reason about what is possible, what is necessary, and what is known. If you want to understand how AI agents represent knowledge, uncertainty, and belief — this is the mathematical foundation.
This interactive tutorial covers:
- Propositional modal logic — the operators □ (necessarily) and ◇ (possibly), Kripke semantics, accessibility relations
- Epistemic logic — formalizing knowledge (K) and belief (B) for single and multiple agents
- Common knowledge — what it means for a fact to be known by all agents, and why it matters for coordination
- Applications to AI agents — how these formalisms underlie planning, multi-agent systems, and reasoning under uncertainty
The tutorial is a self-contained interactive HTML file that runs entirely in your browser — no install required.
Source and earlier revisions on GitHub.