cursorrules

A set of repository instructions for coding agents working on LlamaFarm, a command-line tool and server for configuring data, searching it, and using it in AI chats.

In plain words
What is it for?
Use it when changing the LlamaFarm CLI, server, background workers, documentation, configuration files, or supported extensions such as data stores and parsers.
Why use it?
It gives automated tools the project structure, technologies, and rules they need to make changes that stay consistent across code and documentation.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/llama-farm/llamafarm/cursorrules
Clone the repo
git clone --depth 1 https://github.com/llama-farm/llamafarm

Made for: Cursor.

Per session 3,501 This file is loaded in full into every session.
When invoked 3,501 The same file — it is already loaded in full.
Security scan D 3 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.03501 $0.03501
Opus 5 $0.01750 $0.01750
Sonnet 5 $0.00700 $0.00700
Haiku 4.5 $0.00350 $0.00350

Measured 2d ago against content hash 385d0ff7729f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade D, and why

cursorrules scanned grade D with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Asks for rootmediumPrivilege escalation

A mod that escalates privileges can change anything on the machine, not only the project.

sudo mv lf /usr/local/bin/

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://raw.githubusercontent.com/llama-farm/llamafarm/main/install.sh | bash

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://raw.githubusercontent.com/llama-farm/llamafarm/main/install.sh | bash
.cursorrules · 343 lines

How it starts

The opening of the file, as written. The whole thing — 343 lines — stays where its author put it; the contents beside it link to each section on GitHub.

LlamaFarm Repository Guidelines for Cursor & Automated Coding Agents

This repository powers the LlamaFarm CLI + server for retrieval-augmented AI workflows. Automated tools that reason about or modify the codebase should follow the guidance below. Think of this file as the “living handbook” for LLM coding agents.


1. High-Level Overview

  • Primary goal: Provide a CLI (lf) and API server for configuring projects, ingesting datasets, and running RAG-enhanced chat sessions.
  • Stack:
    • CLI: Go (Cobra) under cli/
    • Server: Python (FastAPI) under server/
    • RAG worker: Python/Celery under rag/
    • Docs site: Docusaurus (Node/Nx) under docs/website/
  • Configuration: Driven by llamafarm.yaml, defined via JSON Schema in config/schema.yaml and rag/schema.yaml.
  • Extensibility: Designed to allow new runtime providers, vector stores, parsers, extractors, and CLI commands.

Agents must keep documentation and code aligned—any change to workflows or schema requires updates across README + docs.


2. Prerequisites & Installation

Required Software

  1. Dockerlf start spins up the API and Celery worker automatically via Docker.
  2. Ollama – current default runtime (download from https://ollama.com/download). Additional providers will follow the OpenAI-compatible API pattern.
  3. CLI (lf) – install first; sources are at the repo root, but the standard install is via script.

CLI Installation (macOS/Linux)

curl -fsSL https://raw.githubusercontent.com/llama-farm/llamafarm/main/install.sh | bash
  • Script auto-detects platform, downloads latest binary, and installs to /usr/local/bin by default. Accepts --install-dir and --version flags if customization is needed.

CLI Installation (Windows)

Optional Development Stack Installations

If you need to run components manually (instead of through the CLI):

  • Python 3.10+
  • uv package manager (curl -LsSf https://astral.sh/uv/install.sh | sh)
  • Go 1.24+ (for building CLI from source or in forks)
  • Node.js + pnpm (for doc site maintenance)

Read the full file on GitHub · 343 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 343 lines · 3,501 tokens per session scan D 385d0ff7729f

Subscribe to this mod's changes

cursorrules is a cursor rule published in the GitHub repository llama-farm/llamafarm (837 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 3,501 tokens to every session, about $0.0175 per session on Opus 5. A static security scan graded it D with 3 findings (asks for root, downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.