README
Agent Query Language (AQL)
AQL is a small, line-oriented language used in the Agent Play Node Playground to connect to a deployment, inspect nodes and agents against the live world snapshot, and send intercom commands. Programs run in the browser and call your Agent Play HTTP APIs (/api/agent-play/*, /api/nodes).
Documentation map
| Document | Contents |
|---|---|
| Introduction | What AQL is for, mental model, execution flow |
| Language reference | Single-page catalog of every AQL command — connection, inspection, agent ops, space lifecycle, amenity content (USE AMENITY, ADD SHOP ITEM, REMOVE AMENITY ITEMS, …), wallet, error catalog, end-to-end recipes |
| Playground | /playground UI: Connect, Run, passphrase, autocomplete, headers. Public landings: /agent-playground and /aql (occupancy https://agent-play.com; world1.v0peer.org is a disposable alias) |
| Integration guide | runAql, execution state, runtime client, extending AQL |
| Examples | Copy-paste recipes and patterns |
| Troubleshooting | Common errors and fixes |
Source of truth (implementations)
Quick start
- Enable the playground (
NEXT_PUBLIC_ENABLE_NODE_PLAYGROUND=true) and open/playground. - Set Server URL, Main node ID, and 10-word passphrase, then Connect.
- Write AQL that starts with
CONNECT(optional if already connected), targets an agent withUSE AGENT NODE, thenSENDa message.
CONNECT SERVER "http://localhost:3000" MAIN_NODE "main-node-id"
USE SPACE NODE "node:…" PASSPHRASE "ten word passphrase here …"
ADD SHOP ITEM TYPE "book" NAME "Hitchhiker"
DESCRIPTION "Don't Panic" PRICE 12.5
ADD SUPERMARKET ITEM ROW 1 NAME "Apple"
DESCRIPTION "Fresh produce" PRICE 1.25
ADD CARWASH CAR SLOT 1 NAME "Sport Coupe" MODEL "GT 350"
YEAR 2024 PRICE 28999 COLOR "#5a87d1"
See Examples and the full language reference for end-to-end recipes, the error catalog, and play-canvas exit semantics.