Repolode
Abraxas-365

Abraxas-365/langchain-rust

LangChain for Rust: a library for building LLM-powered applications with composable chains, agents, tools, and vector stores.

Stars
1,362
Forks
179
Open issues
10
Last commit
5 days ago

What is it?

langchain-rust is a Rust port of the LangChain framework for building applications on top of large language models. It provides building blocks such as LLM chains, conversational chains, sequential chains, and Q&A and summarization chains, so developers can combine model calls, prompt templates, and retrieval steps into a pipeline.

The library supports a range of model providers, including OpenAI, Azure OpenAI, Ollama, Anthropic Claude, Mistral and AWS Bedrock for LLMs and embeddings, plus local embeddings through FastEmbed. For retrieval it includes integrations with many vector stores such as Postgres, Qdrant, Pinecone, Weaviate, Milvus, Chroma, Redis and SQLite. It also covers document loaders for PDF, HTML, CSV, Markdown-converted sources and Git commits, along with output parsers and chat memory backed by SQLite, Postgres, Redis or MongoDB.

Agent support includes tool-calling agents, a ReAct agent for models without native tool calling, streaming agent events, and built-in tools such as a calculator, web search and Wolfram. Installation is done with cargo, and optional features enable individual vector store backends.

Key features

  • 01Chains for LLM calls, Q&A, summarization, SQL queries and routing
  • 02Support for OpenAI, Azure OpenAI, Ollama, Anthropic Claude and other model providers
  • 03Vector store integrations including Postgres, Qdrant, Pinecone and Chroma
  • 04Agents with tool calling, a ReAct fallback, and streaming events
  • 05Document loaders for PDF, HTML, CSV and Git commit history
  • 06Chat memory persisted to SQLite, Postgres, Redis or MongoDB

Use cases

  • Building a retrieval-augmented Q&A service in a Rust backend
  • Adding LLM features to a Rust application without leaving the language
  • Creating tool-using agents that call search or custom functions
  • Prototyping chains that switch between OpenAI and local Ollama models

Quick start

  1. 1

    Add serde_json to your Rust project

    cargo add serde_json
  2. 2

    Add langchain-rust to your Rust project

    cargo add langchain-rust

Things to know

  • The sqlite-vss and sqlite-vec features require downloading extra native libraries separately.

In collections

Topics

FAQ

What is langchain-rust?
LangChain for Rust: a library for building LLM-powered applications with composable chains, agents, tools, and vector stores. langchain-rust is a Rust port of the LangChain framework for building applications on top of large language models. It provides building blocks such as LLM chains, conversational chains, sequential chains, and Q&A and summarization chains, so developers can combine model calls, prompt templates, and retrieval steps into a pipeline.
Is langchain-rust free to use? What license does it have?
langchain-rust is open source under the MIT license. Check the license terms before using it in commercial products.
Is langchain-rust still maintained?
Actively maintained. The last commit to langchain-rust was on Nov 3, 2026.
What can I use langchain-rust for?
Building a retrieval-augmented Q&A service in a Rust backend Adding LLM features to a Rust application without leaving the language Creating tool-using agents that call search or custom functions Prototyping chains that switch between OpenAI and local Ollama models
How do I install langchain-rust?
Add serde_json to your Rust project: cargo add serde_json Add langchain-rust to your Rust project: cargo add langchain-rust
Where can I get langchain-rust?
The source code and installation instructions are on GitHub: https://github.com/Abraxas-365/langchain-rust

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects