RAGO
Natural Language → Workflow → Execution
Privacy First
100% Local
Lightweight

Local RAG System

Privacy-first document processing with complete data control. Lightweight, fast, and 100% offline capable. Your data never leaves your machine.

Advanced RAG capabilities with MCP tools integration and multi-provider LLM support.

Works with Your Favorite Local LLMs

🦙
Ollama
🎨
LM Studio
🤖
LocalAI
🔌
OpenAI Compatible
Architecture

Simple Yet Powerful

Complete RAG pipeline with minimal resource requirements

Document Ingestion

PDF, Text, Markdown, JSON, HTML

Smart Chunking

Sentence, Paragraph, Token-based

Vector Storage

SQLite with sqvect extension

Hybrid Search

Vector + Keyword with RRF

Complete Feature Set

Everything You Need

Comprehensive RAG capabilities with enterprise features

RAG Pipeline

Complete document processing and Q&A system

  • Multi-format document support
  • Configurable chunking strategies
  • Context-aware Q&A generation
  • Source attribution for answers

Vector Database

High-performance SQLite-based vector storage

  • SQLite with sqvect extension
  • Bleve full-text search
  • RRF fusion algorithm
  • Metadata filtering

Multi-Provider LLM

Flexible provider switching via configuration

  • Ollama for local models
  • LM Studio GUI support
  • OpenAI API compatible
  • Custom provider support

Configuration System

Comprehensive TOML-based configuration

  • Provider configuration
  • Chunking parameters
  • Search settings
  • Environment variables

MCP Tools

Model Context Protocol for tool integration

  • Filesystem operations
  • HTTP/HTTPS requests
  • SQLite database tools
  • Memory & time utilities

Agent Automation

Complete agent workflow system with planning and execution

  • NL to workflow conversion
  • Auto-run with execution tracking
  • Multi-step plan generation
  • Async parallel execution
  • Variable interpolation
  • Workflow templates

Task Scheduler

Cron-based scheduling for automated operations

  • Cron expressions support
  • Query task scheduling
  • Document ingestion jobs
  • MCP tool automation
  • Execution tracking

Interactive Chat

Direct LLM chat with optional MCP tool integration

  • Pure LLM conversations
  • MCP-enhanced chat
  • Conversation history
  • Interactive mode

Data Management

Comprehensive data import, export, and management

  • Knowledge base export
  • Data import/migration
  • Document listing & metadata
  • Database reset/cleanup

HTTP API

Complete RESTful API for all operations

  • Document ingestion endpoints
  • Query & search APIs
  • MCP tool execution
  • Agent workflow APIs

Go Library

Use RAGO as a library in your Go applications

  • Simple client interface
  • Provider abstraction
  • Pipeline components
  • Error handling

CLI Commands

Comprehensive command-line interface

  • RAG operations (ingest, query, list, reset)
  • Agent management & execution
  • MCP server & tool management
  • Interactive chat interfaces
  • Provider status & connectivity
  • Data import/export utilities
MCP Tools Available

Rich Tool Ecosystem

filesystem
File operations
fetch
HTTP requests
sqlite
Database ops
memory
Key-value store
time
Date/time utils
sequential-thinking
LLM reasoning
playwright
Browser control
git
Version control
everything
File search
brave-search
Web search
kubernetes
K8s management
github
GitHub ops
gmail
Email management
Live Examples

See RAGO in Action

Document Ingestion & Query
Ingest documents and query with semantic search
# Ingest documents recursively
$ rago ingest ./docs --recursive

# Query with source attribution
$ rago query "What is the main concept?" --show-sources

# Interactive query mode
$ rago query -i

# Query with metadata filters
$ rago query "deployment options" --filter type=documentation
$ rago query "What is the main concept?" --show-sources ✓ Searching documents... ✓ Found 5 relevant chunks ✓ Generating answer... Answer: The main concept is implementing a privacy-first RAG system that operates entirely locally. Key aspects include: 1. Complete data control - all processing happens on your machine 2. SQLite-based vector storage for efficient semantic search 3. Hybrid search combining vector and keyword approaches 4. Multi-provider support while maintaining local-first philosophy Sources: - docs/architecture.md (chunk 3, score: 0.92) - docs/privacy.md (chunk 1, score: 0.89) - README.md (chunk 7, score: 0.87)
Complete Agent Workflow System
# Auto-run: Plan and execute automatically
$ rago agent auto-run "analyze project structure and create documentation"

# Step-by-step approach
$ rago agent plan "monitor system performance daily"
$ rago agent run-plan plan_id_12345

# Create reusable agents
$ rago agent create research-agent "Weekly market research automation"
$ rago agent execute research-agent

# Workflow templates
$ rago agent templates
$ rago agent generate-template monitoring --type system-monitoring

# Plan management
$ rago agent list-plans
$ rago agent plan-status plan_id_12345
$ rago agent auto-run "analyze project structure and create documentation" ✓ Creating execution plan... ✓ Generated 6-step plan with MCP tools Executing Plan: project_analysis_20241209 Step 1/6: filesystem_scan Using MCP tool: filesystem read_directory ✓ Scanned 127 files in project root Step 2/6: code_analysis Using MCP tool: filesystem read_file (Go modules) ✓ Analyzed dependencies and structure Step 3/6: documentation_extraction ✓ Extracted README and doc comments Step 4/6: pattern_recognition ✓ Identified factory and pipeline patterns Step 5/6: document_generation ✓ Generated comprehensive documentation Step 6/6: file_output Using MCP tool: filesystem write_file ✓ Saved PROJECT_ANALYSIS.md Plan Status: ✅ Completed (6/6 steps successful)
Interactive Chat & MCP Tools
# Direct LLM chat
$ rago chat "Explain the concept of RAG systems"

# MCP-enhanced chat with tool access
$ rago mcp chat --interactive

# MCP server management
$ rago mcp status
$ rago mcp start filesystem
$ rago mcp list

# Direct tool calls
$ rago mcp call filesystem read_file '{"path": "README.md"}'
$ rago mcp call sqlite query '{"database": "data.db", "query": "SELECT * FROM users"}'

# Data management
$ rago rag export --format json --output backup.json
$ rago rag import --file backup.json
$ rago rag list --detailed
$ rago rag reset --confirm
$ rago mcp chat --interactive ✓ Starting MCP-enhanced chat session ✓ Connected to 5 MCP servers Available tools: filesystem, fetch, sqlite, memory, time You: List all files in the current directory and analyze the Go project structure Assistant: I'll help you analyze the Go project structure. Let me start by listing the files in the current directory. 🔧 Using tool: filesystem/read_directory ✓ Found 23 files and 8 directories 🔧 Using tool: filesystem/read_file (go.mod) ✓ Analyzing Go module dependencies Analysis Results: - **Project Type**: Go application with CLI interface - **Main Package**: cmd/rago (entry point) - **Core Packages**: pkg/ directory with 12 modules - **Dependencies**: 15 external libraries - **Architecture**: Clean architecture with domain separation - **Build System**: Makefile + Go modules Key Components Found: - RAG pipeline (pkg/processor/) - Vector database (pkg/store/) - LLM integrations (pkg/providers/) - Agent system (pkg/agents/) - MCP integration (pkg/mcp/)
HTTP API Usage
# Start API server with UI
$ rago serve --port 7127 --ui

# RAG Operations
curl -X POST http://localhost:7127/api/ingest \
  -H "Content-Type: application/json" \
  -d '{"file_path": "document.pdf"}'

curl -X POST http://localhost:7127/api/query \
  -H "Content-Type: application/json" \
  -d '{"query": "summarize", "top_k": 5, "show_sources": true}'

# Agent Operations  
curl -X POST http://localhost:7127/api/agents \
  -H "Content-Type: application/json" \
  -d '{"name": "research-agent", "description": "Market research automation"}'

curl -X POST http://localhost:7127/api/agents/research-agent/execute \
  -H "Content-Type: application/json" \
  -d '{"goal": "analyze competitor pricing"}'

# MCP Tool Calls
curl -X POST http://localhost:7127/api/mcp/tools/call \
  -H "Content-Type: application/json" \
  -d '{"tool": "filesystem", "action": "read_file", "params": {"path": "data.txt"}}'

# Health and Status
curl http://localhost:7127/api/health
curl http://localhost:7127/api/status
Go Library Usage
Simplified client API with wrappers for all features. See /examples for comprehensive demos:
  • 📁 01_basic_client - Client initialization methods
  • 🤖 02_llm_operations - LLM generation, streaming, chat
  • 📚 03_rag_operations - Document ingestion, queries, search
  • 🛠️ 04_mcp_tools - MCP tool integration
  • 05_agent_automation - Task scheduling & workflows
  • 🎯 06_complete_platform - Full integration demo
package main

import (
    "context"
    "fmt"
    "log"
    
    "github.com/liliang-cn/rago/v2/client"
)

func main() {
    ctx := context.Background()
    
    // Simplified client API - only 2 entry points!
    c, err := client.New("rago.toml") // Or empty string for defaults
    if err != nil {
        log.Fatal(err)
    }
    defer c.Close()
    
    // LLM operations with wrapper
    if c.LLM != nil {
        response, _ := c.LLM.Generate("Write a haiku about coding")
        fmt.Println(response)
        
        // Streaming
        c.LLM.Stream(ctx, "Tell a story", func(chunk string) {
            fmt.Print(chunk)
        })
    }
    
    // RAG operations with wrapper
    if c.RAG != nil {
        // Ingest documents
        c.RAG.Ingest("Your document content here")
        
        // Query with sources
        resp, _ := c.RAG.QueryWithOptions(ctx, "What are the key findings?",
            &client.QueryOptions{TopK: 5, ShowSources: true})
        fmt.Printf("Answer: %s\n", resp.Answer)
        
        for _, source := range resp.Sources {
            fmt.Printf("Source: %s (score: %.2f)\n", source.Source, source.Score)
        }
    }
    
    // MCP tools with wrapper
    if c.Tools != nil {
        tools, _ := c.Tools.List()
        fmt.Printf("Available tools: %d\n", len(tools))
        
        result, _ := c.Tools.Call(ctx, "filesystem_read",
            map[string]interface{}{"path": "README.md"})
        fmt.Printf("Tool result: %v\n", result)
    }
    
    // Agent automation with wrapper
    if c.Agent != nil {
        result, _ := c.Agent.Run("Summarize recent changes")
        fmt.Printf("Agent result: %v\n", result)
    }
    
    // Direct BaseClient methods also available
    resp, _ := c.Query(ctx, client.QueryRequest{
        Query: "test query",
        TopK:  3,
    })
    fmt.Printf("Direct query: %s\n", resp.Answer)
}
Quick Start

Install in Seconds

Multiple installation methods to suit your needs

Build from Source

# Clone repository
git clone https://github.com/liliang-cn/rago
cd rago

# Build with make
make build

# Or build directly
go build -o rago ./cmd/rago-cli

Provider Setup

# Option 1: Ollama (recommended for local)
curl -fsSL https://ollama.com/install.sh | sh
ollama pull qwen3

# Option 2: LM Studio
# Download from https://lmstudio.ai

# Configure provider in rago.toml
[providers]
default_llm = "ollama"
default_embedder = "ollama"