> ## Documentation Index
> Fetch the complete documentation index at: https://rydantic.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Learn by building

> Four guided projects, from your first validated model to an API and a streaming AI agent.

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](/tutorials/first-model)**
>
> Normalize signup data, inspect validation errors and generate a JSON Schema. About 10 minutes.

> **[02 · Build a CRUD API](/tutorials/http-api)**
>
> Connect one model to Axum and SQLite. Exercise successful and rejected HTTP requests. About 20 minutes.

> **[03 · Build a typed agent](/tutorials/typed-agent)**
>
> Route a support request, reject an invalid result and observe bounded correction. About 15 minutes.

> **[04 · Stream structured results](/tutorials/streaming-ai)**
>
> 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:

```sh theme={"system"}
git clone https://github.com/trotsky1997/Rydantic.git
cd Rydantic
cargo run --locked -p rydantic --example data_contract
```

> [!NOTE]
>
> 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](/examples/overview) for individual programs, required feature flags, expected results and API prerequisites. Use the [integration guides](/integrations/overview) when connecting an existing application.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.