Borrowing it
Nothing to install: this file belongs to Artesiana/agent2. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Artesiana/agent2/main/AGENTS.mdgit clone --depth 1 https://github.com/Artesiana/agent2Wrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/instructions/artesiana/agent2/agents-md)<a href="https://agentmods.dev/instructions/artesiana/agent2/agents-md"><img src="https://agentmods.dev/badge/instructions/artesiana/agent2/agents-md/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/instructions/artesiana/agent2/agents-md"><img src="https://agentmods.dev/badge/instructions/artesiana/agent2/agents-md.svg" alt="Reviewed on agentmods" width="80" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.01420 | $0.01420 |
| Opus 5.5 | $0.00568 | $0.00568 |
| Sonnet 5.5 | $0.00284 | $0.00284 |
| Haiku 4.5 | $0.00142 | $0.00142 |
Grade A, and why
agent2 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 2mo 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 — 132 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Agent2
Agent2 turns domain experts into production AI agents. The goal is not to build deterministic scripts with a thin prompt on top. The goal is to clone how a professional works: their workspace, books, tools, memory, review process, judgment calls, clarification loops, and final typed work product.
Read llms.txt for the compact map and
llms-full.txt for expanded framework context.
Build and test
uv sync --extra dev
uv run pytest tests/ -v
# Agent2 v0.3 CLI
uv run agent2 setup --dry-run
uv run agent2 onboard --from-spec tests/fixtures/roofing-agent-spec.json --no-llm --overwrite
uv run agent2 doctor --json
# Core stack
docker compose up -d
# Full stack with RAG, Knowledge MCP, OCR, and full-pattern examples
docker compose --profile full up -d
Agent2 mental model
- A domain agent is a professional at a desk, not a rules engine.
- The prompt teaches the expert's Sachbearbeiter Chain-of-Thought; books contain what the expert knows.
- Domain knowledge belongs in R2R knowledge collections, not hardcoded lookup tables or giant prompts.
- Every serious domain agent should have three mutually exclusive outcomes: complete/approved, needs_clarification, or rejected.
- Pydantic schemas are contracts. Use
model_validatorto prevent contradictory states such as approved plus rejection reason. - Side effects are sandboxed. Agents propose
pending_actions; hosts or humans execute them through the approval workflow. - Multi-turn work resumes through
message_history, not by reprocessing the case from scratch.
Runtime rules
shared/is framework code.- Agent business logic lives in
agents/<name>/. agent2.yamlis the global source of truth for default model, provider policy, stack profile, telemetry, and framework ports.- Build agents with
create_agent()fromshared/runtime.py. - Build apps with
create_app()fromshared/api.py. - Use
agent2 setupfor local.env/agent2.yamlgeneration andagent2 onboardfor Brain Clone agent scaffolding before hand-editing files. - Use
instructions=, notsystem_prompt=, for new code. system_prompt=exists only as a compatibility alias.- Use
toolsets=[]when no MCP tools are attached. - Use
before_run()for dynamic_instructions, request-scoped knowledge collections, resume hints, input guards, and per-run_toolsets. - Per-run
_toolsetsfrombefore_run()are supported by the API runtime and passed toAgent.run(toolsets=...); they are stripped from the user prompt. - Model resolution order is explicit runtime argument, agent
config.yaml,agent2.yaml, then env fallback. - Errors must be RFC 7807
application/problem+json.
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.
- 2mo ago First seen · 132 lines · 1,420 tokens per session scan A 1ec2d5e2a209
agent2 AGENTS.md is an instructions file published in the GitHub repository Artesiana/agent2 (37 stars, last pushed 6mo ago), licensed MIT. It adds 1,420 tokens to every session, about $0.0057 per session on Opus 5.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.
agent2 AGENTS.md compared with instructions from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| agent2 AGENTS.mdArtesiana/agent2 | Instructions file | 37 | 6mo ago | MIT | A | 1,420 | Codex, OpenCode |
| vscode buildNext.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 9,719 | GitHub Copilot |
| next.js AGENTS.mdvercel/next.js | Instructions file | 143k | today | MIT | A | 7,461 | Codex, OpenCode |
| langchain AGENTS.mdlangchain-ai/langchain | Instructions file | 149k | today | MIT | A | 4,680 | Codex, OpenCode |
| vscode oss-third-party-notices.instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 5,516 | GitHub Copilot |
| vscode copilot-instructions.mdmicrosoft/vscode | Instructions file | 195k | today | MIT | A | 3,093 | GitHub Copilot |
| deepseek-harness AGENTS.mddeepseek-ai/deepseek-harness | Instructions file | 274k | 2d ago | MIT | A | 4,313 | Codex, OpenCode |