swiftide
bosun-ai/swiftide
Fast, streaming indexing, query, and agentic LLM applications in Rust
Overview
Swiftide is an opinionated framework for building large language model (LLM) applications using Rust. It offers an agent harness, typed task graphs for orchestration, and streaming, composable indexing/query pipelines for Retrieval-Augmented Generation (RAG).
Categories
Tags
Similar tools
ECC
affaan-m/ECC
The agent harness performance optimization system
hermes-agent
NousResearch/hermes-agent
The self-improving AI agent built by Nous Research
AutoGPT
Significant-Gravitas/AutoGPT
AutoGPT: Build, Deploy, and Run AI Agents
ollama
ollama/ollama
Get up and running with Kimi-K2.6, GLM-5.1, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
transformers
huggingface/transformers
🤗 Transformers: the model-definition framework for state-of-the-art machine learning models
langflow
langflow-ai/langflow
Langflow is a powerful platform for building and deploying AI-powered agents and workflows.
Install
cargo add swiftideREADME
[![Crate Badge]][Crate] [![Docs Badge]][API Docs] [![Contributors][contributors-shield]][contributors-url] [![Stargazers][stars-shield]][stars-url]
[![MIT License][license-shield]][license-url] [![LinkedIn][linkedin-shield]][linkedin-url]
Swiftide
Composable LLM agents and harnass, typed task graphs, and streaming RAG pipelines in Rust.
API docs
·
Examples
·
Website
·
Discord
Swiftide is an opinionated framework for building LLM applications. It gives you an agent harness, typed task graphs for orchestration, and streaming, composable indexing/query pipelines for RAG.
Table of Contents
- Why Swiftide
- Quick Start
- Agent Harness
- Typed Task Graphs
- RAG Pipelines
- Integrations
- Examples
- Project Status
- Contributing
- Core Team Members
- License
Why Swiftide
- Build agents that loop over LLM calls, tool calls, lifecycle hooks, and stop conditions.
- Compose prompt steps, agents, command executors, and domain-specific Rust code in typed task graphs.
- Fan out work into parallel branches and join typed results back into one task output.
- Pause and resume agents or tasks for human approval, external callbacks, or persisted state.
- Bring tools from local Rust functions, custom
Toolimplementations, or MCP servers. - Stream large indexing and retrieval workloads through loaders, transformers, embedders, caches, and storage backends.
- Trace agent, task, and pipeline execution with
tracing, metrics, and Langfuse support.
The core primitives provide the shared interaction model. Around them, use pipelines for data flows, agents for tool loops, and tasks for graphs of typed hand-offs.
Quick Start
Swiftide keeps default dependencies light. Start with the agent harness and add the integrations your application needs.
cargo add swiftide --features swiftide-agents,openai
cargo add anyhow
cargo add tokio --features macros,rt-multi-thread
If using OpenAI, set the API key expected by the OpenAI-compatible integration:
export OPENAI_API_KEY=...
Agent Harness
Swiftide provides a harnass for building (semi) autonomous agents. The harnass owns message history, call an LLM, invoke tools, run hooks, and stopping. Tools are pure functions and easy to add. The AgentContext abstracts over message history (in memory by default) and provides tools access to the outside world via a ToolExecutor (local by default, see also the docker executor).
use anyhow::Result;
use swiftide::{
agents,
chat_completion::{ToolOutput, errors::ToolError},
traits::AgentContext,
};
#[swiftide::tool(
description = "Looks up a Swiftide concept",
param(name = "concept", description = "Concept to explain")
)]
async fn explain_concept(
_context: &dyn AgentContext,
concept: &str,
) -> Result<ToolOutput, ToolError> {
let explanation = match concept {
"tasks" => "Tasks compose typed nodes into explicit workflows.",
"agents" => "Agents run LLM comple