Skip to content
@turnframe-rs

Turnframe

Deterministic conversational AI framework for Rust

Turnframe

Deterministic conversational workflows for Rust.

crates.io docs.rs MSRV 1.88 License: MIT or Apache-2.0

Website · Documentation · The Flow Map · API reference · Repository


Turnframe is a Rust library for conversational applications that change real records: a travel desk that rebooks flights, an onboarding flow that registers people, an assistant that files an expense claim. People write the way people write, in one long message that asks for three things and corrects one of them. Small language-model tasks read what the message means. Your code decides what happens.

Models propose meaning. Deterministic reducers decide effects. Committed events decide claims.

It is not an agent framework in which a model freely calls write tools. Each state of each workflow offers a closed catalog of operations, and a model can only choose among them.

The Flow Map

Every turn runs five steps in order, and each hands the next only what it may decide.

  1. Persisted state determines the workflow view. A pure projector turns the stored record into one phase, its open obligations and at most one card awaiting the user.
  2. Small model tasks propose what a message means. A fixed chain of narrow tasks, each with a strict schema that code checks before the next one runs.
  3. Reducers decide effects. Every act becomes a typed command with an expected revision and an idempotency key.
  4. Interactions authorize consequential actions. A click on a card drawn for the record's current revision, never a model's say-so.
  5. Committed events determine what may be claimed. The reply says something happened only when a committed event backs it.

Small models are the point

No understanding task needs more than a few hundred tokens of context, so the reading runs on mini and flash models. Accuracy comes from more checked calls on the same small model, not from a bigger one. Adapters for OpenAI, Anthropic, Gemini, Bedrock and Ollama ship with it, and the benchmarks say what is measured and what is not claimed.

Try it

cargo add turnframe

Or run the sample travel desk, which needs no API key and no database:

git clone https://github.com/turnframe-rs/turnframe
cd turnframe && cargo run -p travel-desk

The quickstart walks one turn end to end.

Get involved

Issues and pull requests are welcome on turnframe. Start with the contribution guide. Security problems go through the repository's private vulnerability reporting, as SECURITY.md describes, never through a public issue.

Turnframe is dual-licensed under MIT or Apache-2.0, at your option.

Popular repositories Loading

  1. turnframe turnframe Public

    Deterministic conversational AI framework for Rust

    Rust 1

  2. .github .github Public

    Deterministic conversational AI framework for Rust

Repositories

Showing 2 of 2 repositories

People

This organization has no public members. You must be a member to see who’s a part of this organization.

Top languages

Loading…

Most used topics

Loading…