The flying-machine game whose pilot is the agent: an abaigram of the abai project.
  • TypeScript 72.9%
  • JavaScript 23%
  • CSS 2.5%
  • HTML 1.6%
Find a file
2026-11-05 10:04:08 -08:00
abai ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
public ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
src ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
test ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
.gitignore ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
abaigram.yaml ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
biome.json ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
LICENSE ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
package-lock.json ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
package.json ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
README.md ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
supervise.mjs ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
tsconfig.build.json ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
tsconfig.json ornithopter 0.1.0 2026-11-05 10:04:08 -08:00
vitest.config.ts ornithopter 0.1.0 2026-11-05 10:04:08 -08:00

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.ts and public/: 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 by node src/main.ts abai manifest > abaigram.yaml.