Evidence-driven spatial reasoning
S-Agent2.0

Spatial reasoning with a general coding agent.

Rui Gong1* Ruoyu Wang1* Yalun Dai1 Hao Li1,★ Sidi Yang2 Qihao Zhao1 Hongyu Li1 Zeyang Guan1 Fangzhou Hong1,★ Zhaoxi Chen1,★ Kim-Hui Yap1† Ziwei Liu1,★

1Nanyang Technological University 2University of Hong Kong ★Ropedia

Example trajectory
MMSI-Bench · MMSI_58
Qwen3.8-27B · OpenHands
Abridged run
74.1
MMSI-Bench average
Gemini-3.8-Flash backbone
90.5
ReVSI average
Gemini-3.8-Flash backbone
+20.5
Toolkit gain on ReVSI
Qwen3.8-27B: 61.8 → 82.3
5/ 5
Benchmarks ahead of SpatialClaw
Qwen3.8-27B backbone
Video

S-Agent 2.0 in two minutes.

01 Problem

Correct evidence. Wrong answers.

With the same backbone and perception models, SpatialClaw often acquires correct measurements but misinterprets them or overrides them with visual intuition.

MMSI-Bench · Gemini-3.8-Flash. SpatialClaw computes West at step 5, then reverses the derivation to answer East at step 8.

  • Misinterpreted evidenceA correct measurement is read in the wrong reference frame.
  • Evidence ignoredVisual intuition overrides the measured result.
Acquire

One scene

Combine tool measurements and model observations.

Remember

Scene memory

Keep evidence available throughout the task.

Interpret

Spatial language

Return measurements with explicit reference frames.

Gemini-3.8-Flash, same perception models. Left: a reversed rotation on ReVSI. Right: ignored measurements on MMSI-Bench.

Side-by-side failures and corrected runs · Figure 4
Two items where SpatialClaw acquires the right evidence and answers wrong, with S-Agent 2.0 answering right

Same backbone and perception models. Blue: correct evidence. Red: incorrect interpretation. Green: S-Agent 2.0's reference frame and readout.

02 Method

A coding agent. A perception toolkit.

S-Agent 2.0 adds perception commands to a coding agent's existing shell, file system and execution loop. The toolkit maintains a shared scene for every measurement.

Framework: task input, the coding agent with its instruction, CLI execution and evidence check, and the perception toolkit with its persistent scene state

Framework. Images or video → perception commands → persistent scene memory → spatial readouts.

Acquire

A shared scene

recon builds a metric, gravity-aligned scene; segment adds objects from SAM 3 masks. The agent can add oriented observers with add_instance and remove errors with drop.

reconsegmentadd_instancedrop
Remember

A persistent scene memory

Frames, geometry and named instances persist across calls. Each instance stores its position, extent and pose; later queries refer to it by name.

list_instancebev
Interpret

Readouts in spatial language

Readouts include units, reference frames and a spatial conclusion. From :

clock is 11.94 m in FRONT of entrant_front, 5.64 m to its LEFT and 0.41 m BELOW it — overall to its FRONT-LEFT
sidedistancedepthelevationmotioncompass

The toolkit

CommandArgumentsWhat it does
Tool perception
recon
noneBuilds a metric, gravity-aligned point cloud; registers cameras and the scene; flags limited view overlap.
segment--prompt TEXT[@f<N>]Lifts SAM 3 masks into named 3D instances, tagged static or moving.
Model perception
add_instance
--name --source; --view N --pixel X,Y | --at-map f<N>:PX,PY | --at-camera N; --facing V | --primary A=V --secondary A=VRegisters a point or oriented observer; orientation-only calls update its pose.
drop--instance f<N>:<id>Removes an instance and returns the updated registry.
Readouts
list_instance
noneLists instances, sources and orientation status.
bev--frame N, --erase f<M>:XShows a top-down map of cameras, objects and oriented observers.
distance--a X --b Y, --known DReturns 3D, horizontal and vertical distances; --known calibrates scale.
side · depth--view N | --observer X; --of YReturns observer-relative offsets and directions, or signed depth and distance order.
elevation--of REF --of YReturns signed height and vertical order.
motion--of A --of BMeasures camera or object translation and rotation between frames.
compass--start A --end B --orientation DIR, --query "A->B"Calibrates from a known direction and returns ranked compass directions.

Frozen perception models:

Depth Anything 3metric depth and camera poses
π³mosper-pixel motion masks
GeoCalibgravity direction
SAM 3promptable segmentation

One question, end to end

Plan → measure → check → answer. Full run: .

An office route question from MMSI-Video-Bench solved with recon, segment, add_instance and side readouts

Video route · Figure 3. Across 29 frames, the agent locates objects, registers an observer and reads the route: TV front-right, door ahead-left.

03 Results

Spatial reasoning across five benchmarks.

Multi-view and video benchmarks with Qwen3.8-27B (local FP8) and Gemini-3.8-Flash. OpenHands is used unless stated.

S-Agent 2.0 Agentic systems Models answering directly

MMSI-Bench

Accuracy (%) · selected results, Table 1

ReVSI

Official mean score (%) · selected results, Table 2

Five-benchmark comparison

Qwen3.8-27B · Table 3. Green: margin over SpatialClaw.

Toolkit gains across backbones

Same agent and items: without (hollow) vs. with (filled) toolkit · Table 5.
SpatialClawS-Agent 2.0

Across coding agents

Same workspaces and toolkit · Qwen3.8-27B · Table 4.
BenchmarkOpenHandsCodexClaude Code
MMSI-Bench66.567.063.8
SPAR-Bench72.471.872.8
ReVSI82.376.679.1

Interface ablations

One component removed at a time · Qwen3.8-27B · Table 6.
VariantMMSIReVSI
S-Agent 2.066.582.3
No interpreted readout65.2 −1.381.1 −1.2
No scene memory63.0 −3.579.8 −2.5
No model perception57.7 −8.876.4 −5.9

Readouts alone in SpatialClaw: 74.5 → 75.5 on ReVSI; 62.6 → 62.9 on MMSI-Bench (Table 9).

Results by question type · Tables 1 and 2
MMSI-Bench results by question category

MMSI-Bench. C/O/R: camera/object/region. Parentheses: change vs. SpatialClaw with the same backbone.

ReVSI results by question type

ReVSI. Numerical tasks use official mean relative accuracy; other tasks use multiple-choice accuracy. Absolute distance remains below SpatialClaw.

04 Trajectories

Explore agent trajectories.

Eleven successful benchmark runs, with questions, commands, readouts and images.

05 Analysis

Checking evidence. Grounding questions.

The agent checks masks, maps and the instance registry, correcting scene memory before answering.

One trajectory cross-checking visual grounding, the stored observer and the readouts

Where is the clock when entering the house? The agent identifies the front door and places entrant_front there, facing inside.

The clock is 11.94 m in front and 5.64 m left. A hallway-camera readout confirms the same relation: answer D, front-left.

Toolkit usage

Calls per episode; shading shows usage frequency. 1,000 items per run · Table 8.

Limitations

Grounding still depends on the backbone: it may place an imagined observer incorrectly or confuse an object's height with its distance above the floor.

Reconstruction errors in scale or pose propagate to readouts. The command-line interface allows perception models to be replaced independently.

Two grounding failures: an imagined viewpoint placed wrongly and a quantity read in the wrong sense

Grounding failures · Figure 4. Left: misplaced observer. Right: vertical position mistaken for object height.