AnvilKit is a Rust game engine designed for AI agents as first-class users.
Every existing game engine (Unity, Unreal, Godot, Bevy, Fyrox) assumes a human developer sits at a keyboard, clicks editor widgets, reads API docs, and debugs visually. AnvilKit makes the opposite bet: AI agents are the primary user, humans are the secondary user.
This is a different engine, not a better version of an existing one.
Five concrete commitments define AnvilKit's AI-native design:
Every public Component and Resource implements the Describe trait. Agents query BloomSettings::schema() and get back machine-readable JSON with:
- Field names and Rust types
- Valid value ranges
- Default values
- Human-written hints explaining intent
- Usage examples
No reading source code. No guessing at parameters. No hallucinating APIs.
AnvilKit ships an MCP (Model Context Protocol) server. Any MCP-compatible agent (Claude, GPT, local models) can connect via stdio JSON-RPC and call engine tools natively:
spawn_entity(components) → entity_id
query_world(filter) → [entities]
inspect_component(entity, type) → component_data
list_resources() → [schemas]
capture_frame() → base64_png
replay_frame(n) → diff
Not a chat wrapper. Not a prompt template. A first-class agent interface equivalent to how humans use cargo doc.
Every engine error is JSON-serializable and includes:
code: stable identifier for pattern matching ("ASSET_NOT_FOUND")message: human-readable descriptionhint: what to try next ("Check that the file path is relative to assets/")suggested_fix: optional code patchcontext: key-value metadata about the failure
Agents don't waste tokens on error archaeology.
Agents fix bugs by editing code → running → observing difference. AnvilKit makes this loop explicit: replay_frame(n) re-renders frame N with current code, returning a visual diff. No manual game session required.
Default build includes: PBR, sprites, text, debug lines, shadows, bloom. Advanced effects (SSAO, DoF, Motion Blur, Color Grading, IBL) live behind advanced-render feature. Less surface area = fewer decisions for the agent = faster time-to-working-game.
- Not a Bevy fork. AnvilKit uses
bevy_ecsandbevy_appdirectly. No custom ECS reimplementation. The value is in the AI layer, not in reinventing solved problems. - Not a visual editor. There is no Inspector, no Prefab system, no Blueprint graphs. Code is the interface.
- Not feature-competitive with Bevy/Unity. AnvilKit has fewer rendering features, no asset editor, no networking prefab. It has what AI agents need to build small-to-medium games efficiently.
- Not for humans who love GUI tools. If you want Unity, use Unity.
A cold-start AI agent (no prior AnvilKit context) can build a playable Flappy Bird clone in under 30 minutes using only AnvilKit's public API.
This is the north star. Every feature decision, API change, and architectural choice is evaluated against this benchmark.
- Phase 1 (simplification): Complete. Upgraded to bevy 0.15, replaced custom
Appwithbevy_app::App, demoted 5 premature-abstraction crates, zero warnings. - Phase 2 (AI infrastructure): In progress.
anvilkit-describetrait + derive macro complete. MCP server and structured errors pending. - Phase 3 (validation): Not started. Flappy Bird experiment will validate the thesis.
See openspec/changes/refactor-ai-first-architecture/ for the full roadmap.
AnvilKit is an experiment. If the Flappy Bird benchmark fails, the thesis is wrong and we pivot. If it succeeds, we're building a new category.