Token Reduction Benchmark
August 3, 2026 · View on GitHub
One-line summary: on Unity 6000.3.5f2, the v0.0.43 low-token discovery behavior holds:
list --compactis 93 estimated tokens andfind_gameobjects --idsis 49 estimated tokens in the smoke scene.
- Measured on: 2026-06-22
- CLI:
hera-agent-unity v0.0.29 - Connector under test:
AgentConnector/package.json0.0.43as a local UPM package - Unity:
6000.3.5f2 - Project:
%UNITY_PROJECT%(Inventoriaverification project) - Scene:
Assets/HeraSmokeBenchmarks/Unity6000_3_20260622/Scenes/Smoke_6000_3.unity - Token estimate: UTF-8 output bytes divided by 4, rounded up
This benchmark measures the CLI output payload that comes back into an agent context. It does not include the outer tool-call framing overhead of a specific AI client.
0. TL;DR
| Command / scenario | Bytes | Est. tokens | Result |
|---|---|---|---|
list --names | 370 | 93 T | flat names array |
list --compact | 370 | 93 T | same as --names |
default list | 7425 | 1857 T | descriptions included; not for bootstrap |
find_gameobjects --name Pickup --limit 20 --ids | 196 | 49 T | lowest-token object handoff |
find_gameobjects --name Pickup --limit 20 | 989 | 248 T | default {instance_id,name} |
find_gameobjects --name Pickup --limit 20 --fields all | 2834 | 709 T | legacy verbose shape |
The measured --ids path is slightly cheaper than 2022.3/2023.2 because the returned IDs were shorter in this run.
1. Bootstrap and Package State
Initial bootstrap:
Connected: Inventoria · port=8090 · unity=6000.3.5f2 · state=ready · tools=26
The project initially resolved com.notnull92.hera-agent-unity as Git package 0.0.42:
{"version":"0.0.42","source":"Git","resolved":"C:\\Users\\PC\\Desktop\\Cowork\\Inventoria\\Library\\PackageCache\\com.notnull92.hera-agent-unity@84ee43ce4e3e"}
For a same-code benchmark, it was switched to the local connector under test:
hera-agent-unity manage_packages add "file:%HERA_REPO%/AgentConnector"
After switching:
{"version":"0.0.43","source":"Local","resolved":"C:\\Users\\PC\\Desktop\\Cowork\\hera-agent-unity\\AgentConnector"}
Compile and connector state:
editor refresh --compile --wait: successconsole --type error --lines 50:matched: 0- Unity state:
ready
2. Smoke Scene
Because this run used the real Inventoria project rather than a blank Test* project, the smoke scene was created under a dedicated benchmark-only asset folder:
Assets/HeraSmokeBenchmarks/Unity6000_3_20260622/
The scene mirrors the 2022.3 and 2023.2 benchmark shape:
HeraSmokeRoothierarchy;Gameplay,SpawnPoints,Pickups, andPrefabInstancesgroups;- ground cube, player capsule with
Rigidbody, camera, and directional light; - 10 spawn points;
- 20 pickup spheres;
Assets/HeraSmokeBenchmarks/Unity6000_3_20260622/Prefabs/PickupCoin.prefab;- 15 prefab instances during scene setup, plus 15 more during the prefab smoke step;
- overlay HUD canvas with title, objective, inventory, and health bar.
Scene creation output:
| Step | Exit | Bytes | Est. tokens |
|---|---|---|---|
| create 6000.3 smoke scene | 0 | 2 | 1 |
Hierarchy verification:
{"total":1,"returned":1,"results":[{"name":"HeraSmokeRoot","path":"/HeraSmokeRoot"}]}
Renderer verification:
HeraSmokeRootcontained 52 child renderers.Player,Ground,Pickup_Coin_00, andPickupCoinPrefabInstance_00had enabled renderers.
3. Token Measurements
Baseline
| Case | Bytes | Est. tokens |
|---|---|---|
status | 115 | 29 |
scene info | 297 | 75 |
list --names | 370 | 93 |
list --compact | 370 | 93 |
list | 7425 | 1857 |
list --tool exec | 1782 | 446 |
| package probe | 37 | 10 |
GameObject Search
| Case | Bytes | Est. tokens |
|---|---|---|
find_gameobjects --name Pickup --limit 5 | 297 | 75 |
find_gameobjects --name Pickup --limit 20 | 989 | 248 |
find_gameobjects --name Pickup --limit 50 | 1921 | 481 |
find_gameobjects --name Pickup --limit 20 --ids | 196 | 49 |
find_gameobjects --name Pickup --limit 20 --names | 409 | 103 |
find_gameobjects --name Pickup --limit 20 --fields instance_id,name,path | 2094 | 524 |
find_gameobjects --name Pickup --limit 20 --fields all | 2834 | 709 |
Interpretation:
--idsremains the best follow-up path when the next command acceptsinstance_id.- Default
find_gameobjectsstays much cheaper than the verbose--fields allshape. - Path/scene/active costs are still explicit and opt-in.
Components
| Case | Bytes | Est. tokens |
|---|---|---|
manage_components add Rigidbody on ground | 127 | 32 |
manage_components set Rigidbody m_Mass | 129 | 33 |
manage_components get Rigidbody m_Mass | 129 | 33 |
manage_components list player components | 526 | 132 |
Prefab
| Case | Bytes | Est. tokens |
|---|---|---|
instantiate 15 prefab instances via exec | 2 | 1 |
find_gameobjects --name PickupCoinPrefabInstance --limit 20 | 1256 | 314 |
UI and Capture
| Case | Bytes | Est. tokens |
|---|---|---|
find_gameobjects --name HUD_ --fields instance_id,name,path | 439 | 110 |
ui_doc export --path /HeraSmokeRoot/HUDCanvas | 876 | 219 |
ui_doc capture --out %TEMP%/hera-smoke-6000-3-hud.png | 127 | 32 |
screenshot --view scene --output_path %TEMP%/hera-smoke-6000-3-scene.png | 102 | 26 |
Visual observation:
ui_doc capturerendered the overlay HUD text and health bar.screenshot --view sceneandscreenshot --view gamereturned only the camera/background color in this Unity 6000.3 + Inventoria setup, even though hierarchy and renderer queries confirmed the smoke objects existed.- A direct
Camera.Render()PNG also returned the background only. This looks like a project/render-pipeline capture limitation, not a hierarchy/tool-discovery failure.
PlayMode
| Case | Bytes | Est. tokens |
|---|---|---|
console --type error before PlayMode | 104 | 26 |
editor play --wait | 30 | 8 |
| runtime probe | 57 | 15 |
console --type error --lines 5 | 104 | 26 |
console --lines 20 | 225 | 57 |
console --type error --stacktrace full | 104 | 26 |
editor stop | 17 | 5 |
final console --type error --lines 50 | 104 | 26 |
Runtime probe:
{"playing":true,"frame":78,"time":0.4166792,"pickups":40}
4. Verification
Observed:
- Unity 6000.3.5f2 returned to
ready. com.notnull92.hera-agent-unityresolved as local connector0.0.43.list --namesfound 26 tools.- Final console error query returned
matched: 0. - PlayMode entered, runtime probe succeeded, and PlayMode exited.
- The smoke hierarchy existed with root/player/pickup objects and enabled renderers.
Note:
- The active project was
Inventoria, not a disposable blank test project. The benchmark created isolated assets underAssets/HeraSmokeBenchmarks/Unity6000_3_20260622/and switched the project dependency to the local connector for measurement.
5. Conclusion
On Unity 6000.3.5f2, the v0.0.43 token-reduction behavior remains stable:
list --compactis 93 estimated tokens and is safe for bootstrap discovery.- default
listis still about 1857 estimated tokens and should be reserved for descriptive browsing. find_gameobjects --idsis 49 estimated tokens for a 20-result pickup search.--fields allremains available but costs 709 estimated tokens for the same 20-result search.
The low-token CLI path is stable across 2022.3.62f2, 2023.2.22f1, and 6000.3.5f2 for the tested smoke workflow.