AAL Introduction
Start with an agent you can run.
AAL (Agent Abstraction Language) lets you define what an agent accepts, what it does and what it returns. Start with a small greeting program: give it a name and receive a greeting. No model or API key is needed.
Prepare the compiler
Install Rust 1.85 or newer and run these commands. Run subsequent lessons from the same repository directory. Model and tool adapters may require newer Rust versions; see the repository README.
git clone https://github.com/Brain-Cell-Coding/Agent-Assembly-Language.git
cd Agent-Assembly-Language
cargo run --locked --bin aalc -- --helpComplete example
Save the example as introduction.aal
agent Tutorial is Agent
public
ability run(name: String) -> String effects()
return "Hello, {name}!"Syntax explained
-
agentdeclares anagent; anabilityunderpublicis a callable entry point. -
name:
Stringtypes the parameter; ->Stringtypes the result;returnsupplies it. -
effects()declares no external effects. Run this example locally in the AAL repository without an EasyNet Runtime.
Build and run
cargo run --locked --bin aalc -- check introduction.aal
cargo run --locked --bin aalc -- build introduction.aal -o introduction.aalc
cargo run --locked --bin aalc -- run introduction.aalc \
--agent Tutorial --ability run \
--args '{"name":"EasyNet"}' \
--state-dir .aal-tutorial/introduction --invocation introduction-1Run with a fresh state directory. The returned value is shown below; the CLI also prints execution information.
"Hello, EasyNet!"Try it yourself
Replace name with your own name and run with a new invocation ID. The greeting should use your input.