llamafarm  by llama-farm

Local-first AI framework for RAG and agentic applications

Created 3 months ago
518 stars

Top 60.6% on SourcePulse

GitHubView on GitHub
Project Summary

LlamaFarm is an open-source framework designed for building retrieval-augmented generation (RAG) and agentic AI applications locally. It targets developers seeking a flexible, local-first environment to deploy and manage AI models, databases, and complex pipelines. LlamaFarm simplifies development through a unified CLI and a configuration-driven approach, allowing users to swap components like LLM providers or vector stores without extensive code rewrites, thereby accelerating AI application development.

How It Works

LlamaFarm provides a composable architecture for AI applications, prioritizing a local-first developer experience. It uses opinionated defaults such as Ollama for local model serving and Chroma for vector storage, but these are fully extendable. Users can integrate alternative runtimes like vLLM or OpenAI-compatible hosts, and various databases or parsers by modifying YAML configuration files. The framework enforces schema-based configuration, ensuring consistency and version control, and offers a friendly CLI (lf) for project management, dataset handling, and interactive chat sessions.

Quick Start & Requirements

  • Prerequisites: Docker, Ollama (local runtime).
  • Installation:
    • macOS/Linux: curl -fsSL https://raw.githubusercontent.com/llama-farm/llamafarm/main/install.sh | bash
    • Windows: winget install LlamaFarm.CLI
  • Running a Project:
    1. Initialize: lf init my-project (generates llamafarm.yaml).
    2. Start services and UI: lf start.
  • Demo: 90-second video available at https://youtu.be/W7MHGyN0MdQ.
  • Full Walkthrough: Refer to the project's Quickstart guide.

Highlighted Details

  • Flexible Runtimes: Easily switch between local Ollama, vLLM, or any OpenAI-compatible API by updating llamafarm.yaml.
  • Config-over-Code: Define RAG pipelines, data processing strategies, and database configurations entirely through validated YAML schemas.
  • Extensible Components: Add custom parsers, extractors, embedding strategies, or vector stores by implementing backend interfaces and updating schema definitions.
  • OpenAI-Compatible API: Provides REST endpoints for chat completions and RAG queries, facilitating integration with existing applications.

Maintenance & Community

LlamaFarm fosters community engagement through Discord for real-time chat, GitHub Issues for bug reports and feature requests, and Discussions for proposals and roadmap discussions. A contributing guide outlines expectations for code style, testing, and documentation updates.

Licensing & Compatibility

The project is licensed under the Apache 2.0 License, which permits commercial use and integration into closed-source applications.

Limitations & Caveats

While designed for local-first development, the README emphasizes Ollama as the primary default local runtime, with other options being extendable. Users are advised to adjust Ollama's context window for optimal RAG performance with long documents. Detailed production deployment strategies beyond API compatibility are not explicitly covered in the README.

Health Check
Last Commit

8 hours ago

Responsiveness

Inactive

Pull Requests (30d)
94
Issues (30d)
72
Star History
414 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.