autonomous-ai-agency
AGENTS.md12 starsChanged 29 days agoMITView on GitHub
This document covers the coding agents exposed by local-llm-server, with a focus on FreeBuff — a self-hosted, Codebuff-style coding agent that runs on free NVIDIA NIM models and is controllable from your phone via Telegram. For the underlying three-role orchestration loop (planner → executor → verifier) see agent/CLAUDE.md and docs/architecture/agent-orchestration.md. FreeBuffAgent (in agent/loop.py) is a thin subclass of AgentRunner that pins model selection to a curated set of free NVIDIA NIM models. It reuses the full plan → execute →…
- Reads credentials
Where files are headingNew AGENTS.md files have more rules about keeping secrets out of the code, and fewer about code style.
Of the AGENTS.md files we read, the 33,315 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 repository22 other files it gives its agents.
- AGENTS.mdAGENTS.md
- agent/CLAUDE.mdCLAUDE.md
- CLAUDE.mdCLAUDE.md
- router/CLAUDE.mdCLAUDE.md
- .github/copilot-instructions.mdCopilot instructions
- .cursor/rules/verification.mdcCursor rule
- agentic-agileSkill
- agentic-portfolioSkill
- client-onboardingSkill
- cooldown-resumeSkill
- drillSkill
- ecc-harness-patternsSkill
- fabric-patternsSkill
- graphiti-temporalSkill
- managed-agents-dreamsSkill
- model-catalogue-updateSkill
- platform-setupSkill
- repowise-intelligenceSkill
- risky-module-reviewSkill
- seo-audit-reportSkill
- user-researchSkill
- video-contextSkill
The file
We split this agents.md into the rules it gives an agent
4 rules. About 0 are common, 1 is distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 14
No "done" without an independent verifier (pstack): Before any task is reported done, by a coding agent or by an agency agent, a verifier …
- Very specific: line 55
When NVIDIA_API_KEY (or NVidiaApiKey) is set, the runner is pinned to the NVIDIA NIM base URL (https://integrate.api.nvidia.com/v1) with …
- Very specific: line 62
All endpoints require a valid API key (Authorization: Bearer <key> or x-api-key: <key>), same as the rest of the proxy.
- Very specific: line 89
Before any PR opens, agent/pr_gate.py checks the change in the agent's own clone and the PR stays closed on any blocker:
≈ “Common” is an estimate: at least 1 in 5 of the 42,283 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
Agents
This document covers the coding agents exposed by local-llm-server, with a
focus on FreeBuff — a self-hosted, Codebuff-style coding agent that runs on
free NVIDIA NIM models and is controllable from your phone via Telegram.
For the underlying three-role orchestration loop (planner → executor → verifier)
see agent/CLAUDE.md and docs/architecture/agent-orchestration.md.
Verification rule (mirrored from CLAUDE.md §2, binding on every agent)
<!-- pstack-verification:start -->- No "done" without an independent verifier (pstack). Before any task is reported
done, by a coding agent or by an agency agent, a verifier that did not write the
change tries to break it. It exercises the real artifact (runs the feature, the
tests, the built page; not "it compiles", not the author's own report) and returns
PASS,PASS+NOTES, orFAILwith a report: what it checked, what it found broken, what was fixed, and the evidence (command output; screenshots for any UI change).FAILsends the work back: fix every defect it found, then verify again, until it passes. OnlyPASSorPASS+NOTESpermits a done claim, and the report quotes that verdict. Work in small units that each end in a check. Agency tasks enforce this in code (tasks/verification.py, live controlTASK_VERIFICATION_REQUIRED). Source: pstack'sprinciple-prove-it-worksand its independent per-PR verdict (github.com/cursor/plugins/tree/main/pstack, github.com/michael-denyer/pstack-claude). This rule is mirrored byte-for-byte in every agent instruction file;python scripts/check_verification_rule.pyfails if a copy drifts.
<!-- pstack-verification:end -->FreeBuff — free-NVIDIA coding agent
FreeBuffAgent (in agent/loop.py) is a thin subclass of AgentRunner that
pins model selection to a curated set of free NVIDIA NIM models. It reuses
the full plan → execute → verify loop and all existing WorkspaceTools file
operations, but it will never route to a paid endpoint — resolve_model()
coerces any non-free model request back to a free one.
Free model set
The default free models are:
| Model | Role |
nvidia/llama-3.3-nemotron-super-49b-v1 | heavy reasoning / execution |
qwen/qwen2.5-coder-32b-instruct | coding |
meta/llama-3.3-70b-instruct | general |
meta/llama-3.1-8b-instruct | fast / cheap |
deepseek-ai/deepseek-r1 | reasoning |
Override the list with FREEBUFF_MODELS (comma-separated) for new-model
rollouts without touching code.
When NVIDIA_API_KEY (or NVidiaApiKey) is set, the runner is pinned to the
NVIDIA NIM base URL (https://integrate.api.nvidia.com/v1) with the key in the
Authorization header. With no key set it falls back to a local OpenAI-compatible
base so construction never fails (tests / local-only deployments).
HTTP API
All endpoints require a valid API key (Authorization: Bearer <key> or
x-api-key: <key>), same as the rest of the proxy.
| Method & path | Purpose |
GET /freebuff/models | List the free models a user can pick. |
POST /freebuff/plan | Generate a read-only plan (no files written) for review. |
POST /freebuff/run | Execute the task; optionally commit and open a draft PR. |
Request body for plan/run (FreeBuffRunRequest):
{
"instruction": "fix the failing health check",
"model": "qwen/qwen2.5-coder-32b-instruct",
"auto_commit": false,
"open_pr": false,
"repo_url": null,
"max_steps": 10
}model is coerced to a free model if a paid/unknown id is supplied. PRs are
never pushed to protected branches directly — the runner isolates changes on a
fresh feature branch and opens a PR (gated by AGENT_AUTO_PR_ENABLED). The repo
target comes from repo_url or the FREEBUFF_REPO_URL env var.
Before any PR opens, agent/pr_gate.py checks the change in the agent's own clone
and the PR stays closed on any blocker:
| Check | Blocks when |
| Protected paths | auth modules (rule 15), App.js/index.html, deploy and CI config, or the gate itself changed |
| Scope | a file changed that no plan step named (tests, changelogs, graph report exempt) |
| Size | a file lost ≥ 40 lines and more than twice what it gained, or was deleted, and the goal did not ask for removal |
| Tests weakened | an existing test lost assertions or gained a skip/xfail/.skip( marker |
| Python | files do not compile; code changed without tests; tests fail |
| Guard suites | model config changed and the catalogue tests fail |
| Frontend | related Jest tests or npm run build fail (reported as not run when node_modules is absent) |
| Changelog | a non-doc change has no entry in both changelogs, or they differ |
| Judge | the judge, shown the real diff and plan, returns REJECTED/BLOCKED or a correctness/security FAIL |
The PR body lists the plan, every check that ran with its result, and the judge's verdict. The plan is also committed as docs/plans/agent/<date>-<slug>.md, and the judge reviews against the target repository's REVIEW.md when it has one.
Recorded agent-PR incidents are replayed against the gate by tests/agent_evals/ (.github/workflows/agent-evals.yml, nightly and on every change to CLAUDE.md, REVIEW.md, skills or prompts). Add a case to tests/agent_evals/gate_cases.yaml for every new incident.
Unlimited by default
FreeBuff is meant to be an unlimited free coding agent, so the /freebuff/*
routes skip the per-key RPM limiter by default (proxy._is_freebuff_unlimited).
The routes are still fully auth-gated (a valid API key is required) and only ever
run free NVIDIA models, so this doesn't open up paid endpoints. To re-impose the
limiter on FreeBuff routes:
FREEBUFF_UNLIMITED=falseSeparately, specific store-backed keys can be exempted from the limiter on all
endpoints via an allowlist (e.g. for the Telegram bot's own key when it also calls
/agent/run or chat):
FREEBUFF_RATELIMIT_EXEMPT_KEY_IDS=kid_telegrambotThis is opt-in (default empty). Legacy keys (no key_id) are never exempt, and
all non-FreeBuff endpoints stay rate-limited as usual.
Telegram phone control
The Telegram bot (telegram_bot.py) drives FreeBuff entirely from a phone using
inline buttons. Admin-only.
/freebuff <task>
- The bot fetches the free model list (
GET /freebuff/models) and shows a model-picker inline keyboard (one button per model). - Tapping a model generates a plan (
POST /freebuff/plan) and shows the steps with ✅ Accept & run / ❌ Reject buttons. - Accept runs the task (
POST /freebuff/runwithauto_commit+open_pr) and reports the result summary and PR URL. - Reject discards the task — nothing is written.
Because planning is read-only, the accept/reject review happens before any code is changed. Callback buttons re-check that the user is an allowed admin, and the per-user FreeBuff state expires when a session is started, accepted, or rejected.
Inline-button callbacks use compact fb:<action>[:<arg>] data (e.g.
fb:model:1, fb:accept, fb:reject); model selection sends an index into
the per-user model list to stay within Telegram's 64-byte callback_data limit.
Running 24×7
To drive FreeBuff from your phone anytime, run the Telegram bot as an always-on
worker (Render free tier or Docker). It runs the agent in-process (embedded
mode) — no proxy server needed — clones the repo, edits on free models, and
opens a draft PR. Full step-by-step: docs/deploy/freebuff-telegram-bot.md.
Environment variables
| Variable | Default | Purpose |
FREEBUFF_MODELS | (built-in list) | Comma-separated free model override. |
FREEBUFF_UNLIMITED | true | When on, /freebuff/* routes skip the RPM limiter. |
FREEBUFF_RATELIMIT_EXEMPT_KEY_IDS | (empty) | key_ids exempt from rate limiting everywhere. |
FREEBUFF_REPO_URL | (none) | Default repo for FreeBuff draft PRs. |
NVIDIA_API_KEY / NVidiaApiKey | (none) | Enables NVIDIA NIM routing. |
AGENT_AUTO_PR_ENABLED | off | Master switch for agent-initiated PRs. |
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.

