dev-tools 6 min read

AgentML – Universal Language for AI Agents

AgentML defines AI agent behavior once and runs it anywhere using W3C SCXML state machines. Early alpha, MIT-licensed.

By
Share: X in

TL;DR

TL;DR: AgentML is an early-stage language specification for defining AI agent behavior as state machines, with the goal of letting you write an agent once and run it on any runtime.

Source and Accuracy Notes

⚠️ This section is MANDATORY. All links must be verified from actual source, not guessed.

What Is AgentML?

AgentML is a language specification and set of tools for defining AI agent behavior using the W3C SCXML (State Chart XML) standard — a formal model for state machines that has been proven in industrial systems for over 20 years.

The core thesis is analogous to HTML:

AgentML : Agent Frameworks  =  HTML : Web Browsers

Just as HTML lets you write content once and render it in any browser, AgentML aims to let you define an agent once and run it on any compatible runtime. Currently, the reference runtime is agentmlx (Go/WASM), which is listed as “NOT YET RELEASED” in the README.

The repository also describes planned transformers to convert AgentML into LangGraph, CrewAI, n8n workflows, and other popular frameworks — though these are explicitly marked as “not yet implemented.”

Core Concepts

State Machines for Agent Logic

AgentML represents agent behavior as SCXML state machines. Each state defines a mode of operation, and transitions between states are triggered by events (which can come from LLM outputs, tool responses, or external signals).

Namespaces

AgentML uses namespaces to abstract over LLM providers (Gemini, Ollama, etc.), memory systems, and tools. The Go namespace packages are at github.com/agentflare-ai/agentml-go.

Write Once, Deploy Anywhere (Roadmap)

The README explicitly states this is planned, not yet implemented. The vision is that the same .aml file could run on agentmlx natively or be transformed into a LangGraph graph, CrewAI crew, or n8n workflow.

Setup Workflow

Prerequisites

  • A system that supports the agentmlx runtime (Linux or macOS, amd64 or arm64)
  • An LLM API key for your chosen provider (Ollama, Gemini, etc.)

Install the agentmlx Runtime

curl -fsSL sh.agentml.dev | sh

This detects your platform, downloads the latest release, verifies checksums, and installs to ~/.agentmlx/bin. Add it to your PATH:

export PATH="$HOME/.agentmlx/bin:$PATH"

To install a specific release channel:

# Stable (default)
curl -fsSL sh.agentml.dev | sh

# Release candidate
curl -fsSL sh.agentml.dev | sh -s -- --channel next

# Beta
curl -fsSL sh.agentml.dev | sh -s -- --channel beta

Write Your First AgentML File

An .aml file defines states and transitions. A minimal example (from the README):

<agentml>
  <state id="start">
    <onentry>
      <invoke name="llm">
        <property name="model" value="gemini-2.0-flash"/>
      </invoke>
    </onentry>
    <transition event="response" target="process"/>
  </state>
  <state id="process">
    <!-- handle the LLM response -->
  </state>
</agentml>

Run the Agent

agentmlx run your-agent.aml

Deeper Analysis

The Problem AgentML Is Solving

The AI agent framework landscape fragments fast. LangGraph, CrewAI, AutoGPT, BeeAI, and others each have their own abstractions. Rewriting an agent from one framework to another is expensive.

AgentML proposes a vendor-neutral intermediate representation based on a proven standard (SCXML). If the vision ships fully, you write in .aml and choose your runtime.

Current Maturity

AgentML is early alpha. The README carries an explicit “Early Alpha - Building in Public” warning. Key gaps:

  • agentmlx (the reference Go/WASM runtime) is listed as “NOT YET RELEASED”
  • Framework transformers (LangGraph, CrewAI, n8n) are “planned” — no code exists yet
  • The main repository (89 stars) has not had a push since December 2025
  • The Go namespace packages at agentml-go exist but the runtime that consumes .aml files does not appear to be released

This is a project to watch, not a production-ready tool yet.

Architecture

.your-agent.aml  →  agentmlx  →  Go/WASM runtime
                  →  [planned] LangGraph transformer
                  →  [planned] CrewAI transformer
                  →  [planned] n8n transformer

The separation of the language spec (.aml files) from runtime implementations is architecturally sound. Whether it gains traction depends on the runtime actually shipping and framework transformers being maintained.

Practical Evaluation Checklist

  • [ ] agentmlx runtime releases a stable version
  • [ ] At least one major framework transformer (LangGraph or CrewAI) ships
  • [ ] Documentation includes a real end-to-end example with a working LLM provider
  • [ ] Active development resumes on the main repository

Security Notes

  • Install script (sh.agentml.dev) fetches and executes code from the project’s servers — review it before piping to sh
  • The Go namespace packages interact with LLM providers — treat API keys as sensitive; use environment variables, not hardcoded credentials
  • No published security audit or CVE tracking as of this writing

FAQ

Q: Is AgentML production-ready? A: No. It is explicitly labeled early alpha. The reference runtime (agentmlx) is listed as “not yet released” in the official README.

Q: How is this different from LangGraph or CrewAI? A: LangGraph and CrewAI are frameworks — you write Python code in their paradigms. AgentML is a language specification. The goal is to write .aml once and transform it into LangGraph, CrewAI, or other frameworks rather than being tied to one.

Q: What is SCXML and why use it for agents? A: SCXML (State Chart XML) is a W3C standard for state machines, used in industrial telecom, aerospace, and automotive systems for over 20 years. It provides a formal, executable semantics for state-based behavior — a natural fit for agents that respond to events (tool outputs, LLM responses, user input) with state transitions.

Q: Does it run locally? A: The agentmlx runtime is designed to run locally (Go/WASM, cross-platform). The LLM provider can be local (Ollama) or a cloud API (Gemini). Whether you need an internet connection depends on your chosen LLM backend.

Conclusion

AgentML is an interesting early-stage project tackling a real problem — framework lock-in in the AI agent space. The use of W3C SCXML as the formal foundation is principled, and the HTML analogy hints at the ambition.

However, as of mid-2026, the core runtime has not shipped, the planned framework transformers are vaporware, and the repository has not seen commits since December 2025. The project is worth bookmarking and revisiting when agentmlx hits a stable release.

If you want to experiment today, read the agentml-dev/agentmlx repository for runtime releases and the agentml-go namespace packages for Go provider integrations.