lingo — The Book
A literate-programming guide to lingo, a Python library for context engineering.
Every code block in this book is executable. Run make book to compile and verify the full guide.
What lingo is
lingo is a library for building LLM-powered applications.
Its core idea is that conversations are structured as typed messages inside a mutable Context,
operations on that context are performed by an Engine that wraps an LLM,
and the sequence of operations is described as a composable Flow.
The top-level Lingo class is the chatbot facade: it owns a conversation history,
builds flows from skills, and exposes a single .chat(msg) coroutine.
Chapters
- Hello, lingo — LLM, Message, and your first chatbot
- Messages and Context — Multimodal content, context manipulation
- The Engine — reply, decide, choose, create, ask
- Flows — Declarative, chainable workflows
- Tools — Functions as LLM-callable tools
- Skills and Routing — Multi-skill bots
- State — Conversation state with atomic semantics
- Patterns — End-to-end examples