đź”± PlantUML - AML Edition

A specialized engine for Multi-Agent Systems modeling based on the 2004 Specification and the Cervenka & Trencansky (2007) Monograph.

v1.2026.01-AML Stable
View on GitHub

The Developer-First MAS Modeler

Modeling Multi-Agent Systems (MAS) requires more than standard UML. The AML Edition brings first-class support for Agents, Beliefs, Goals, and Protocols directly into the world's most popular text-to-diagram engine.

Stop fighting with heavy CASE tools. Write your architecture as code, version it with Git, and render it automatically in your CI/CD pipeline. Available in Free and Pro editions.

Fork Attribution

Based on the original PlantUML by Arnaud Roques. AML Extensions are unique contributions of this edition.

Core Innovations

Native BDI Support

Natively model Belief-Desire-Intention architectures with keywords like belief, goal, and plan. Automatic styling for Coral Goals and Blue Beliefs.

Professional Styling

Automatic semantic color coding: Agents (Yellow), Goals (Coral), Beliefs (Blue). Visual consistency across all 13 diagram types without manual CSS.

Real-time Validation

Leverage the AML Language Server for real-time diagnostics, syntax validation, and semantic checks across all your MAS models.

FIPA Communication

Describe agent interactions using 30+ FIPA-compliant communicative acts. Native syntax like Alice informs Bob renders FIPA-styled sequence diagrams.

Monograph Enhancements

The only tool with support for Situation-Based Modeling (Contexts) and Mobility (Move/Clone) as defined in the Cervenka & Trencansky (2007) monograph.

Academic Resources

Access the AML Master Handbook, Developer Guides, and exhaustive syntax references based on the 2007 AML Monograph.

Technical Diagram Mapping

13 specialized MAS diagram types powered by 5 high-performance technical engines.

Conceptual AML Diagram Technical Engine Key Native Keywords
Society Diagram AML Class agent, role, orgunit, plays, member-of
Mental Diagram AML Class belief, goal, plan, achieved-by, subgoal-of
Goal Requirements AML Class goal, stakeholder, contributes-to, sufficiently
Ontology Diagram AML Class ontology, ontclass, is-a, equivalent-to
Behavior Decomposition AML Class fragment, capability, behavioral entitytype
Entity Diagram AML Composite perceptor, effector, fragment, port
Service Diagram AML Composite service, servicespec, serviceprotocol
Protocol Sequence AML Sequence protocol, inform, request, cfp, propose
Protocol Communication AML Communication protocol, interaction communication
Service Protocol AML Sequence service-protocol, service interactions
MAS Deployment AML Deployment aee, host, moves-to, clones-to
Behavioral Diagram AML Activity percept, effect, commitgoal, cancelgoal
Lifecycle Diagram AML State state, lifecycle, initial, final

Native AML Syntax

Clean, intuitive, and macro-free modeling.

@startaml
agent Alice
role Worker
Alice plays Worker

goal G "Deliver"
plan P "Navigate"
G achieved-by P

Alice informs "Ready" to Bob
@endaml
                    

Perfect for fast prototyping and high-level architecture. No includes required.

Case Study: Automated Trading System

A comprehensive example of MAS modeling using three core AML viewpoints.

1. Structural View

Defining the entities within the trading environment, including agents, resources, and their relationships.

@startaml
classdiagram "Trading System" {
  agent "TradingAgent" as TA {
    cash: Float
    portfolio: Map

    belief marketTrend
    goal maximizeReturns

    capability analyzeMarket
    capability executeTrade
  }

  resource "StockExchange" as SE {
    operation getQuote()
    operation executeTrade()
  }

  environment "TradingEnv" as TE {
    contains TA, SE
  }

  TA --> SE: uses
  TA --> TE: residesIn
}
@endaml

2. Interaction View

Modeling the FIPA-compliant protocol between the Trader, Broker, and Exchange using communicative acts.

@startaml
sequencediagram "Trading Protocol" {
  participant "Trader" as T
  participant "Broker" as B
  participant "Exchange" as E

  T -> B: Order^request(buy, "AAPL")
  activate B
  B -> E: Order^request(buy, "AAPL")
  activate E
  E --> B: Confirmation^agree()
  deactivate E
  B --> T: Confirmation^agree()
  deactivate B

  alt execution successful
    E -> B: Execution^inform(price=150.25)
    B -> T: Execution^inform(price=150.25)
  else execution failed
    E -> B: Failure^failure("no liquidity")
    B -> T: Failure^failure("no liquidity")
  end
}
@endaml

3. Mental View (BDI Architecture)

Modeling the agent's internal cognitive state: how beliefs about the market help achieve specific trading goals through dedicated plans.

@startaml
mentaldiagram "Trading Agent Mental Model" {
  belief "MarketTrend" as MT <<belief>> {
    content: "AAPL will rise"
    {degree=0.75}
  }

  decidablegoal "ShortTermGain" as STG {
    content: "Achieve 5% return"
    {priority=high}
  }

  plan "DayTrading" as DT <<plan>> {
    for: STG
    trigger: marketOpen
    actions: ["analyze", "execute"]
  }

  MT -[help]-> STG
  DT -[partiallyAchieves]-> STG
}
@endaml

Beyond Basic Modeling

Mobility & Deployment

Model the physical movement of agents between execution environments (Cervenka & Trencansky, 2007).

aee Server1
agent MobileAgent
MobileAgent moves-to Server1
                        

Ontology Integration

Native support for Knowledge representation within the same modeling ecosystem.

ontology DomainKnowledge {
  ontologyclass Concept
}
                        

AML White Paper

Textual Modeling of Multi-Agent Systems: An AML Implementation for PlantUML

Read the White Paper (Version 1.2026.01-AML)

Version 1.2026.01-AML | Date: January 2026

Abstract

As Multi-Agent Systems (MAS) increase in complexity, the need for robust, versionable, and communicable modeling techniques becomes paramount. The Agent Modeling Language (AML) provides a comprehensive semi-formal visual notation for MAS specification, yet traditional graphical tools often struggle with modern DevOps workflows. This white paper presents a framework for implementing AML within PlantUML, a widely adopted text-to-diagram engine. This implementation covers the core AML v0.9 specification and incorporates advanced mechanisms from the 2007 AML monograph (Cervenka & Trencansky), including mobility, context-based modeling, and behavior decomposition. By mapping AML's rich metamodel to a textual surface language, this project provides a toolchain that is both expressive for architects and ergonomic for developers, enabling seamless integration into continuous integration pipelines.

1. Introduction

The design and documentation of Multi-Agent Systems (MAS) require specialized abstractions to capture the unique properties of agents, such as autonomy, sociality, and mental attitudes. While the Unified Modeling Language (UML) serves as a foundation, it lacks first-class support for agent-oriented concepts. The Agent Modeling Language (AML) was developed to bridge this gap, offering a consistent set of extensions for structural, social, mental, and behavioral viewpoints.

However, the adoption of MAS modeling is often hindered by the limitations of "heavyweight" graphical CASE tools. These tools frequently produce binary artifacts that are difficult to version-control, compare, or integrate into automated documentation workflows. This paper proposes a "lightweight" alternative: a text-based implementation of AML using PlantUML. This approach allows architects to write models in a concise domain-specific language that compiles into high-quality diagrams, facilitating "Modeling as Code" (MaC) practices.

2. Background and Motivation

2.1 The Agent Modeling Language (AML)

AML, as specified by Whitestein Technologies (2004) and expanded by Cervenka & Trencansky (2007), is a comprehensive modeling language designed for MAS engineering. It organizes system descriptions into several interdependent views:

  • Structural: Entity types (agents, resources, environments).
  • Social: Roles, organizations, and social relationships.
  • Mental: Internal states including beliefs, goals, and plans.
  • Behavioral: Services, protocols, and capabilities.

2.2 Textual Modeling and PlantUML

PlantUML has emerged as a standard for textual diagramming, utilizing a simple syntax to generate UML-compliant diagrams. Its support for preprocessing macros and custom stereotypes makes it an ideal engine for hosting higher-level modeling languages like AML. By leveraging PlantUML, AML models can be stored as plain text, allowing for efficient branching, merging, and automated rendering within CI/CD environments.

3. The AML for PlantUML Framework

The framework provides a complete environment for AML modeling, structured around a core profile and specialized modules.

3.1 Design Principles

  1. Metamodel Fidelity: Ensure a 1-to-1 mapping between AML concepts and the generated PlantUML artifacts.
  2. Textual Ergonomics: Use native domain-specific keywords to express complex agent-oriented concepts concisely, allowing the modeler to focus on semantics.
  3. Modularity: Provide a layered architecture where optional modules (e.g., Ontology, Sequence) can be enabled as needed.
  4. Visual Consistency: Implement a standardized color palette and iconographic representation based on AML conventions.

3.2 Architecture

The framework is deeply integrated into the PlantUML core engine, providing native parsing for AML constructs. It consists of specialized diagramming engines:

  • AML Class Engine: Supports structural and social modeling using native keywords.
  • AML Sequence Engine: Handles communicative acts and interaction protocols.
  • AML State Engine: Provides specialized support for lifecycles and state machines.
  • AML Activity Engine: Implements behavioral modeling with native actions.
  • AML Description Engine: Supports high-level component-based descriptions.

4. Multi-Perspective Modeling

4.1 Structural and Social Viewpoints

The framework supports the full hierarchy of AML entity types. Agents, resources, and environments are represented with distinct visual styles. Social dynamics are captured through role-playing associations and organizational structures.

@startaml
agent SearchAgent {
  capabilities: String[*]
  --
  executeSearch()
}
role Worker {
  status: String
  --
  performTask()
}
SearchAgent plays Worker
@endaml

4.2 Mental Attitudes and Cognitive Architectures

AML's mental model is implemented through dedicated keywords for beliefs, goals, and plans. These elements can be linked via causal relationships such as achieved-by or input-to, allowing for the modeling of complex BDI (Belief-Desire-Intention) architectures.

4.3 Behavioral and Interaction Protocols

Interactions are modeled using an enhanced sequence diagram syntax. The framework provides a palette of FIPA-compliant performatives (e.g., request, inform, propose), which are automatically color-coded to improve readability.

@startaml
agent Manager
agent Worker
Manager requests "task_1" from Worker
Worker informs "done" to Manager
@endaml

4.4 Advanced Modeling Mechanisms (Cervenka & Trencansky, 2007)

This implementation includes the sophisticated mechanisms introduced in the 2007 monograph:

  • Deployment and Mobility: Modeling of AgentExecutionEnvironments and the movement (Move, Clone) of agents between nodes.
  • Context-Based Modeling: Situation-dependent model structuring using Context packages.
  • Behavior Decomposition: Refinement of agent behavior into Capabilities and reusable BehaviorFragments.

5. Implementation and Verification

5.1 Native Syntax Integration

This implementation provides first-class native syntax support by extending the PlantUML core parser. This allows for a "macro-free" modeling experience where AML concepts are expressed using domain-specific keywords. The implementation has recently undergone a major refactoring to move core logic into the io.plantaml namespace, improving modularity and preparing for advanced LSP (Language Server Protocol) integrations.

5.2 Verification and Compliance

The framework has been verified against a suite of over 50 comprehensive examples covering all aspects of the AML specification. We maintain a detailed Compliance Matrix that tracks the implementation status of every AML concept. Continuous validation is performed via PowerShell scripts (Check-AmlExamples.ps1) that run the diagrams through the PlantUML compiler to ensure syntactic correctness.

6. Adoption and Integration

The textual nature of AML for PlantUML simplifies its integration into the software development lifecycle:

  • Version Control: Models are stored in Git, enabling code reviews for architectural changes.
  • Automated Documentation: Diagrams are rendered during the build process and embedded into project documentation.
  • IDE Support: Real-time previews and intelligent language support are available through specialized plugins for IntelliJ IDEA and VS Code.

7. Conclusion

AML for PlantUML offers a powerful, "Developer-First" approach to multi-agent system modeling. By combining the theoretical rigor of AML with the practical efficiency of PlantUML, we provide a toolchain that supports the entire MAS engineering lifecycle—from high-level architectural design to detailed behavioral specification.

References

  • Cervenka, R., & Trencansky, I. (2007). The Agent Modeling Language (AML): A Comprehensive Approach to Modeling Multi-Agent Systems. Birkhäuser Basel.
  • Whitestein Technologies AG. (2004). Agent Modeling Language (AML) — Language Specification, Version 0.9.
  • PlantUML. (2026). Open-source tool that uses simple textual description to draw UML diagrams.

Tooling & Extensions

Advanced IDE support for a professional modeling experience.

IntelliJ IDEA Plugin

Full language support including syntax highlighting, real-time diagnostics, and diagram preview for all JetBrains IDEs.

VS Code Extension

LSP-based extension providing rich editor features, IntelliSense, and integrated rendering within Visual Studio Code.

Pricing & Licensing

Choose the plan that fits your modeling needs.

FREE TIER

$0/forever

  • Personal & Educational use
  • All 13 AML Diagram types
  • Basic Syntax Highlighting
  • Command-line Rendering
  • Community Support
POPULAR
PRO TIER

$49/year

  • Commercial License
  • Advanced IDE Completion
  • Real-time Validation
  • Live Preview Support
  • Priority Email Support

For Enterprise site licenses, please contact plantaml@proton.me

Getting Started

Ready to start modeling?

1. Download

Get the latest plantuml-aml.jar from the GitHub releases page (or build it from source).

Go to Releases

2. Write Code

Create a .puml file and start with @startaml. Use native keywords like agent.

3. Render

Run java -jar plantuml-aml.jar diagram.puml to generate your MAS visual model.