A lightweight, XML-inspired markup language that enables agents to declaratively invoke modular, scoped, and nestable skills directly inside prompts.
AML provides two independent layers:
- Runtime Layer: A high-performance parser and executor implemented in Rust + PyO3
- Distribution & Knowledge Layer: An APM package for agent tooling ecosystems
pip install amlfrom aml import parse, execute, AmlRegistry
doc = parse("""
<skill interface="code-review" language="python">
<param name="file">src/auth.py</param>
Review this module for security issues.
</skill>
""")
registry = AmlRegistry()
registry.register_interface("code-review", "Review code for issues")
registry.register_implementation(
"python-review", "code-review",
language="python"
)
result = execute(doc, registry)<!-- Invoke a skill -->
<skill interface="testing" language="python" retries="2">
<param name="target">src/</param>
Run all tests with coverage.
</skill>
<!-- Define an interface -->
<skill define="interface" name="testing">
Execute automated tests and report results.
</skill>
<!-- Define an implementation -->
<skill define="implementation" name="pytest-runner" implements="testing" language="python">
Run tests using pytest with coverage reporting.
</skill>- Declarative: Skills are invoked via markup, not imperative code
- Composable: Full nesting support with bottom-up execution
- Scoped: Content inside tags is the skill's operating scope
- Resolvable: Interface/implementation model with hint-based resolution
- Safe: Results are escaped; no re-parsing attacks
┌─────────────────────────────────────────┐
│ Agent Prompt (contains AML tags) │
└─────────────┬───────────────────────────┘
│ parse()
▼
┌─────────────────────────────────────────┐
│ AST (Document → Nodes) │
└─────────────┬───────────────────────────┘
│ resolve() + execute()
▼
┌─────────────────────────────────────────┐
│ SkillRegistry → Resolver → Executor │
└─────────────┬───────────────────────────┘
│ result injection
▼
┌─────────────────────────────────────────┐
│ Output (AML tags replaced by results) │
└─────────────────────────────────────────┘
Apache 2.0 — see LICENSE for details.