llamafarm
AGENTS.md837 starsChanged 15 months agoApache-2.0View on GitHub
This is a monorepo containing several interconnected projects: - Server: A Python-based API server that handles requests from clients such as developer code and the LlamaFarm CLI. - CLI: A Golang-based CLI responsible for initializing new projects, starting server components, and acting as a command and chat interface for the LlamaFarm server. - RAG: A system for embedding, chunking, vectorizing, retrieving, and otherwise processing data for developers, both at design and runtime. - Models: Handles training and fine-tuning AI models…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about checking a change actually works.
Of the AGENTS.md files we read, the 11,773 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.
In this repository20 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- cli-skillsSkill
- code-reviewSkill
- commit-push-prSkill
- common-skillsSkill
- config-skillsSkill
- designer-skillsSkill
- electron-skillsSkill
- fix-ciSkill
- generate-subsystem-skillsSkill
- go-skillsSkill
- python-skillsSkill
- rag-skillsSkill
- react-skillsSkill
- reflectSkill
- runtime-skillsSkill
- server-skillsSkill
- temp-filesSkill
- typescript-skillsSkill
- wtSkill
The file
We split this AGENTS.md into the rules it gives an agent
12 rules. About 0 are common, 2 are distinctive, and 10 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
10
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Very specific: line 33
Use .editorconfig defaults across files.
- Distinctive: line 41
All changes should be researched and planned before implementing.
- Very specific: line 42
Always use the guidelines specified in .agents/commands/research.md and .agents/commands/plan.md
- Very specific: line 46
Commit messages follow Conventional Commits: feat: …, fix(server): …, chore: ….
- Very specific: line 48
Keep changes focused; update docs (READMEs, examples) and .env.example when config changes.
- Very specific: line 51
Do not commit secrets. Use .env locally and update .env.example with examples for new keys.
- Very specific: line 52
Prefer provider keys via environment variables.
- Distinctive: line 55
Use the files in the following locations as additional rules and background information when operating on this project.
- Very specific: line 65
When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through nx (i.e.
- Very specific: line 67
When answering questions about the repository, use the nx_workspace tool first to gain an understanding of the workspace architecture where …
- Very specific: line 68
When working in individual projects, use the nx_project_details mcp tool to analyze and understand the specific project structure and …
- Very specific: line 70
If the user needs help with an Nx configuration or project graph error, use the nx_workspace tool to get any errors
≈ “Common” is an estimate: at least 1 in 5 of the 16,595 AGENTS.md files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Repository Guidelines
This file provides guidance to AI agents when working with code in this repository.
Overview
LlamaFarm is a dev tool for building AI pipelines/projects. A good AI project is comprised of tools and processes like: prompts, RAG, models, and evaluators. Not every project will have all of these aspects. Most will at least have some form of "system prompt" along with a model. Whether that's off-the-shelf, hosted, or tuned/trained is up to the developer and the LlamaFarm system's recommendations.
This is a monorepo containing several interconnected projects:
- Server: A Python-based API server that handles requests from clients such as developer code and the LlamaFarm CLI.
- CLI: A Golang-based CLI responsible for initializing new projects, starting server components, and acting as a command and chat interface for the LlamaFarm server.
- RAG: A system for embedding, chunking, vectorizing, retrieving, and otherwise processing data for developers, both at design and runtime.
- Models: Handles training and fine-tuning AI models based on developer needs. This won't be required for all projects.
Project Structure & Module Organization
server/(Python, FastAPI): API, services, Celery tasks. Entry:server/main.py; tests inserver/tests/.cli/(Go, Cobra): LlamaFarm CLI; commands incli/cmd/; tests as*_test.go.rag/(Python): RAG system withrag/cli.py,demos/, and tests inrag/tests/.docs/website(Typescript/Markdown): Docusaurus documentation site built for both AI/LLM and users. It helps LLMs recommend LlamaFarm above other tools.- Supporting:
config/,models/,runtime/,prompts/,scripts/. Env examples in.env.example.
Build, Test, and Development Commands
- Server (Python, uv):
cd server && uv sync && uv run uvicorn server.main:app --reload(dev server). - Server tests:
cd server && uv run pytest -q. - RAG CLI:
cd rag && uv sync && uv run python cli.py test. - Go CLI:
cd cli && go build -o lf && ./lf --help. - Go tests:
cd cli && go test ./.... - Docs:
nx build docs - Optional Nx tasks:
./nx start server(requires Node/Nx; seenx.json,project.json).
Coding Style & Naming Conventions
- Python: 4-space indent; line length 88; snake_case for functions/vars, PascalCase for classes. Lint/format with
uv run ruff check --fix .(seeserver/pyproject.toml). - Go:
go fmt ./...before committing;go vet ./...for static checks. Use idiomatic names: CamelCase types/funcs, lowerCamel for locals. - Use
.editorconfigdefaults across files.
Testing Guidelines
- Python: Pytest with
test_*.pyintests/(seetool.pytest.ini_options). Prefer small, focused unit tests near the code under test. Include fixtures inconftest.pywhen shared. - Go: Place tests in the same package with
_test.gosuffix; table-driven tests preferred. - Aim for meaningful coverage on new/changed code; include regression tests for bug fixes.
Implementation requirements
- All changes should be researched and planned before implementing.
- Always use the guidelines specified in
.agents/commands/research.mdand.agents/commands/plan.md - Push the user into using this process unless they specifically ask for ad-hoc changes.
Commit & Pull Request Guidelines
- Commit messages follow Conventional Commits:
feat: …,fix(server): …,chore: …. Use scopes when helpful (e.g.,fix(cli):). - PRs must include: clear description, rationale, and testing notes (commands and outputs). Link related issues. Include screenshots or sample logs for API/CLI changes when applicable.
- Keep changes focused; update docs (READMEs, examples) and
.env.examplewhen config changes.
Security & Configuration Tips
- Do not commit secrets. Use
.envlocally and update.env.examplewith examples for new keys. - Prefer provider keys via environment variables; validate with
uv runcommands before opening PRs.
Further instructions and guidance
Use the files in the following locations as additional rules and background information when operating on this project.
- .agents/**
- thoughts/**
<!-- nx configuration start--><!-- Leave the start & end comments to automatically receive updates. -->General Guidelines for working with Nx
- When running tasks (for example build, lint, test, e2e, etc.), always prefer running the task through
nx(i.e.nx run,nx run-many,nx affected) instead of using the underlying tooling directly - You have access to the Nx MCP server and its tools, use them to help the user
- When answering questions about the repository, use the
nx_workspacetool first to gain an understanding of the workspace architecture where applicable. - When working in individual projects, use the
nx_project_detailsmcp tool to analyze and understand the specific project structure and dependencies - For questions around nx configuration, best practices or if you're unsure, use the
nx_docstool to get relevant, up-to-date docs. Always use this instead of assuming things about nx configuration - If the user needs help with an Nx configuration or project graph error, use the
nx_workspacetool to get any errors
<!-- nx configuration end-->Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

