An Autonomous Agent (AA) is a special address (account) on the ledger that acts according to a program associated with it. Its behavior is similar to that of a vending machine that receives coins and data entered on a keypad and in response, releases a cup of coffee, plays a song, or does whatever it was programmed to do.
Some of the features of the language:
- convenient access to variables that describe the state of the ledger and the triggering (requesting, activating) transaction received. That’s what makes the language domain-specific. In particular, the following variables are available:
- amounts received in the triggering transaction;
- data received in the triggering transaction;
- who sent the triggering transaction;
- state variables of the current and other AAs;
- data feeds;
- balances of this and other AAs;
- information about assets;
- arithmetic operations;
- logical operations (AND, OR, etc);
- some math functions;
- some cryptography functions for calculating hashes and validating signatures created off-chain;
- branching with if/else;
- no loops (just iteration methods for objects and arrays);
- no recursive functions;
- scalar and object data types;
- generation of deterministic pseudo-random number from seed.
AA code can be deployed with Oscript (mainnet) editor and Oscript (testnet) editor. There is also a extension for VS Code and Autonomous Agent testkit.