NVIDIA Research introduced SpatialClaw (June 19, 2026), a training-free agent framework for spatial reasoning. Its central claim: the weakness of VLMs in 3D spatial judgment lies not in the model itself, but in the action interface the agent uses to call tools.
- Paper: https://spatialclaw.github.io/static/pdfs/spatialclaw.pdf
- Repository: https://github.com/NVlabs/SpatialClaw
- Perception tools (Depth Anything 3, SAM 3) are ordinary Python callables
- Outputs (masks, depth maps, camera geometry, trajectories) are ordinary Python variables
- Six public entry points:
InputImages,Metadata,tools,show(),vlm,ReturnAnswer() - Single-pass code: writes a full program computing centroid distance using a median — wrong.
- Structured tool-call: no "nearest point" operation in the tool schema — cannot answer.
- SpatialClaw: first tries centroid distance, notices the issue, then switches to
scipy.spatial.KDTreefor nearest-point distance. Result: 0.9439 m (ground truth 0.9 m). - DSI-Bench: +17.6 points
- MindCube: +15.3 points
- Robotics and embodied AI: measuring metric distances between objects before manipulation
- Multi-view detection: recovering object orientation from multiple camera angles
- Video and 4D analysis: tracking object or camera motion
- Indoor scene QA: "Where is the door relative to the sink?"
- Non-commercial license limits commercial deployment.
- Perception quality remains the ceiling: accuracy may drop sharply with weaker backbones.
- 30-step cap may be hit on complex multi-step embodied tasks.
- Code composition 52% vs JSON 28% implies JSON tool-calling still wins ~48% of scenarios.
- Jupyter kernel + five-stage loop raises deployment cost compared to pure JSON tool-call pipelines.
Framework
SpatialClaw centers on a Stateful Python Kernel preloaded with input frames and a set of primitives:
Rather than calling tools via a predefined JSON schema, the agent writes a Python cell into the kernel, freely composes tool results as NumPy arrays, and decides the next step based on intermediate results.
Benchmark Results
Same Gemma4-31B backbone, same prompts, same perception tools — only the action interface changes:
| Action interface | Avg accuracy (20 benchmarks) | Δ vs no tools | |---|---|---| | No-tool baseline | 53.4% | — | | Single-pass code | 55.2% | +1.8 | | Structured tool-call (JSON schema) | 56.7% | +3.3 | | SpatialClaw (code as action) | 59.9% | +6.5 |
Compared to concurrent spatial agents:
| Method | Interface | Avg | Δ vs SpatialClaw | |---|---|---|---| | VADAR | Single-pass | 40.5 | −19.4 | | pySpatial | Single-pass | 47.8 | −12.1 | | SpaceTools-Toolshed | Structured tool-call | 48.7 | −11.2 | | SpatialClaw | Code as action | 59.9 | best |
An LLM-as-judge attribution analysis finds 52.2% of wins come from code composition, 19.5% from control flow, and 28.3% are interface-neutral.
Case study
Question: *What is the shortest distance between the radiator and the door?*
The key capability: deciding which tool to call and what code to write based on intermediate observations.
The largest gains occur on dynamic tasks requiring chained geometric reasoning across frames and viewpoints:
Generalization and Implementation
The framework was validated on 6 backbones (Qwen3.5/3.6 and Gemma4 series, 26B–397B) with the same prompts and tool set, with no benchmark-specific tuning.
The five-stage loop: planning → code generation → code execution → feedback assembly → answer submission. AST static checks reject unsafe code; a 30-step cap applies.
Implementation stack: LangGraph workflow + persistent Jupyter kernel + vLLM-served backbones + FastAPI GPU services for perception.
Potential Applications
Why It Matters
1. Paradigm shift: code-as-action vs JSON tool-calling marks a major turn in agent design — Anthropic's Computer Use, Claude Code, Manus, and Devin all share the "code is the action" core. 2. Training-free engineering value: one prompt/tool set works across 6 backbones and 20 benchmarks without retraining per VLM. 3. Upstream of VLA robots: SpatialClaw offers a training-free path for "seeing geometry first, then acting." 4. Perception is the ceiling reminder: with the action-interface lever nearly maxed (+6.5), better perception models are the next frontier.