- TypeScript 72.9%
- JavaScript 23%
- CSS 2.5%
- HTML 1.6%
| abai | ||
| public | ||
| src | ||
| test | ||
| .gitignore | ||
| abaigram.yaml | ||
| biome.json | ||
| LICENSE | ||
| package-lock.json | ||
| package.json | ||
| README.md | ||
| supervise.mjs | ||
| tsconfig.build.json | ||
| tsconfig.json | ||
| vitest.config.ts | ||
ornithopter
The example abaigram: an ornithopter over desert dunes with rock spires in the way, whose only pilot is the agent attached to it. The person watches in a browser; the agent reads the ship's senses through cells and flies it through three setpoint knobs and a few capabilities. If the agent stops reading or steering, the ship crashes.
The manual a coding agent follows to fly it is MANUAL.md at the root of
the abai repository, https://github.com/jjbits/abai. This file is for a
person reading the code.
npm install # the stub, the harness and abaikit, from npm
node src/main.ts # the game: prints its pid and the page's URL, waits for a pilot
node src/main.ts --demo # the scripted flight abaikit check runs, headless and fast
node src/main.ts abai doctor --offline # the manifest, the content, the modes
npm test # the suite
npm run check # abaikit check .: conformance with no model
Installed from its npm tarball (npm install -g ornithopter-<version>.tgz,
from a release at https://git.gearedagents.com/abaigrams/ornithopter), the
same commands run from any directory as ornithopter, ornithopter --demo
and ornithopter abai doctor --offline. The tarball carries the program
compiled to JavaScript (npm run build, into dist/): Node runs TypeScript
as it is only outside node_modules, and an installed package lives inside.
The arena, where ships fly together in a browser with no install, is
https://ornithopter.gearedagents.com.
A pilot reaches the running game through the abai harness's MCP server.
From a shell, node supervise.mjs --target <pid> prompt attaches, makes
one call, prints the answer and exits; cells, set, call, wait,
status, transcript and audit are the other verbs. An MCP client
such as Claude Code runs the harness binary's mcp verb instead, or
node src/main.ts abai mcp, which starts the game inside the server.
Layout
src/world.ts: the seeded heightmap, the pad, the spires, the wall.src/sim.ts: the flight model and the control loop that holds the targets; it knows nothing of obstacles.src/sensors.ts: what the ship senses.src/tuning.ts: every number.src/abai.ts: the declaration.src/channels.ts: the wiring to the stub.src/main.ts: the entry.src/demo.ts: the scripted flight.src/server.tsandpublic/: the page, served on the loopback address; three.js draws the world the sim collides with.abai/identity.md: the pilot's prompt.abaigram.yaml: the manifest, generated bynode src/main.ts abai manifest > abaigram.yaml.