# Axle > A small, focused TypeScript library for building multi-turn LLM agents. Axle is a library, not a framework: you construct an `Agent` and call `send()`. It owns no state of yours — sessions are serializable objects and the transcript is yours to fold and store. Verify any API claim against the version in your own `package.json`; the surface changed at 0.33, 0.35 and 0.36, and the Upgrading page lists every rename. ## Getting Started - [Introduction](https://axle.fifthrevision.com/): What Axle is, why it exists, and how these docs are organized. - [Installation](https://axle.fifthrevision.com/getting-started/installation): Install Axle and point it at a provider. - [Quick Start](https://axle.fifthrevision.com/getting-started/quick-start): A working agent, a tool loop, and structured output in a few minutes. ## Agent - [Agent](https://axle.fifthrevision.com/concepts/agent): The interface you'll use most — scheduling, interruption, and what it owns. - [Anatomy of a send](https://axle.fifthrevision.com/concepts/anatomy-of-a-send): Messages, steps, and turns — the three words the rest of the docs lean on. - [Turns & Transcripts](https://axle.fifthrevision.com/concepts/transcripts): The render-layer unit, and the container that accumulates it. Axle emits them; you keep them. - [Turn events](https://axle.fifthrevision.com/concepts/turn-events): The event stream an Agent emits — render-shaped, and best consumed by a Transcript. - [Continuations](https://axle.fifthrevision.com/concepts/continuations): Running follow-up turns after a send settles, without leaving the queue. - [Sessions & persistence](https://axle.fifthrevision.com/concepts/sessions): Saving a conversation, bringing it back, and what's deliberately left out. - [Remote agents](https://axle.fifthrevision.com/concepts/remote-agents): Driving an agent served elsewhere — an event store on its side, a RemoteAgent on yours. - [Compaction](https://axle.fifthrevision.com/concepts/compaction): Trading a long conversation for a shorter one, without losing what the reader sees. - [Skills](https://axle.fifthrevision.com/concepts/skills): On-demand instructions the model loads itself — the catalog, view-skill, and live updates. - [Analyzing a conversation](https://axle.fifthrevision.com/concepts/analyze): Reading stored turns with analyze() — segments, predicates, and simplifying helpers. ## Primitives - [generate() & stream()](https://axle.fifthrevision.com/concepts/generate-and-stream): The tool loop, without the conversation management. - [Stream events](https://axle.fifthrevision.com/concepts/stream-events): The event stream the primitives emit — execution-shaped, and yours to handle. - [Typed decisions](https://axle.fifthrevision.com/concepts/decisions): One request, one typed answer per question — decide() and the typesafe() provider. ## Building blocks - [Providers & models](https://axle.fifthrevision.com/concepts/providers): Protocols, providers and presets; naming models; controlling requests portably. - [Model catalog & cost](https://axle.fifthrevision.com/concepts/model-catalog): Looking up a model's window, budgeting the context, and pricing a run against the models.dev catalog. - [Instruct](https://axle.fifthrevision.com/concepts/instruct): A richer user message — templates, schemas, host context, and attachments. - [Tools](https://axle.fifthrevision.com/concepts/tools): Five ways to give an agent capabilities — local tools, deferred tools, provider tools, MCP, and subagents. - [The tool registry](https://axle.fifthrevision.com/concepts/tool-registry): The agent's tool set is meant to change while it runs. The registry is what makes that possible. - [Results & errors](https://axle.fifthrevision.com/concepts/results-and-errors): What resolves, what throws, and where Axle draws the line. - [Observability](https://axle.fifthrevision.com/concepts/observability): Structured logs, span traces, and where the token numbers come from. ## API Reference - [Agent](https://axle.fifthrevision.com/reference/agent): Constructor options, methods, and result types for Agent. - [Instruct](https://axle.fifthrevision.com/reference/instruct): Constructor options, methods, and rendering rules for Instruct. - [Providers](https://axle.fifthrevision.com/reference/providers): Provider factories, request options, and the model catalog. - [Decisions](https://axle.fifthrevision.com/reference/decisions): decide(), the question and answer types, and the typesafe() provider. - [generate() & stream()](https://axle.fifthrevision.com/reference/generate-stream): Parameters, handles, results, and the full StreamEvent union. - [Tools](https://axle.fifthrevision.com/reference/tools): Tool types, the registry, subagents, batching, and web search. - [Skills](https://axle.fifthrevision.com/reference/skills): The Skill type, SkillRegistry, skill loading, and the view-skill tool. - [MCP](https://axle.fifthrevision.com/reference/mcp): The MCP client — configuration, connection lifecycle, and tool discovery. - [Transcript & turn events](https://axle.fifthrevision.com/reference/transcript): The Transcript class, the Turn/TurnPart shapes, and the full TurnEvent union. - [Remote agents](https://axle.fifthrevision.com/reference/remote): RemoteAgent, its transports, the served side's event store, and the wire types. - [Messages & parts](https://axle.fifthrevision.com/reference/messages): The wire format — AxleMessage, content parts, files, and citations. - [Errors](https://axle.fifthrevision.com/reference/errors): The error classes, their codes, and the failure union. - [Observability](https://axle.fifthrevision.com/reference/observability): Tracer, spans, writers, and log entries. - [Configuration](https://axle.fifthrevision.com/reference/configuration): Compaction wiring and entry points. ## Cookbook - [Tool-using agent](https://axle.fifthrevision.com/cookbook/tool-using-agent): A complete agent that calls tools, streams progress, and continues the conversation. - [Structured output](https://axle.fifthrevision.com/cookbook/structured-output): Typed responses with Zod schemas, with and without an agent. - [Streaming to a UI](https://axle.fifthrevision.com/cookbook/streaming-ui): Fold turn events into a transcript, render it, and persist it. - [Annotations & evals](https://axle.fifthrevision.com/cookbook/annotations): Attaching your own UI to a turn — eval scores, sandbox status, anything Axle has no concept of. - [Files, images & PDFs](https://axle.fifthrevision.com/cookbook/files-and-images): Attaching local files, URLs, tool-returned files, and deferred references. - [MCP servers](https://axle.fifthrevision.com/cookbook/mcp-servers): Connecting stdio and HTTP MCP servers to an agent. - [Provider tools](https://axle.fifthrevision.com/cookbook/provider-tools): Hosted web search and code execution, and rendering their results. - [Web search](https://axle.fifthrevision.com/cookbook/web-search): One web_search that works on every provider, native or attached. - [Reasoning models](https://axle.fifthrevision.com/cookbook/reasoning): Enabling thinking, rendering it, and preserving continuity across turns. - [Interrupting & cancelling](https://axle.fifthrevision.com/cookbook/cancellation): stop, clear, cancel, and the interjection pattern. - [Subagents & parallelism](https://axle.fifthrevision.com/cookbook/subagents): Delegating to child agents and running a tool over many inputs at once. - [Judging a turn with a continuation](https://axle.fifthrevision.com/cookbook/judge-continuation): A critic that runs before the next send lands — a typed judge, a bounded retry, and what the result carries. - [Remote agents over HTTP](https://axle.fifthrevision.com/cookbook/remote-over-http): Two routes on the server, one RemoteAgent on the client, and what to do when the stream drops. ## Meta - [Changelog](https://axle.fifthrevision.com/changelog): Notable changes by release. - [Upgrading](https://axle.fifthrevision.com/upgrading): Breaking changes by version, and where to find the full migration guides. - [Glossary](https://axle.fifthrevision.com/glossary): The normative vocabulary. Code, docs, and events use these words with exactly these meanings. ## For coding agents - [AGENTS.md](https://axle.fifthrevision.com/AGENTS.md): the one-page contract — entry points, what throws versus what returns `ok: false`, the tool-loop invariants, and what version drift breaks. - [llms-full.txt](https://axle.fifthrevision.com/llms-full.txt): every page above, as one file.