Enterprise AI capabilities on your own hardware. No cloud required. LlamaFarm is an open-source AI platform that runs entirely on your hardware.
$ npx -y skills add llama-farm/llamafarm --agent claude-code
Run the curl in your terminal, the rest in Claude Code.
Repo: llama-farm/llamafarm
What's inside
Enterprise AI capabilities on your own hardware. No cloud required.
LlamaFarm is an open-source AI platform that runs entirely on your hardware. Build RAG applications, train custom classifiers, detect anomalies, and run document processingโall locally with complete privacy.
Get started instantly โ no command line required:
| Platform | Download |
|---|---|
| Mac (Universal) | Download |
| Windows | Download |
| Linux (x86_64) | Download |
| Linux (ARM64) | Download |
| Capability | Description |
|---|---|
| RAG (Retrieval-Augmented Generation) | Ingest PDFs, docs, CSVs and query them with AI |
| Custom Classifiers | Train text classifiers with 8-16 examples using SetFit |
| Anomaly Detection | 12+ algorithms for batch and streaming anomaly detection |
| Tool Calling (MCP) | Connect models to external tools via Model Context Protocol |
| OCR & Document Extraction | Extract text and structured data from images and PDFs |
| Named Entity Recognition | Find people, organizations, and locations |
| Multi-Model Runtime | Switch between Ollama, OpenAI, vLLM, or local GGUF models |
Video demo (90 seconds): https://youtu.be/W7MHGyN0MdQ
Download the desktop app above and run it. No additional setup required.
Install the CLI
macOS / Linux:
curl -fsSL https://raw.githubusercontent.com/llama-farm/llamafarm/main/install.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/llama-farm/llamafarm/main/install.ps1 | iex
Or download directly from releases.
Create and run a project
lf init my-project # Generates llamafarm.yaml
lf start # Starts services and opens Designer UI
Chat with your AI
lf chat # Interactive chat
lf chat "Hello, LlamaFarm!" # One-off message
The Designer web interface is available at http://localhost:14345.
git clone https://github.com/llama-farm/llamafarm.git
cd llamafarm
# Install Nx globally and initialize the workspace
npm install -g nx
nx init --useDotNxInstallation --interactive=false # Required on first clone
# Start all services (run each in a separate terminal)
nx start server # FastAPI server (port 14345)
nx start rag # RAG worker for document processing
nx start universal-runtime # ML models, OCR, embeddings (port 11540)
LlamaFarm consists of three main services:
| Service | Port | Purpose |
|---|---|---|
| Server | 14345 | FastAPI REST API, Designer web UI, project management |
| RAG Worker | - | Celery worker for async document processing |
| Universal Runtime | 11540 | ML model inference, embeddings, OCR, anomaly detection |
All configuration lives in llamafarm.yamlโno scattered settings or hidden defaults.
The Universal Runtime provides access to HuggingFace models plus specialized ML capabilities:
runtime:
models:
default:
provider: universal
model: Qwen/Qwen2.5-1.5B-Instruct
base_url: http://127.0.0.1:11540/v1
Simple setup for GGUF models with CPU/GPU acceleration:
runtime:
models:
default:
provider: ollama
model: qwen3:8b
base_url: http://localhost:11434/v1
Works with vLLM, Together, Mistral API, or any OpenAI-compatible endpoint:
runtime:
models:
default:
provider: openai
model: gpt-4o
base_url: https://api.openai.com/v1
api_key: ${OPENAI_API_KEY}
| Task | Command |
|---|---|
| Initialize project | lf init my-project |
| Start services | lf start |
| Interactive chat | lf chat |
| One-off message | lf chat "Your question" |
| List models | lf models list |
| Use specific model | lf chat --model powerful "Question" |
| Create dataset | lf datasets create -s pdf_ingest -b main_db research |
| Upload files (auto-process by default) | lf datasets upload research ./docs/*.pdf |
| Process dataset (if you skipped auto-process) | lf datasets process research |
| Query RAG | lf rag query --database main_db "Your query" |
| Check RAG health | lf rag health |
--no-processlf datasets create -s default -b main_db research
lf datasets upload research ./papers/*.pdf # auto-processes by default
# For large batches:
# lf datasets upload research ./papers/*.pdf --no-process
# lf datasets process research
lf rag query --database main_db "What are the key findings?"
The Designer at http://localhost:14345 provides:
See the Designer Features Guide for details.
llamafarm.yaml is the source of truth for each project:
version: v1
name: my-assistant
namespace: default
# Multi-model configuration
runtime:
default_model: fast
models:
fast:
description: "Fast local model"
provider: universal
model: Qwen/Qwen2.5-1.5B-Instruct
base_url: http://127.0.0.1:11540/v1
powerful:
description: "More capable model"
provider: universal
model: Qwen/Qwen2.5-7B-Instruct
base_url: http://127.0.0.1:11540/v1
# System prompts
prompts:
- name: default
messages:
- role: system
content: You are a helpful assistant.
# RAG configuration
rag:
databases:
- name: main_db
type: ChromaStore
default_embedding_strategy: default_embeddings
default_retrieval_strategy: semantic_search
embedding_strategies:
- name: default_embeddings
type: UniversalEmbedder
config:
model: sentence-transformers/all-MiniLM-L6-v2
base_url: http://127.0.0.1:11540/v1
retrieval_strategies:
- name: semantic_search
type: BasicSimilarityStrategy
config:
top_k: 5
data_processing_strategies:
- name: default
parsers:
- type: PDFParser_LlamaIndex
config:
chunk_size: 1000
chunk_overlap: 100
- type: MarkdownParser_Python
config:
chunk_size: 1000
extractors: []
# Dataset definitions
datasets:
- name: research
data_processing_strategy: default
database: main_db
Use ${VAR} syntax to inject secrets from .env files:
runtime:
models:
openai:
api_key: ${OPENAI_API_KEY}
# With default: ${OPENAI_API_KEY:-sk-default}
# From specific file: ${file:.env.production:API_KEY}
See the Configuration Guide for complete reference.
LlamaFarm provides an OpenAI-compatible REST API:
Chat Completions
curl -X POST http://localhost:14345/v1/projects/default/my-project/chat/completions \
-H "Content-Type: application/json" \
-d '{
"messages": [{"role": "user", "content": "Hello"}],
"stream": false,
"rag_enabled": true
}'
RAG Query
curl -X POST http://localhost:14345/v1/projects/default/my-project/rag/query \
-H "Content-Type: application/json" \
-d '{
"query": "What are the requirements?",
"database": "main_db",
"top_k": 5
}'
See the API Reference for all endpoints.
The Universal Runtime provides endpoints beyond chat:
curl -X POST http://localhost:14345/v1/vision/ocr \
-F "file=@document.pdf" \
-F "model=surya"
LlamaFarm supports 12+ anomaly detection algorithms via PyOD, with both batch and streaming modes.
# Train on normal data
curl -X POST http://localhost:14345/v1/ml/anomaly/fit \
-H "Content-Type: application/json" \
-d '{"model": "sensor-detector", "backend": "ecod", "data": [[22.1], [23.5], ...]}'
# Detect anomalies
curl -X POST http://localhost:14345/v1/ml/anomaly/detect \
-H "Content-Type: application/json" \
-d '{"model": "sensor-detector", "data": [[22.0], [100.0], [23.0]], "threshold": 0.5}'
# Streaming detection (handles cold start, auto-retraining, sliding windows)
curl -X POST http://localhost:14345/v1/ml/anomaly/stream \
-H "Content-Type: application/json" \
-d '{"model": "live-sensor", "data": {"temperature": 72.5}, "backend": "ecod"}'
Available backends: ecod (recommended), isolation_forest, one_class_svm, local_outlier_factor, autoencoder, hbos, copod, knn, mcd, cblof, suod, loda
See the Models Guide for complete documentation.
Give models access to external tools via the Model Context Protocol:
# In llamafarm.yaml
mcp:
servers:
- name: filesystem
transport: stdio
command: npx
args: ['-y', '@modelcontextprotocol/server-filesystem', '/data']
runtime:
models:
- name: assistant
provider: ollama
model: llama3.1:8b
mcp_servers: [filesystem]
LlamaFarm also exposes its own API as MCP tools for use with Claude Desktop, Cursor, and other MCP clients. See the Tool Calling Guide.
| Example | Description | Location |
|---|---|---|
| RAG Examples | ||
| Large Complex PDFs | Multi-megabyte planning ordinances | examples/large_complex_rag/ |
| Many Small Files | FDA correspondence letters | examples/many_small_file_rag/ |
| Mixed Formats | PDF, Markdown, HTML, text, and code | examples/mixed_format_rag/ |
| Quick Notes | Rapid smoke tests with small files | examples/quick_rag/ |
| Anomaly Detection | ||
| Quick Start | Simplest anomaly detection example | examples/anomaly/01_quick_start.py |
| Fraud Detection | Training, saving, loading models | examples/anomaly/02_fraud_detection.py |
| Streaming Sensors | IoT monitoring with rolling features | examples/anomaly/03_streaming_sensors.py |
| Backend Comparison | Compare all 12 algorithms | examples/anomaly/04_backend_comparison.py |
| Use Cases | ||
| FDA Letters Assistant | Regulatory document analysis | examples/fda_rag/ |
| Government Planning | Large ordinance documents | examples/gov_rag/ |
See examples/README.md for setup instructions and the full list.
LlamaFarm is used across industries for document analysis, monitoring, and fraud detection:
# Python server tests
cd server && uv sync && uv run --group test python -m pytest
# CLI tests
cd cli && go test ./...
# RAG tests
cd rag && uv sync && uv run pytest tests/
# Universal Runtime tests
cd runtimes/universal && uv sync && uv run pytest tests/
# Build docs
nx build docs
cli/cmd/See the Extending Guide for step-by-step instructions.
Licensed under the Apache 2.0 License. See CREDITS for acknowledgments.
Build locally. Deploy anywhere. Own your AI.
.agents/
commands/
commit.md
describe_pr.md
founder_mode.md
github_issues.md
plan.md
research.md
rules/
cli.mdc
formatting.mdc
.claude/
rules/
git_workflow.md
llama_cpp_bindings.md
pr_workflow.md
reflect.md
settings.json
skills/
cli-skills/
bubbletea.md
cobra.md
performance.md
SKILL.md
code-review/
backend.md
frontend.md
SKILL.md
commit-push-pr/
SKILL.md
common-skills/
huggingface.md
SKILL.md
config-skills/
jsonschema.md
pydantic.md
SKILL.md
designer-skills/
performance.md
radix.md
SKILL.md
tailwind.md
tanstack-query.md
electron-skills/
electron.md
performance.md
security.md
SKILL.md
fix-ci/
SKILL.md
generate-subsystem-skills/
SKILL.md
subsystem-registry.md
go-skills/
concurrency.md
error-handling.md
patterns.md
security.md
SKILL.md
testing.md
python-skills/
async.md
error-handling.md
patterns.md
security.md
SKILL.md
testing.md
typing.md
rag-skills/
celery.md
chromadb.md
llamaindex.md
performance.md
SKILL.md
react-skills/
components.md
hooks.md
performance.md
security.md
SKILL.md
state.md
reflect/
SKILL.md
runtime-skills/
fastapi.md
performance.md
pytorch.md
SKILL.md
transformers.md
server-skills/
celery.md
fastapi.md
performance.md
pydantic.md
SKILL.md
temp-files/
SKILL.md
typescript-skills/
patterns.md
security.md
SKILL.md
testing.md
typing.md
wt/
SKILL.md
.cursor/
mcp.json
.cursorrules
.dockerignore
.editorconfig
.env.example
.github/
actions/
prose-changelog/
action.yml
generate.sh
llamafarm.yaml
update-pr-coverage/
action.yml
ADDON_TESTING.md
ADDON_WORKFLOW_GUIDE.md
ISSUE_TEMPLATE/
bug_report.md
feature_request.md
workflows/
build-addon-wheels.yml
build-llama.yml
ci.yml
cli-installer.yml
cli.yml
conventional-commits.yml
desktop.yml
docker.yml
docs.yml
e2e.yml
generate-prose-changelog.yml
pyapp.yml
release-cli.yml
release-desktop.yml
release-docker.yml
release.yml
snapshot-release.yml
test-addon-branch.yml
update-changelog-docs.yml
update-contributors.yml
.gitignore
.mcp.json
.nx/
nxw.js
.pre-commit-config.yaml
.release-please-manifest.json
.ruff-standard.md
addons/
platforms.yaml
README.md
registry/
adtk.yaml
catboost.yaml
drift.yaml
onnxruntime.yaml
speech.yaml
stt.yaml
timeseries.yaml
tts.yaml
vision.yaml
AGENTS.md
CHANGELOG.md
CLAUDE.md
cli/
cmd/
addons_downloader_test.go
addons_downloader.go
addons_registry_embed.go
addons_registry.go
addons_state.go
addons_test.go
addons_venv_test.go
addons_venv.go
addons.go
bundle_test.go
bundle.go
chat_client_test.go
chat_client.go
chat_manager.go
chat.go
config/
config_schema_test.go
config.go
deployment_test.go
deployment.go
environments_test.go
environments.go
generate-types.sh
context.go
controller.go
datasets.go
deploy.go
dev.go
init.go
models_path_test.go
models_path.go
models_pull.go
models_shared.go
models_test.go
models.go
orchestrator/
deploy_mode_test.go
deploy_mode.go
hardware_detect_test.go
hardware_detect.go
hardware_wheels_test.go
hardware_wheels.go
llama_binary_test.go
llama_binary.go
orchestrator.go
process_check_test.go
process_check_unix.go
process_check_windows.go
process_manager_lock_unix.go
process_manager_lock_windows.go
process_manager_test.go
process_manager.go
pyapp_binary_manager_test.go
pyapp_binary_manager.go
services_test.go
services.go
projects_list_test.go
projects_test.go
projects.go
rag_manage.go
rag_query.go
rag_shared.go
rag_stats_test.go
rag_stats.go
rag.go
registry/
.gitignore
root.go
runtime_binary.go
services_logs_test.go
services_logs.go
services_status.go
services_systemd.go
services_types.go
services.go
tool_handlers.go
tui_chat_test.go
tui_chat.go
url_utils_test.go
url_utils.go
utils/
cwd.go
dirs.go
format_test.go
format.go
formatting.go
httpclient_test.go
httpclient.go
log_test.go
log.go
output_test.go
output.go
ping.go
urls.go
version/
version.go
upgrade_checker_test.go
upgrade_checker.go
upgrade_download_test.go
upgrade_download.go
upgrade_integration_test.go
upgrade_platform_test.go
upgrade_platform.go
upgrade_utils_test.go
upgrade_utils.go
version.go
watcher.go
go.mod
go.sum
hack/
quick-upgrade-test.sh
test-install.sh
test-installer-comprehensive.sh
test-installer-docker.sh
test-installer-local.sh
test-installer-quick.sh
test-version-upgrade.sh
internal/
buildinfo/
version.go
hfcache/
hfcache_test.go
hfcache.go
hfmodel/
client_test.go
client.go
doc.go
downloader_test.go
downloader.go
errors.go
gguf_select_test.go
gguf_select.go
lock_unix.go
lock_windows.go
multifile_test.go
multifile.go
offline.go
symlink.go
token_test.go
token.go
llamabinary/
download_test.go
extract.go
llamabinary_test.go
llamabinary.go
modelformat/
modelformat_test.go
modelformat.go
tui/
menu.go
toast.go
main.go
project.json
README.md
tools/
copy/
main.go
cover2lcov/
main.go
coverreport/
main.go
CODE_OF_CONDUCT.md
common/
llamafarm_common/
__init__.py
device.py
model_cache.py
model_dir.py
model_format.py
model_utils.py
offline_mode.py
pidfile.py
safe_home.py
pyproject.toml
README.md
tests/
__init__.py
test_model_dir.py
test_model_format_offline.py
test_model_format.py
test_model_utils_offline.py
test_model_utils.py
test_offline_mode.py
uv.lock
config/
__init__.py
.gitignore
compile_schema.py
defaults/
__init__.py
parser_defaults.py
generate_types.py
generate-go-types.sh
generate-types.sh
helpers/
__init__.py
component_resolver.py
generator.py
loader.py
strategy_resolver.py
project.json
pyproject.toml
README.md
schema.yaml
templates/
advanced.yaml
default.yaml
tests/
__init__.py
conftest.py
invalid_config.yaml
minimal_config.yaml
run_tests.py
sample_config.toml
sample_config.yaml
test_compile_schema.py
test_config_loader.py
test_config_writer.py
test_edge_cases.py
test_editable_install.py
test_integration.py
test_strategy_resolver.py
test_url_replacement.py
uv.lock
validate_config.py
validate-go-types.sh
validators.py
CONTRIBUTING.md
deployment/
docker_compose/
... 1600 moreShowing a partial view of a very large repo.
FAQ
llamafarm is a Claude Code plugin with 19 hand-picked skills for development work, indexed on Flowy. Install it with the command on its page. It includes cli-skills, code-review, commit-push-pr. Its skills do not fire on their own yet. Request auto-invocation to have Flowy route them as you prompt. Free and open source.