---
title: Now Is Awesome Moment to Start With Rust in AI
description: 'A practical start with agents in Rust: an IDE, a coding agent, Everruns Framework, and a look at experimental Everruns Serve, inspired by Topcoat.'
date: 2026-09-25
tags:
  - ai
  - agents
  - rust
  - everruns
  - developer-experience
---

This week I watched [DHH's Rails World 2026 keynote](https://www.youtube.com/watch?v=vDjW_dRyKXY). Big part of it is "pencils down": at 37signals writing code by hand is now an exceptional state. And, among other things, HEY got a new mail backend in Rust. His take on Rust is my favorite line of the whole talk:

> I love Rust! Rust is amazing ...if you never, ever, EVER have to look at it yourself.

He also said he does not know any Rust at all and considers that a feature. Lol. I will not repeat why Rust fits agents so well, I already wrote about it in [Rust Is Winning the AI Code Generation Race](/blog/rust-rising-in-ai-codegen/). This post is about the practical part: how to start, today.

## You Just Need an IDE and an Agent

You need an IDE, a coding agent (Claude Code, Codex, Cursor, whatever you use), and a sentence like this:

```text
Install the Rust toolchain if it is missing, create a new binary crate,
add everruns with the openai feature and tokio, and make a small agent
with one tool that tells the current time. Run it and show me the answer.
```

That is it. Agent installs `rustup`, runs `cargo new`, adds dependencies, writes code, fights the compiler, and shows you the result. You read the behavior, not the lifetimes.

You will still learn Rust along the way, just in a different order. First you see what the program does, then you ask "why is there `Arc` here?" and agent explains. Honestly this is better way to learn anything.

## Now, How to Start Building AI Agents

Best way to start building agents in Rust is [Everruns Framework](https://github.com/everruns/everruns/tree/main/crates/everruns). And I say this completely objectively, it has nothing to do with the fact that I am building it :D. Okay, I am biased. Very biased. But hear me out.

It gives you agents with model providers, typed tools, multi-turn sessions, live events, cancellation, MCP, and durable local state. It runs inside your Rust process, no server required.

```bash
cargo add everruns --features openai
cargo add tokio --features macros,rt-multi-thread
export OPENAI_API_KEY=sk-...
```

And the whole agent:

```rust
use std::time::{SystemTime, UNIX_EPOCH};

use everruns::{Agent, Engine, OpenAI};

/// Return the current Unix time in seconds.
#[everruns::tool]
async fn current_time() -> Result<u64, String> {
    SystemTime::now()
        .duration_since(UNIX_EPOCH)
        .map(|duration| duration.as_secs())
        .map_err(|error| error.to_string())
}

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    let agent = Agent::builder()
        .name("assistant")
        .instructions("Use current_time when asked about time. Be concise.")
        .provider(OpenAI::from_env()?)
        .model("gpt-5.6-terra")
        .tool(current_time())
        .build()?;

    let session = Engine::new().create(agent);
    let turn = session.send_and_wait("What time is it?").await?;

    println!("{}", turn.response);
    Ok(())
}
```

`#[everruns::tool]` makes JSON schema for the tool from the Rust function, so the doc comment and argument types are what model sees. No hand-written schema that drifts from the code.

The model is super small: `Agent` describes behavior, `Engine` owns runtime and sessions, `Session` is one conversation, `Turn` is one run. Anthropic, Bedrock and others are separate driver crates, each with a `from_env` entry point that reads the vendor's usual env variables. Full docs are at [docs.everruns.com](https://docs.everruns.com/).

Also check [Everruns Serve](https://github.com/everruns/everruns/tree/main/crates/serve). It is experimental, inspired by [Topcoat](https://github.com/tokio-rs/topcoat) from the Tokio team, which brings Rust to regular web development. Serve does the same for agents: `#[agent]`, `#[tool]`, `#[schedule]`, `#[eval]` on plain functions, the file layout says what each piece is, and you get one binary that serves the sessions API. Clone the repo and run `cargo run -p serve-example-hello`, it works offline without any keys. Early proof of concept, APIs will change, so do not judge :).

## So, Where to Start

Most important notes are:

1. You need an IDE and an agent. Ask it to set things up.
2. Start with [Everruns Framework](https://github.com/everruns/everruns/tree/main/crates/everruns) for agents inside your own app.
3. Play with [Everruns Serve](https://github.com/everruns/everruns/tree/main/crates/serve) if you want agent as an app, Topcoat style. And tell me what breaks.

If you have any questions or suggestions, please welcome!
