docs

Documentation hub.

Full API reference and concept deep dives live in the repo's documentation/ tree. Here's the orientation; the source of truth is GitHub.

Quickstart

Concepts

API reference (in repo)

The Dartdoc-generated reference lives on pub.dev:

Deeper reading on the marketing site

  • Why mobile-native — the founding argument.
  • On-device routing — providers + ModelRoute.preferOnDevice.
  • Compare — vs Claude SDK, OpenAI Agents SDK, Mastra, LangChain.
  • Blog — long-form articles on individual primitives.

Snippets you'll re-use

pubspec.yaml
dependencies:
  agentlib: ^1.1.0
lib/main.dart
final agent = AgentSpec(
  name: 'helper',
  instructions: 'You are a helpful mobile assistant.',
  model: AnthropicProvider(apiKey: const String.fromEnvironment('ANTHROPIC_API_KEY')),
);

final run = Runner.runStreamed(
  agent.toRunConfig(vfs: Vfs(), threadId: 'main'),
  input: 'What time is it?',
);
await for (final e in run.events) {
  if (e is TextDelta) print(e.delta);
}

For AI search

The /llms.txt file is a curated index of this site for LLM crawlers. The /llms-full.txt file is the full content dump — README + all articles concatenated.

next

Pick a primitive and read deep.

Subagents, skills, snapshots, hooks, Sh, MCP — pick the one that's blocking your build and click through.