| Crates.io | bevy_ai_editor |
| lib.rs | bevy_ai_editor |
| version | 0.3.1 |
| created_at | 2026-01-22 21:15:16.413214+00 |
| updated_at | 2026-01-24 10:44:01.865646+00 |
| description | A remote AI level editor plugin for Bevy engine, enabling Python-based scene manipulation for AI agents. |
| homepage | https://github.com/cats2333/bevy_ai_editor |
| repository | https://github.com/cats2333/bevy_ai_editor |
| max_upload_size | |
| id | 2062633 |
| size | 3,988,602 |
An experimental Remote Level Editor plugin for the Bevy game engine.
This project is designed to be the "Hands" for an AI Agent. It allows AI models (like OpenCode) to manipulate a 3D game world by writing and executing Python code.
This tool bridges the gap between LLM Code Generation and Game Engines.
BevyAiClient.In this architecture:
15703.assets/models and generates a manifest for physics inference.| bevy_ai_editor | Bevy |
|---|---|
| 0.1.x | 0.17 |
| 0.2.x | 0.18 |
graph TD
User[User / Product Manager] -->|Prompts| AI[OpenCode / AI Agent]
AI -->|Writes & Runs| Py[Python Script]
Py -- HTTP POST /spawn --> Bevy[Bevy Engine]
Bevy -- Asset Scanner --> Manifest[Physics Manifest]
Bevy -->|Visual Feedback| User
cargo run --example simple_app
You can now ask OpenCode (or write Python yourself):
"I see you have
tree.glbandhouse.glbin the assets. Write a python script usingBevyAiClientto create a circular village with 5 houses and trees surrounding them."
Or run the demos manually:
python examples/demos/demo_01_grid.py
python examples/demos/demo_02_forest.py
To help AI agents understand how to place objects correctly, we follow these conventions (specifically for Kenney assets):
0 or 180 degrees.90 or 270 degrees.assets/asset_rules.json for specific placement rules.The BevyAiClient (python/bevy_ai_client.py) is what OpenCode uses to interact with the world:
from python.bevy_ai_client import BevyAiClient
client = BevyAiClient()
# Spawn a builtin red cube
client.spawn("builtin://cube/red", x=0, y=5, z=0)
# Spawn a GLTF model (path relative to assets/)
client.spawn("models/nature/tree.glb", x=10, z=10, rotation=1.57)
# Save the current scene
client.save_scene("my_cool_level.json")
bevy_ai_editor/
├── assets/ # Game assets (models, textures)
├── examples/ # Rust examples and Python demos
├── python/ # Python client library
│ └── bevy_ai_client.py
├── src/ # Rust Source Code
│ ├── lib.rs # Plugin core & HTTP server
│ └── scanner.rs # Asset auto-scanner
└── Cargo.toml # Rust dependencies
app.insert_resource(AiEditorConfig {
http_port: 15703,
manifest_path: "assets/asset_manifest.json".to_string(),
save_dir: "assets/levels".to_string(),
});
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.