Skip to content

weft documentation

View as Markdown

weft is an open-source Go framework for AI agents. A tool is a plain Go function, an agent is a value you build once and run many times, and the loop calls the model and your tools until the model answers. The same module records every run with otel.Install and opens it in Studio, its web inspector. These pages document weft v0.20.2, which is pre-1.0: a minor release can break.

weft Studio's runs list: each run's status, prompt and id, agent, steps, tokens, cost, start and duration, newest first, with a checkbox per row to pick runs to compareweft Studio's runs list: each run's status, prompt and id, agent, steps, tokens, cost, start and duration, newest first, with a checkbox per row to pick runs to compare

The sidebar is the reading order:

SectionWhat it holds
Get startedFrom nothing to a recorded run you can inspect, in order
ConceptsThe ideas everything else builds on: agents, runs, tools, the loop, messages, models, errors, stopping
GuidesOne task per page: streaming, structured output, approvals, subagents, MCP, middleware, providers, …
SessionsDurable multi-turn conversations with weft/thread: storage, turns, branching, compaction, approvals, pools
Observe & debugRecording runs, Studio, the playground, the devtools panel and the weft command
TestingOffline tests: scripted models, recorded fixtures, Studio runs as tests, provider conformance
ProductionDeploying, securing Studio, content and privacy, retention, storage backends, upgrading
ReferenceTables: the CLI, Studio’s HTTP API, the record contract, environment variables, events, the glossary
ExplanationWhy weft is shaped the way it is: architecture, design principles, decisions, comparisons
ExamplesComplete recipes: a support desk, a research team, flaky infrastructure, budget guards, …

Every page has a Markdown twin at its URL with .md appended. /docs/llms.txt lists them, and /docs/llms-full.txt holds them all in one file.