Drive it from your agent
This is the page the engine exists for. There is no plugin, no SDK and no MCP server: Glyphae is a binary that documents itself, so any terminal agent — Claude Code, Codex, Kimi CLI, your own harness — can drive it the moment it knows the binary exists.
Paste this into your agent’s memory
CLAUDE.md, AGENTS.md, a Cursor rule — wherever your agent reads standing instructions:
## 3D — Glyphae
`glyphae` (on PATH) is a CLI spectral path tracer. Scenes are plain-text
programs; renders are deterministic replays of them.
- Run `glyphae --help-ai` FIRST: it prints the full machine manual
(scene format, render modes, the viewport socket protocol).
- Workflow: `glyphae --scene-new <recipe> work.scene`, keep
`glyphae --view work.scene` open (hot-reloads on save), edit the file,
then `glyphae --render-scene work.scene out.png [spp] [w h]` for finals.
- The viewport answers newline-JSON on 127.0.0.1:7878. Snapshot with
{"cmd":"snapshot","path":"look.png"} and LOOK at the file before
claiming any visual result.
- Iterate with --draft (fast, clamped, logged); never ship a draft frame.
- Long jobs write renders/progress.json — poll it instead of waiting.That is the entire integration. The block tells the agent the tool exists and where the manual is; --help-ai does the rest, and it always matches the binary that prints it.
Why this works without an SDK
- Scenes are files. Agents are already good at files: diff, edit, version, revert. No API surface to learn, no bindings to break.
- Renders are deterministic. Same scene, same pixels. The agent can reason about cause and effect because there is no hidden state between runs.
- The viewport is shared ground truth. One window you both look at. The socket’s
snapshotwrites exactly what it shows, so “done” is a file you can open, not a claim. - Progress is a file too. Long renders write
renders/progress.json(pct, eta) — the agent polls instead of blocking or guessing.
What a session looks like
This is the shape of the recorded Claude Code run on the homepage — a real session, lines verbatim:
you > make me a forklift tyre with 20 lugs and render it
agent > glyphae --help-ai | head -80
agent > glyphae --scene-new tire tire.scene
agent > edit tire.scene params.tire_lugs=15 -> 20
agent > glyphae --render-scene tire.scene tire.png 400 1200 900
agent > read tire.png (looks at the frame it made)
agent > Done: scaffolded tire.scene, set lugs to 20, rendered tire.png.House rules worth copying
- Snapshot before claiming.An agent that says “the render looks right” without opening the frame is guessing. Make it read the PNG.
- Draft to think, full samples to ship.
--draftvalidates framing and motion in seconds and logs every clamp, so a draft can never silently become a final. - Geometry knobs cost more than trace knobs.
params.*regrows the mesh;camera.*andscene.*only restart accumulation. Cheap iterations first.
New to the engine itself? Start at getting started; the full reference is in the docs.