Skip to content

Quick Start

Steven Enamakel edited this page Jun 29, 2026 · 2 revisions

Quick Start

This page covers the shortest path from checkout to a running TinyAgents graph.

Install From Git

Until the crate is published, depend on the repository directly:

[dependencies]
tinyagents = { git = "https://github.com/tinyhumansai/rustagents" }

For local development inside this repository:

[dependencies]
tinyagents = { path = "." }

Clone And Test

git clone git@github.com:tinyhumansai/rustagents.git
cd rustagents
cargo test

Useful local checks:

cargo fmt --check
cargo clippy --all-targets -- -D warnings
cargo build --all-targets
cargo test

Run The Local Graph Example

The local graph example does not need provider credentials:

cargo run --example basic_graph

It builds a two-node graph:

flowchart TD
    Start((START)) --> Agent[agent]
    Agent -->|needs_tool| Tool[tool]
    Tool --> Agent
    Agent -->|done| End((END))
Loading

The graph threads typed Rust state through each node, uses conditional routing after the agent node, and exits when the state no longer needs the tool.

Run An OpenAI-Backed Example

export OPENAI_API_KEY=...
cargo run --features openai --example openai_chat

Optional environment variables:

export OPENAI_MODEL=gpt-4.1-mini
export OPENAI_BASE_URL=https://api.openai.com/v1

The OpenAI feature also powers OpenAI-compatible providers through provider specs and helper constructors. See Providers.

Repository Layout

  • src/graph/: durable graph runtime.
  • src/harness/: model, tool, middleware, event, usage, provider, and testkit primitives.
  • src/language/: .rag parsing, compiling, and registry binding.
  • src/registry/: capability catalog and model catalog.
  • examples/: runnable examples.
  • docs/spec/: contributor-facing system specification.
  • wiki/: GitHub wiki source, tracked as a submodule.

TinyAgents

Recursive language-model (RLM) harness for Rust.

Getting started

Concepts

Modules

Providers

Contributing


Clone this wiki locally