Copied to clipboard
v0.4.0 Published on crates.io Built in Rust Dogfooded

The control layer for AI coding agents.

AgentML gives every repository a validated contract, smart agent guide, reusable skills, diff risk audits, MCP tools, and professional task closure reports — so AI agents can work like maintainers instead of guessing.

cargo install agentml

Now with experimental native AgentML syntax in v0.4.0.

View GitHub View Skills Native Syntax
AGENT CONTRACT RUNTIME VIEW
$cargo install agentml
$agentml init --detect
✔ AGENT.agent created
✔ AGENTS.md generated
✔ .agentml/context.md generated
— self-check —
$agentml self-check
Dogfood status: PASS
Risk score: 0/100
$agentml close
Task closure report generated
SYSTEM READY

Agents should not guess how your repo works. AgentML gives them a contract.

Everything agents need to respect your repo.

📄
AGENT.agent

Machine-readable contract

The source of truth. Defines permissions, validation, safety rules, and output requirements.

🤖
AGENTS.md

Human-readable guide

Generated from AGENT.agent. Tells agents what files to touch, what's forbidden, and how to report completion.

📋
.agentml/brief.md

Operating brief

Compact view of project stack, allowed write paths, validation commands, and matched skills.

📚
.agentml/context.md

Expanded context

Detailed project context for agent consumption.

⚡
skills/*.skill

Active skills

Reusable maintainer-intelligence packs for validation, review, and spec writing.

Reusable maintainer intelligence.

Skills are discovered, validated, matched against changes, injected into briefs, and exposed through MCP.

agentml skill list
rust-cli-maintainer repo-maintainer agentml-contract-validator skill-author docs-sync task-closure diff-risk-auditor security-auditor mcp-server-maintainer release-auditor nextjs-maintainer node-package-maintainer python-package-maintainer
SKILL MATCH OUTPUT
$agentml skill match
Matched: rust-cli-maintainer (stack: Rust)
Matched: diff-risk-auditor (paths: src/**/*.rs)
Matched: task-closure (repo: agentml)

Professional AI-assisted development.

Agents read the brief, follow relevant skills, make changes, run diff, then close with validation, risk score, git status, and commit proof.

RECOMMENDED WORKFLOW
$agentml inspect
✔ Detected: Rust CLI project
$agentml init --detect
✔ AGENT.agent created
✔ AGENTS.md generated
$agentml validate AGENT.agent
✔ Contract is valid
$agentml agents-md --write
✔ AGENTS.md updated
$agentml brief --write
✔ .agentml/brief.md updated
$agentml skill match
✔ Matched 3 skills
$agentml diff
Risk score: 0/100 - low
$agentml close
✔ Task closure report generated

MCP Server for Coding Agents.

AgentML exposes project contracts, allowed paths, validation commands, diff audits, briefs, and skills through an MCP server.

MCP TOOLS
$agentml mcp
Starting MCP server on stdio...
Available tools:
- get_project_contract
- get_agent_brief
- get_allowed_paths
- get_validation_commands
- audit_diff
- validate_contract
- validate_skill
- list_skills
- inspect_skill
- match_skills
- get_skill_guidance

MCP tools do not execute arbitrary shell commands, block path traversal, restrict generated writes, and do not allow skills to override AGENT.agent.

Professional task closure.

AgentML close turns "done" into proof. It checks validation, risk score, git state, commit information, matched skills, and produces a final report.

CLOSE REPORT
$agentml close
Validation result: pass
Risk score: 0/100 - low
Commit: bd2087d - feat(syntax): add native format flags init and conversion
Git status: clean
$agentml close --json
{ "summary": "...", "files_changed": [...], "risk": 0, ... }

Native AgentML syntax (experimental).

Experimental native syntax is available in v0.4.0. YAML-compatible syntax remains supported. Native syntax is not the default replacement yet.

AGENT.agent (Native Syntax)
$agent "agentml" {
version "0.4.0"
description "AI-native project contract system"
permissions {
write: ["src/**", "tests/**", "docs/**"]
forbidden: [".env", ".git/**", "target/**"]
}
validation {
command: "cargo test"
}
}

v0.4.0 release: Native parser: implemented | Native validation: implemented | Native examples: validating | Format flags: complete | Native init: complete | Convert command: complete

Experimental native syntax is available in v0.4.0. YAML-compatible syntax remains supported. Native syntax is not the default replacement yet.

NATIVE SYNTAX COMMANDS
$cargo install agentml
$agentml init --template rust-cli --syntax native
$agentml validate AGENT.agent --format native
$agentml convert --to native AGENT.agent

Everything agents need to respect your repo.

⚬
Contract

Contract-first repo rules

Define what the project is, what commands are safe, what paths are sensitive, and what rules agents must respect.

⊘
Paths

Sensitive path awareness

Declare the files agents must treat with extra care.

⌘
Context

Generated agent context

Generate machine-readable context for any coding agent.

⚬
Skills

Reusable skill capsules

Define focused capabilities for validation, review, and spec writing.

⚠
Risk

Risk scoring before change

Surface risk around sensitive paths, destructive commands, and security files.

✓
CI

CI-enforced agent discipline

Run validation, skill checks, and self-checks in GitHub Actions on every push.

AgentML vs other formats.

AgentML gives agents a structured, validateable contract.

Format Human-readable Agent-readable Validateable Risk-aware CI-ready
README.md ✔ ✘ ✘ ✘ ✘
AGENTS.md ✔ ~ ✘ ✘ ✘
CLAUDE.md ✔ ~ ✘ ✘ ✘
Cursor rules ✔ ~ ✘ ✘ ✘
AgentML ✔ ✔ ✔ ✔ ✔

Feature maturity matrix.

Know what is stable, experimental, and planned.

Feature Status
AGENT.agent contracts Stable
AGENTS.md generation Stable
Brief/context generation Stable
Diff risk audit Stable
Doctor checks Stable
Task close reports Stable
MCP server Stable
Active skills Stable
Native syntax Experimental in v0.4.0
YAML-compatible syntax Supported

Get started in three commands.

1 Install
cargo install agentml
2 Initialize
agentml init --detect
3 Verify
agentml self-check
agentml close

Proven on real projects.

AgentML has been tested on real projects to prove it works in practice.

Rust CLI
Parser/validator safety
✅ Validated
Next.js App
Env secrets, DB safety
✅ Validated
Node Package
npm token protection
✅ Validated
Python Package
PyPI protection
✅ Validated

See Adoption Proof for details.

Questions & answers.

No. AgentML is a contract layer. It defines project rules, context, skills, validation, and risk signals for coding agents.
No. It is not a sandbox. It helps define and validate boundaries, but execution safety still depends on the agent, user, and environment.
Not necessarily. AGENTS.md is useful instruction text. AgentML adds structure, validation, risk scoring, skills, and CI enforcement.
Any coding agent that can read files or use generated context. Cursor, Claude, ChatGPT, Windsurf, and MCP-based systems can all consume the generated context.
YAML-compatible syntax was the original format and remains fully supported. Native AgentML syntax is now available as an experimental feature in v0.4.0. Both formats validate equally. You can choose based on preference.

Stop letting agents guess.

Give your repo a contract they can read, validate, and respect.

cargo install agentml
Copied to clipboard