Skip to main content
Build something small, run it, then change one rule and observe the result. Each tutorial includes a complete executable, a success case and a way to explore its behavior.
ModelHTTP & storageTyped AIStreaming

Choose a project

01 · Your first data contract

Normalize signup data, inspect validation errors and generate a JSON Schema. About 10 minutes.

02 · Build a CRUD API

Connect one model to Axum and SQLite. Exercise successful and rejected HTTP requests. About 20 minutes.

03 · Build a typed agent

Route a support request, reject an invalid result and observe bounded correction. About 15 minutes.

04 · Stream structured results

Render partial previews, collect validated list items and handle attempt resets. About 15 minutes.

Before you start

You need Rust and Cargo. Familiarity with structs, Result and basic async Rust is enough. The repository is tested with Rust 1.98.1. SQLite is bundled; the default tutorial path needs no database service or API credentials. For the complete runnable examples, start from the repository revision matching these docs:
These tutorials target Rydantic 0.7.0 stable and RydanticAI 0.6.0. A pull request preview can include examples that reach the default branch when merged. Use that pull request’s source checkout when following a preview.
The first-model and typed-agent tutorials also include standalone Cargo.toml files. Copy their complete source into src/main.rs to run outside the workspace.

Prefer a focused recipe?

Open the example library for individual programs, required feature flags, expected results and API prerequisites. Use the integration guides when connecting an existing application.