Rust's answer to LangChain, minus the Python
A Rust-native toolkit for chaining LLM prompts, running agents, and keeping models off the cloud if you prefer.

What it does
llm-chain is a set of Rust crates for building multi-step LLM workflows—prompt templates, chained completions, vector-store memory, and tool-wielding agents. It talks to OpenAI’s APIs, runs LLaMA and Alpaca locally via llm.rs, and wraps the whole thing in a macro-heavy API that tries to keep boilerplate low.
The interesting bit
The project bets that Rust’s async runtime and type system are a natural fit for LLM orchestration—no Python GIL, no PyO3 gymnastics. The executor!() and prompt!() macros let you fire off a templated prompt in four lines, which is either refreshingly direct or slightly magical depending on your tolerance for macros.
Key highlights
- Prompt templates with parameter injection and multi-step chains
- Cloud (ChatGPT/OpenAI) and local (LLaMA, Alpaca,
llm.rs) backends in one framework - Vector store integrations for long-term memory and RAG-style knowledge
- Built-in “tools” for agents: Bash, Python execution, web search
- Rust 1.65+; current release is 0.12.0
Caveats
- The README is heavy on feature-list enthusiasm and light on architectural detail; it’s unclear how chain state is shared between steps or how error handling propagates through async chains
- “Plans to add OpenAI’s other models in the future” suggests GPT-4/vision support may not be there yet
- The quick-start template and tutorial links are the primary onboarding paths; the crate docs themselves are not excerpted in the README
Verdict
Worth a look if you’re already shipping Rust and want LLM orchestration without leaving the ecosystem. If you need mature observability, a huge plugin marketplace, or you’re not comfortable debugging macro expansions, LangChain (Python or JS) is still the safe default.