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 --compact is 93 estimated tokens and find_gameobjects --ids is 49 estimated tokens in the smoke scene.

  • Measured on: 2026-06-22
  • CLI: hera-agent-unity v0.0.29
  • Connector under test: AgentConnector/package.json 0.0.43 as a local UPM package
  • Unity: 6000.3.5f2
  • Project: %UNITY_PROJECT% (Inventoria verification 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 / scenarioBytesEst. tokensResult
list --names37093 Tflat names array
list --compact37093 Tsame as --names
default list74251857 Tdescriptions included; not for bootstrap
find_gameobjects --name Pickup --limit 20 --ids19649 Tlowest-token object handoff
find_gameobjects --name Pickup --limit 20989248 Tdefault {instance_id,name}
find_gameobjects --name Pickup --limit 20 --fields all2834709 Tlegacy 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: success
  • console --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:

  • HeraSmokeRoot hierarchy;
  • Gameplay, SpawnPoints, Pickups, and PrefabInstances groups;
  • 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:

StepExitBytesEst. tokens
create 6000.3 smoke scene021

Hierarchy verification:

{"total":1,"returned":1,"results":[{"name":"HeraSmokeRoot","path":"/HeraSmokeRoot"}]}

Renderer verification:

  • HeraSmokeRoot contained 52 child renderers.
  • Player, Ground, Pickup_Coin_00, and PickupCoinPrefabInstance_00 had enabled renderers.

3. Token Measurements

Baseline

CaseBytesEst. tokens
status11529
scene info29775
list --names37093
list --compact37093
list74251857
list --tool exec1782446
package probe3710
CaseBytesEst. tokens
find_gameobjects --name Pickup --limit 529775
find_gameobjects --name Pickup --limit 20989248
find_gameobjects --name Pickup --limit 501921481
find_gameobjects --name Pickup --limit 20 --ids19649
find_gameobjects --name Pickup --limit 20 --names409103
find_gameobjects --name Pickup --limit 20 --fields instance_id,name,path2094524
find_gameobjects --name Pickup --limit 20 --fields all2834709

Interpretation:

  • --ids remains the best follow-up path when the next command accepts instance_id.
  • Default find_gameobjects stays much cheaper than the verbose --fields all shape.
  • Path/scene/active costs are still explicit and opt-in.

Components

CaseBytesEst. tokens
manage_components add Rigidbody on ground12732
manage_components set Rigidbody m_Mass12933
manage_components get Rigidbody m_Mass12933
manage_components list player components526132

Prefab

CaseBytesEst. tokens
instantiate 15 prefab instances via exec21
find_gameobjects --name PickupCoinPrefabInstance --limit 201256314

UI and Capture

CaseBytesEst. tokens
find_gameobjects --name HUD_ --fields instance_id,name,path439110
ui_doc export --path /HeraSmokeRoot/HUDCanvas876219
ui_doc capture --out %TEMP%/hera-smoke-6000-3-hud.png12732
screenshot --view scene --output_path %TEMP%/hera-smoke-6000-3-scene.png10226

Visual observation:

  • ui_doc capture rendered the overlay HUD text and health bar.
  • screenshot --view scene and screenshot --view game returned 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

CaseBytesEst. tokens
console --type error before PlayMode10426
editor play --wait308
runtime probe5715
console --type error --lines 510426
console --lines 2022557
console --type error --stacktrace full10426
editor stop175
final console --type error --lines 5010426

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-unity resolved as local connector 0.0.43.
  • list --names found 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 under Assets/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 --compact is 93 estimated tokens and is safe for bootstrap discovery.
  • default list is still about 1857 estimated tokens and should be reserved for descriptive browsing.
  • find_gameobjects --ids is 49 estimated tokens for a 20-result pickup search.
  • --fields all remains 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.