Quick Start
stencila agents create my-agent "A helpful coding assistant".stencila/agents/my-agent/AGENT.md--user
stencila agents create my-agent "A helpful coding assistant" --userThe AGENT.md File
AGENT.md
YAML frontmatter — configuration (name, model, provider, tools, etc.) Markdown body (optional) — system instructions appended to the prompt
---
name: code-engineer
description: A general-purpose coding agent
------
name: code-reviewer
description: Reviews code for correctness, style, and security issues
keywords:
- code
- review
- audit
- security
when-to-use:
- when the user asks to review, audit, or critique code changes
- when a pull request needs automated review before merging
when-not-to-use:
- when the user wants to write or generate new code
- when the task is about refactoring rather than review
model: claude-sonnet-4-5
provider: anthropic
reasoning-effort: high
trust-level: medium
allowed-tools:
- read_file
- grep
- glob
- shell
---
You are a code reviewer. When asked to review code:
1. Read the files and understand the change
2. Check for correctness, security issues, and style problems
3. Suggest concrete improvements with code examples
4. Do not modify files — only read and analyzeAgent Names
1–64 characters Only lowercase alphanumeric characters and hyphens No leading, trailing, or consecutive hyphens
thing-role
code-engineer | ||
code-reviewer | ||
data-analyst | ||
site-designer |
name
Directory Structure
agents/.stencila/~/.config/stencila/
.stencila/
agents/
code-engineer/
AGENT.md
code-reviewer/
AGENT.md
data-analyst/
AGENT.mdChoosing Models and Providers
modelsprovidersmodel-size
models:
- claude-sonnet-4-5
- gpt-5.2-codex
providers:
- anthropic
- openai
model-size: mediummodelsprovidersany
models:
- mistral-large-latest
- any
providers:
- anthropic
- anymodels: [mistral-large-latest, any]model-sizeprovidersproviders: [anthropic, any]
modelprovider
model: claude-sonnet-4-5
provider: anthropicRouting precedence is models> model-size> providers> defaults. If only modelsor modelis set, the provider is inferred from each model name. If only providersor provideris set, the default model for the first available provider is used. If model-sizeis set, Stencila selects the best available model in that size tier, optionally constrained by providers. If neither is set, the first available provider with valid credentials is used. Add anyto the end of a modelsor providerslist to allow fallback to the next routing stage instead of returning an error.
model-sizesmallmediumlarge
smallsmall
model-sizeprovidersmodel-size
any
models:
- gpt-5.2-codex
- any
model-size: small
providers:
- openai
- anyUse model-size: smallfor simple routing, formatting, summarization, or triage agents. Use model-size: mediumfor general-purpose coding, analysis, or research agents. Use model-size: largefor difficult planning, deep review, or high-stakes reasoning tasks.
anthropicopenaigeminigooglemistraldeepseek
claude-clicodex-cligemini-cli
Improving Discoverability and Delegation
descriptionkeywordswhen-to-usewhen-not-to-use
Keywords
keywords
keywords:
- code
- review
- security
- auditWhen to Use / When Not to Use
when-to-usewhen-not-to-use
when-to-use:
- when the user asks to review or audit code
- when a pull request needs automated review
when-not-to-use:
- when the user wants to write or generate new code
- when the task is refactoring rather than reviewRestricting Tools
allowed-tools
allowed-tools:
- read_file
- grep
- globBuilding Single-Skill Agents
allowed-skills
allowed-skills:
- code-reviewuse_skill
use_skill
Trust Levels
trust-level
low | |
medium | |
high |
trust-level: lowReasoning Effort
reasoning-effort
reasoning-effort: highlowmediumhigh
reasoning-effortmodel-size
model-sizechooses which class of model to use. reasoning-effortcontrols how much deliberation that chosen model applies before responding.
model-sizereasoning-effort
Limiting Turns and Tool Rounds
max-turns: 20 # Maximum conversation turns (0 = unlimited)
max-tool-rounds: 10 # Maximum tool-call rounds per user input
tool-timeout: 60 # Default tool timeout in seconds
max-subagent-depth: 2 # Maximum subagent nesting depthMCP Server Integration
mcp_codemode
enable-mcp-codemode: true # defaultenable-mcp: true
enable-mcp-codemode: falseallowed-mcp-servers:
- context7
- my-databaseDomain Restrictions
web_fetch
# Allow only specific domains
allowed-domains:
- docs.rs
- "*.github.com"
# Or deny specific domains
disallowed-domains:
- internal.corp.example.com*.example.com
Validation
# Validate by name
stencila agents validate code-reviewer
# Validate by path
stencila agents validate .stencila/agents/code-reviewer/
# Validate an AGENT.md file directly
stencila agents validate .stencila/agents/code-reviewer/AGENT.mdName format (kebab-case, 1–64 characters) Name matches directory name Description is non-empty and not a placeholder Numeric fields are within valid ranges Compatibility string length (max 500 characters) — see Configuration Reference
Skill tool coverage — when the agent has an allowed-toolslist, the validator cross-references it against skills' allowed-toolsdeclarations. If a skill needs a tool that the agent doesn't allow, a warning is shown. This helps catch configuration mismatches where a skill would be unable to use a tool it expects.
Configuration-Only Agents
AGENT.md
---
name: fast-coder
description: Quick coding tasks with a fast model
model: claude-haiku-3-5
provider: anthropic
reasoning-effort: low
max-turns: 5
---AGENTS.mdCLAUDE.md