A Deterministic Language for Agent Behavior
Think of it as HTML for agents. Write once, validate with W3C-compliant schemas, and deploy anywhere with full type safety and traceability. Turn agent design from a prompt craft problem into a system design discipline.
$ curl -fsSL sh.agentml.dev | sh
<agentml xmlns="github.com/agentflare-ai/agentml"
datamodel="ecmascript"
xmlns:gemini="github.com/agentflare-ai/agentml-go/gemini">
<datamodel>
<data id="user_input" expr="''" />
</datamodel>
<state id="greeting">
<onentry>
<gemini:generate
model="gemini-2.0-flash-exp"
location="_event"
promptexpr="'Welcome user warmly'" />
</onentry>
<transition event="action.response" target="classify" />
</state>
<state id="classify">
<transition event="intent.technical" target="technical_help" />
<transition event="intent.billing" target="billing_help" />
</state>
</agentml>
Where Structure Meets Intelligence
AgentML combines the usability of XML with the predictability of state machines, giving you complete control over agent behavior.
Readable Structure
XML-like syntax that's intuitive to author, diff, and audit. Human-readable agent definitions that developers can understand at a glance.
Deterministic Logic
State machine core with 100% W3C SCXML conformance ensures every action and transition is governed by declared conditions. No more unpredictable agent behavior.
Schema Validation
Full XSD 1.0 support with automatic import/include resolution. Comprehensive validation ensures your agent definitions are correct before deployment.
Transparent Reasoning
Every step, tool call, and transition is logged as a traceable event. Full replayability for debugging and compliance.
Built for Compliance
Validators and guards ensure actions conform to policy and safety constraints before execution. Identity constraints and type checking built-in.
Schema Caching
Efficient schema reuse with built-in caching for frequently used agent definitions. Optimized for high-throughput production environments.
AMLX Runtime
Powerful runtime that interprets AML documents into live workflows. Combines state machine rigor with modern orchestration.
Thread-Safe Operations
Concurrent agent validation and execution support. Run multiple agents in parallel with confidence and efficient resource management.
MCP Integration
Seamless integration with Model Context Protocol tool servers, APIs, and LLM calls as safe, typed actions.
Coming Soon
We're working on bringing AI-powered AML generation to life. Stay tuned!
See How Easy It Is
Describe what you want your agent to do, and we'll generate the AML code for you. No complex syntax to learn.
Powerful CLI for Every Workflow
Initialize, validate, run, and debug your agents with a comprehensive command-line interface. Built for developer productivity.
- Compiler-Inspired ValidationCatch errors before runtime with detailed, actionable error messages
- W3C SCXML Conformance100% conformance with all 193 official W3C SCXML tests
- Runtime SnapshotsDebug issues by saving XML snapshots of agent state at each step
Why AgentML?
The problem with prompt-based agents and why deterministic structure matters
The Prompt Problem
Traditional prompt-based systems rely on inference and natural language, making agent behavior unpredictable and difficult to debug. You can't reason about what an agent will do—you can only hope.
→ Unpredictable • Hard to debug • Compliance risk
The AgentML Solution
AgentML makes agent behavior explicit through structured definitions. Every state, transition, and action is declared upfront, giving you the same level of control you have over your code.
<state id="classify">
<transition event="intent.technical" target="technical_help" />
<transition event="intent.billing" target="billing_help" />
</state>
System Design Discipline
AgentML transforms agent development from prompt engineering into system design. You define states, transitions, and validations just like you would design any other software system—with precision, clarity, and confidence.
Ready to Build Deterministic Agents?
Join the community building the future of predictable AI agents