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/artesiana/agent2/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.svg" alt="Measured on agentmods" 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 | $0.01420 | $0.01420 |
| Opus 5 | $0.00710 | $0.00710 |
| Sonnet 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 4d 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.
- 4d 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 (36 stars, last pushed 3mo ago), licensed MIT. It adds 1,420 tokens to every session, about $0.0071 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
aiwg AGENTS.md
AGENTS.md instructions for jmagly/aiwg, covering agents.md, provider workspace bootstrap and framework context.
geolens CLAUDE.md
Instructions for geolens-io/geolens: This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
substack-gateway-oss CLAUDE.md
Instructions for jakub-k-slys/substack-gateway-oss, covering claude.md, commands, install dependencies (dev included, all workspace members), run the server (dev mode with reload) and lint.
deckforge CLAUDE.md
Instructions for Whatsonyourmind/deckforge, covering deckforge, tech stack, project structure, key commands and local development.
dev-challenge CLAUDE.md
Instructions for micheltlutz/dev-challenge, covering claude.md, the one rule to internalise, slash commands, subagents and skills.
ILLIP AGENTS.md
Instructions for Yashwanth-pilli/ILLIP, covering illip ai - agent framework documentation, agents, 1. planner agent, 2. builder agent and 3. reviewer agent.