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.
npx agentmods add instructions/mudler/localai/agents-mdgit clone --depth 1 https://github.com/mudler/LocalAIWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.01895 | $0.01895 |
| Opus 5 | $0.00948 | $0.00948 |
| Sonnet 5 | $0.00379 | $0.00379 |
| Haiku 4.5 | $0.00189 | $0.00189 |
Grade A, and why
LocalAI AGENTS.md scanned grade A with 0 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.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 52 lines — stays where its author put it; the contents beside it link to each section on GitHub.
LocalAI Agent Instructions
This file is the entry point for AI coding assistants (Claude Code, Cursor, Copilot, Codex, Aider, etc.) working on LocalAI. It is an index to detailed topic guides in the .agents/ directory. Read the relevant file(s) for the task at hand — you don't need to load all of them.
Human contributors: see CONTRIBUTING.md for the development workflow.
Policy for AI-Assisted Contributions
LocalAI follows the Linux kernel project's guidelines for AI coding assistants. Before submitting AI-assisted code, read .agents/ai-coding-assistants.md. Key rules:
- No
Signed-off-byfrom AI. Only the human submitter may sign off on the Developer Certificate of Origin. - No
Co-Authored-By: <AI>trailers. The human contributor owns the change. - Use an
Assisted-by:trailer to attribute AI involvement. Format:Assisted-by: AGENT_NAME:MODEL_VERSION [TOOL1] [TOOL2]. - The human submitter is responsible for reviewing, testing, and understanding every line of generated code.
Topics
| File | When to read |
|---|---|
| .agents/ai-coding-assistants.md | Policy for AI-assisted contributions — licensing, DCO, attribution |
| .agents/building-and-testing.md | Building the project, running tests, Docker builds for specific platforms |
| .agents/ci-caching.md | CI build cache layout (registry-backed BuildKit cache on quay.io/go-skynet/ci-cache, per-arch keys), DEPS_REFRESH weekly cache-buster for unpinned Python deps, prebuilt base-grpc-* images for llama.cpp variants, per-arch native + manifest-merge pattern, setup-build-disk /mnt relocation, path filter on master push, manual eviction |
| .agents/adding-backends.md | Adding a new backend (Python, Go, or C++) — full step-by-step checklist, including importer integration (the /import-model dropdown is server-driven from GET /backends/known) |
| .agents/coding-style.md | Code style, editorconfig, logging, documentation conventions |
| .agents/llama-cpp-backend.md | Working on the llama.cpp backend — architecture, updating, tool call parsing |
| .agents/vllm-backend.md | Working on the vLLM / vLLM-omni backends — native parsers, ChatDelta, CPU build, libnuma packaging, backend hooks |
| .agents/sglang-backend.md | Working on the SGLang backend — engine_args validation against ServerArgs, speculative-decoding (EAGLE/EAGLE3/DFLASH/MTP) recipes, parser handling |
| .agents/ds4-backend.md | Working on the ds4 backend - DSML state machine, thinking modes, KV cache, Metal+CUDA matrix |
| .agents/testing-mcp-apps.md | Testing MCP Apps (interactive tool UIs) in the React UI |
| .agents/api-endpoints-and-auth.md | Adding API endpoints, auth middleware, feature permissions, user access control |
| .agents/debugging-backends.md | Debugging runtime backend failures, dependency conflicts, rebuilding backends |
| .agents/adding-gallery-models.md | Adding GGUF models from HuggingFace to the model gallery |
| .agents/localai-assistant-mcp.md | LocalAI Assistant chat modality — adding admin tools to the in-process MCP server, editing skill prompts, keeping REST + MCP + skills in sync |
| .agents/backend-signing.md | Backend OCI image signing (keyless cosign + sigstore-go) — producer-side CI setup, consumer-side gallery verification: block, strict mode (LOCALAI_REQUIRE_BACKEND_INTEGRITY), revocation via not_before |
| .agents/preparing-a-release.md | Cutting a release: PR labels, RELEASE_NOTES_vX.Y.Z.md, the blog post under website/content/blog/, and the demo clips under website/static/media/ |
| .impeccable.md | Design context for UI/UX work — users, brand personality, aesthetic direction, and design principles |
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.
- 2d ago First seen · 52 lines · 1,895 tokens per session scan A 3a2d1358db1a
LocalAI AGENTS.md is an instructions file published in the GitHub repository mudler/LocalAI (48,808 stars, last pushed today), licensed MIT. It adds 1,895 tokens to every session, about $0.0095 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.
Other instructions, from other repositories
ollama CLAUDE.md
Claude Code instructions for ollama/ollama: See AGENTS.md for the shared agent instructions for this repository.
Kokoro-FastAPI AGENTS.md
AGENTS.md instructions for remsky/Kokoro-FastAPI, covering agents.md, layout, commands, conventions and gotchas.
gorest AGENTS.md
Instructions for pilinux/gorest, covering agents.md, project overview, build and run commands, build and tidy dependencies.
gmgn-skills CLAUDE.md
Instructions for GMGNAI/gmgn-skills, covering claude.md, critical rule — read this first, project overview, available skills and quick decision guide.
cli AGENTS.md
Instructions for nylas/cli, covering ai coding agent guidelines, quick reference: shared helpers, quick reference: adding a new feature and quick reference: credential storage.
nango CLAUDE.md
Claude Code instructions for NangoHQ/nango, a project described as: Build product integrations with AI.