Obyte developer resources
GitHubObyte.jsObyte.org
  • Quick Start
  • Configuration
  • Tutorials for newcomers
    • Setting up headless wallet
    • Ping-pong paymets
    • Logging into website
    • Weather oracle
    • Bet on weather bot
  • Payments and transactions
    • Textcoins
    • Sending data to DAG
  • Contracts
    • Smart contracts
    • Smart contract language reference
    • Prosaic contracts
    • Contracts with arbitration
  • Autonomous Agents
    • Getting started guide
    • Oscript language reference
  • Issuing assets on Obyte
  • Attestation profiles / KYC
  • Address signing/verification
  • URI protocol
  • Events list
  • Websocket API
    • Request
    • JustSaying
  • Obyte for merchants
    • Payments gateway
    • Cashback API
  • JSON-RPC
    • Exposing RPC interface
    • Running RPC service
  • Libraries and Scripts
Powered by GitBook
On this page

Was this helpful?

Export as PDF

Autonomous Agents

PreviousContracts with arbitrationNextGetting started guide

Last updated 3 years ago

Was this helpful?

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.

(announcement post on Medium)

Oscript — the language of autonomous agents

Autonomous Agents are written in Oscript — a new programming language developed specifically for this purpose. The language is very simple and any developer who has experience in curly-brace languages such as JavaScript, PHP, Java, C/C++, etc should not have any difficulty learning it.

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;

  • attestations;

  • balances of this and other AAs;

  • information about assets;

  • arithmetic operations;

  • logical operations (AND, OR, etc);

  • comparisons;

  • concatenations;

  • 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 and . There is also a and .

Getting started developer guide
Introduction to Autonomous Agents
Oscript language reference for Autonomous Agents
Oscript
(mainnet)
editor
Oscript
(testnet)
editor
extension for VS Code
Autonomous Agent testkit