Eskiu for agents
An agent with a computer of its own (a Linux machine, a container) can install Eskiu, write programs and apps, run them, look at them and test them with the commands on this page. Every answer has a form meant for a program to read.
Install
The compiler and the ui tool, under ~/.eskiu when /usr/local is not writable:
curl -fsSL https://eskiu-lang.org/install.sh | sh -s -- --with-ui
export PATH="$HOME/.eskiu/bin:$PATH"
eskiuc doctor
On Windows, $env:ESKIU_WITH_UI = 1; irm https://eskiu-lang.org/install.ps1 | iex.
Or start from the container image, which already holds eskiuc, ui,
emscripten and Chrome:
docker run --rm -it ghcr.io/eskiu-lang/agent
eskiuc doctor lists what the machine has for each kind of build and what is
missing. A native build needs a C compiler (clang or gcc); a web app needs emscripten
(emcc) and, to drive it, Chrome or Chromium.
Write and run code
eskiuc run hello.esk # compile and run a file
eskiuc new tool && cd tool && eskiuc run # a package
eskiuc test # each tests/*.esk, pass = exit 0
eskiuc main.esk -o app --diagnostics=json # errors as JSON lines on stderr
With --diagnostics=json each error or warning is one JSON object: its severity,
a stable id, the message, the file and range, hints and notes. The ids are listed in
diagnostic-ids.txt.
Build an app and look at it
ui agent drives the running app: it builds it, starts it in a headless Chrome
(on the web) or in a window, and answers each operation. --json gives one
object per operation.
ui new myapp && cd myapp
ui agent web --json tree
ui agent web --json "tap add" "type title Milk" "clock settle" state
ui agent web "screenshot shot.png"
ui agent web --stop
The operations are tree, layout, screenshot FILE,
tap ID, type ID TEXT, submit ID, scroll ID DY,
drag ID DX DY, long_press ID, hover ID in|out, back,
clock +MS, clock settle, state, logs and
perf. Elements are named by Style.test_id, and a word in double quotes
keeps its spaces (tap "I agree"). Time moves only with
clock, so nothing changes between two operations. On a Linux machine that runs
as root, Chrome needs UI_CHROME_ARGS=--no-sandbox.
On the web the app runs in a phone-sized window, 390 by 844 points
(UI_AGENT_WINDOW=WxH changes it), and screenshots show that window. The tree
gives each element's role, its states (checked, selected, expanded, disabled), its value
and its hint, so an agent can check what a screen reader will say. When the app fails to
build or stops at run time, the answer says why, with the source line.
The same operations drive the app on macOS, Linux and Windows windows, the iOS simulator
and Android, when the machine has them: ui agent ios ...,
ui agent android ....
Test it
# tests/ui/counter.uitest
expect count text "Count: 0"
tap Increment
expect count text "Count: 1"
expect screenshot counted 0.5%
ui test web --json
A .uitest file runs unchanged on every platform. Every ui new app
starts with one, and with an AGENTS.md that tells an agent how to work on it.
Without a computer of its own
An agent that only talks (Claude, ChatGPT and other MCP clients) reaches Eskiu through its MCP server, a remote URL with no key:
https://mcp.eskiu-lang.org/mcp
It searches the compiler, the standard library and the docs, and runs code on a worker:
eskiu_run compiles and runs a file, eskiu_ui_render builds a ui
app for the web, applies ui agent operations and returns a screenshot, and
eskiu_ui_test runs a .uitest file against it. Both answer with the compiler's diagnostics when the app does not build, and with the result of each step.
In ChatGPT, eskiu_ui_render also shows the app live in the conversation: the
user can tap and type in it, inline or full screen, while the agent changes the code.
An agent building an app follows three guides: how to lay the project out (app structure), how screens look (design) and what makes the product work (product).
Reference
- llms.txt: the pages an agent should read first.
- ui agent and ui test: every operation and step.
- The Book of Eskiu and the specification.
- Packages: each one with its API reference.
eskiu