LLMs remember last year's Unity.
You pay that gap in tokens, every time.
hera-agent-unity touches this Unity, right now.
// Verify the type AI guessed โ directly in Unity hera-agent-unity describe_type UnityEditor.EditorApplication // Catch syntax before run โ cut one retry hera-agent-unity exec --check "return Camera.main.name;" // Enter Play Mode + check errors in one go hera-agent-unity editor play --wait && hera-agent-unity console --type error
5 minutes to install, 1 second to first command
curl -fsSL https://raw.githubusercontent.com/NotNull92/hera-agent-unity/main/install.sh | sh
irm https://raw.githubusercontent.com/NotNull92/hera-agent-unity/main/install.ps1 | iex
go install github.com/NotNull92/hera-agent-unity@latest
Package Manager โ Add package from git URL
https://github.com/NotNull92/hera-agent-unity.git?path=AgentConnector
Unity 6 (6000.0+) required. Connector starts automatically.
hera-agent-unity status # check connection
hera-agent-unity editor play --wait # enter Play Mode
hera-agent-unity exec "return Camera.main.name;" # run C#
hera-agent-unity doctor --agent-rules >> CLAUDE.md # Claude Code
hera-agent-unity doctor --agent-rules >> AGENTS.md # Codex
hera-agent-unity doctor --agent-rules >> .cursor/rules/hera-agent-unity.mdc # Cursor
hera-agent-unity doctor --agent-rules >> .github/copilot-instructions.md # Copilot
Works with any AI coding agent. Pure CLI โ not tied to MCP.
AI doesn't know your Unity
LLMs memorize last year's Unity API. New methods, deprecated properties, project-specific code โ they don't know.
Write code โ compile error โ fix โ rewrite. 3โ5 times per session is normal.
AI reads error logs and says "this is probably the issue." No certainty.
Profiler requires GUI clicks. AI can only say "this is probably the bottleneck."
24 tools, single binary, zero runtime dependencies
Run arbitrary C# code inside Unity Editor. Full API access, compile cache for instant re-invocation.
Check syntax without executing. Filters out one round of AI's "run โ fail โ retry."
play, stop, pause, refresh, compile. --wait flag blocks until state is confirmed.
error/warning/log filter, stacktrace control, clear. All in terminal โ no GUI console needed.
Active scene info, Build Settings scene list, additive load, save, close.
Unity Test Framework integration. Filtering, result file poll, domain-reload safe.
Profiler hierarchy without GUI clicks. Sort, depth, threshold โ pull hotspots directly.
Scene View or Game View capture. For automation docs, CI screenshot comparison.
Bundle multiple commands in a JSON file. Reduce round trips in CI/CD.
Pull types, methods, signatures from running code. Live state โ not LLM training cutoff guesses.
Search methods in loaded assemblies via reflection. Namespace filter, signature check.
List all assemblies loaded in current project. Version, path included.
Query Unity ScriptReference offline. No network needed, exact API info for your Unity version.
Create, delete, rename, set parent, activate/deactivate. HierarchyPath for exact path targeting.
Search GameObjects by name, tag, component. Include inactive option.
Add, remove, modify components. SerializedProperty path for deep property access.
Shader property query, material create/modify. Color, texture, vector value setting.
Prefab create, instantiate, component add/remove. Headless โ no PrefabStage needed.
Check shader property names, types, display labels, ranges. Essential before material editing.
Modify TextureImporter, ModelImporter settings via SerializedProperty directly.
Create Canvas, Panel, Button, Text and other uGUI elements. RectTransform anchor/pivot/preset setting.
Install, remove, embed packages. Git URL, registry, local file all supported.
Tag a C# class with [HeraTool] and it becomes a CLI command automatically. Easily add project-specific tools.
Hide what's complex. Show what's simple.
hera-agent-unity exec "..."
POST /command
[HeraTool] execution
When Unity Editor opens, the C# Connector automatically starts a localhost HTTP server.
The Go CLI discovers Unity via heartbeat files, copies commands as JSON, and executes them.
Even script compilation domain reloads don't break the connection โ the server auto-restarts.
Measured against real AI agent usage patterns
Direct measurement when calling hera-agent-unity as a tool from AI agents (Claude Code, Codex, etc.).
Realistic usage pattern: 50 exec C# calls = total 6,568 bytes (~1,622 tokens).
70% of responses are under 5 bytes (OK\n) โ tool cost is effectively noise.
Most tokens go into the C# code the agent writes (input).
See Benchmark report for detailed measurement environment and scenarios.
Unity 6000.0 (Unity 6) or later is required. Unity 2022 LTS and 2021 LTS are not supported.
No. It's a single Go executable. The Unity side installs as a UPM package โ that's it. No runtime or extra server to keep running.
Yes. When scripts recompile the server restarts too, but hera-agent-unity finds the new port automatically. Nothing to touch.
Yes. hera-agent-unity works with any AI coding agent โ Claude Code ยท Codex ยท Cursor ยท Copilot ยท Continue.dev. Append the lean rules to your agent's rules file:
hera-agent-unity doctor --agent-rules >> CLAUDE.md # Claude Code
hera-agent-unity doctor --agent-rules >> AGENTS.md # Codex
hera-agent-unity doctor --agent-rules >> .cursor/rules/hera-agent-unity.mdc # Cursor
hera-agent-unity doctor --agent-rules >> .github/copilot-instructions.md # Copilot
Full usage guide is in the repo root AGENT.md (~3.4K tokens). hera-agent-unity is a pure CLI โ not tied to MCP. Call it from any shell or script.
Migrate to hera-agent-unity. All Pro features are now bundled under MIT license. Just change CLI command from hera-agent โ hera-agent-unity. Update UPM URL to hera-agent-unity.git.
Direct measurement from AI agents (Claude Code, Codex, etc.): 50 exec C# calls = ~1,622 tokens total. At Claude Sonnet pricing that's under $0.03 per session โ even 5 sessions a day for 30 days stays under $5/month. 70% of responses are under 5 bytes (OK\n), so tool cost is effectively noise. Most tokens go into the C# code the agent writes (input).
Tag a C# class with [HeraTool] and it's picked up automatically. Define a Parameters class for args and put your logic in HandleCommand. Run hera-agent-unity list to verify registration.
5 minutes to install. 1 second to the first command. The next AI step moves from guessing to measuring.