Skip to content

qai-lab/spatial-agents

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Spatial Agents

🧠 Spatial Agents

Build AI Agents That Understand, Simulate, and Act in the Real World

GitHub Stars GitHub Forks Discord Twitter Follow

Quick Start β€’ Features β€’ Arena β€’ Docs β€’ Contributing β€’ Discord


🎯 What is Spatial Agents?

Spatial Agents is an open-source framework for building AI agents with true spatial intelligenceβ€”agents that can understand the physical world, simulate environments, and take actions in reality.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                                                                                    β”‚
β”‚                           🧠 SPATIAL AGENTS                                        β”‚
β”‚                                                                                    β”‚
β”‚      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                 β”‚
β”‚      β”‚  UNDERSTAND  β”‚  β†’   β”‚   SIMULATE   β”‚  β†’   β”‚     ACT      β”‚                 β”‚
β”‚      β”‚              β”‚      β”‚              β”‚      β”‚              β”‚                 β”‚
β”‚      β”‚  3D Scenes   β”‚      β”‚  Physics     β”‚      β”‚  Navigation  β”‚                 β”‚
β”‚      β”‚  Objects     β”‚      β”‚  Worlds      β”‚      β”‚  Manipulationβ”‚                 β”‚
β”‚      β”‚  Spatial     β”‚      β”‚  Scenarios   β”‚      β”‚  Real-world  β”‚                 β”‚
β”‚      β”‚  Relations   β”‚      β”‚  What-ifs    β”‚      β”‚  Execution   β”‚                 β”‚
β”‚      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                 β”‚
β”‚                                                                                    β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚
β”‚  β”‚                          🌍 QAI EARTH ENGINE                                 β”‚ β”‚
β”‚  β”‚        Real-world geospatial data  β€’  Physics  β€’  3D environments           β”‚ β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚
β”‚                                                                                    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Why Spatial Intelligence?

Current AI is blind to the physical world. Spatial Agents gives AI the ability to:

  • See β€” Understand 3D scenes, object relationships, and spatial layouts
  • Think β€” Reason about physics, predict outcomes, plan paths
  • Simulate β€” Test actions in virtual environments before execution
  • Act β€” Navigate, manipulate, and operate in the real world

✨ Features

πŸ” Understand

Perceive and comprehend spatial environmentsβ€”3D scene understanding, object recognition, spatial relationship extraction, and depth perception.

🌐 Simulate

Run physics-accurate simulations, test hypothetical scenarios, predict outcomes, and train agents in virtual worlds before real deployment.

🎯 Act

Execute real-world actionsβ€”navigation, object manipulation, robotic control, and autonomous decision-making in physical environments.

🏟️ Arena

Benchmark and compete AI models in spatial reasoning challenges. Compare performance across navigation, physics, and 3D understanding.

πŸ”Œ Universal Model Interface

Plug in any LLM/VLMβ€”OpenAI, Anthropic, Google, DeepSeek, Qwen, or your own custom model.

🌍 QAI Earth Integration

Connect to real-world geospatial data, maps, terrain, and environmental information.


πŸš€ Quick Start

Installation

pip install spatial-agents

Build a Spatial Agent

from spatial_agents import SpatialAgent, Environment
from spatial_agents.capabilities import Vision, Navigation, Manipulation

# Create an agent with spatial capabilities
agent = SpatialAgent(
    model="claude-sonnet-4-20250514",
    capabilities=[Vision, Navigation, Manipulation]
)

# Connect to an environment
env = Environment.from_location("san_francisco", radius_km=5)

# Agent understands, simulates, and acts
observation = agent.perceive(env)
plan = agent.reason("Navigate to the nearest coffee shop avoiding traffic")
result = agent.execute(plan, simulate_first=True)

Understand Spatial Scenes

from spatial_agents import SpatialAgent

agent = SpatialAgent(model="gpt-4o")

# Understand a 3D scene from images
scene = agent.understand(
    images=["room_view_1.jpg", "room_view_2.jpg"],
    query="Where is the laptop relative to the window?"
)

print(scene.objects)        # Detected objects with 3D positions
print(scene.relationships)  # Spatial relationships between objects
print(scene.answer)         # "The laptop is 2m left of the window, on the desk"

Simulate Before Acting

from spatial_agents import SpatialAgent, Simulation

agent = SpatialAgent(model="claude-opus-4-5-20250514")

# Plan a complex action
action = agent.plan("Move the robotic arm to pick up the red cube")

# Simulate first to verify safety
sim = Simulation(physics=True)
outcome = sim.run(action, steps=100)

if outcome.success and outcome.collision_free:
    agent.execute(action)  # Safe to execute in real world

🏟️ Arena

Test and compare spatial intelligence across different AI models.

from spatial_agents import Arena, Agent

arena = Arena(challenge="urban_navigation")

results = arena.compete([
    Agent(model="claude-opus-4-5-20250514", name="Claude"),
    Agent(model="gpt-4o", name="GPT-4o"),
    Agent(model="gemini-ultra", name="Gemini"),
])

print(results.leaderboard())

Leaderboard

Rank Model Navigation Object Reasoning Physics 3D Understanding Overall
πŸ₯‡ Claude Opus 4.5 94.2 91.8 89.5 92.1 91.9
πŸ₯ˆ GPT-4o 92.1 90.3 88.7 89.4 90.1
πŸ₯‰ Gemini Ultra 89.8 88.9 90.2 87.6 89.1
4 DeepSeek V3 87.2 86.5 85.8 84.9 86.1
5 Qwen 2.5 85.4 84.2 83.1 82.8 83.9

πŸ“ˆ View Full Leaderboard β†’


πŸ›οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                            SPATIAL AGENTS                                   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚  β”‚   Perception    β”‚  β”‚   Simulation    β”‚  β”‚     Action      β”‚              β”‚
β”‚  β”‚                 β”‚  β”‚                 β”‚  β”‚                 β”‚              β”‚
β”‚  β”‚ β€’ 3D Vision     β”‚  β”‚ β€’ Physics       β”‚  β”‚ β€’ Navigation    β”‚              β”‚
β”‚  β”‚ β€’ Depth         β”‚  β”‚ β€’ Scenarios     β”‚  β”‚ β€’ Manipulation  β”‚              β”‚
β”‚  β”‚ β€’ Object Det.   β”‚  β”‚ β€’ Prediction    β”‚  β”‚ β€’ Control       β”‚              β”‚
β”‚  β”‚ β€’ Scene Graph   β”‚  β”‚ β€’ Training      β”‚  β”‚ β€’ Execution     β”‚              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”              β”‚
β”‚  β”‚     Models      β”‚  β”‚      Arena      β”‚  β”‚   Benchmarks    β”‚              β”‚
β”‚  β”‚                 β”‚  β”‚                 β”‚  β”‚                 β”‚              β”‚
β”‚  β”‚ β€’ OpenAI        β”‚  β”‚ β€’ Competitions  β”‚  β”‚ β€’ SpatialIQ     β”‚              β”‚
β”‚  β”‚ β€’ Anthropic     β”‚  β”‚ β€’ Challenges    β”‚  β”‚ β€’ NavScore      β”‚              β”‚
β”‚  β”‚ β€’ Google        β”‚  β”‚ β€’ Leaderboards  β”‚  β”‚ β€’ PhysicsBench  β”‚              β”‚
β”‚  β”‚ β€’ DeepSeek/Qwen β”‚  β”‚ β€’ Evaluation    β”‚  β”‚ β€’ 3D-Reason     β”‚              β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜              β”‚
β”‚                                                                             β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚
β”‚  β”‚                       QAI EARTH ENGINE                                β”‚  β”‚
β”‚  β”‚     Real-world geospatial data  β€’  Physics  β€’  3D environments        β”‚  β”‚
β”‚  β”‚           Terrain  β€’  Buildings  β€’  Sensor simulation                 β”‚  β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚
β”‚                                                                             β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“¦ Capabilities

πŸ” Perception

3D scene understanding, object detection, depth estimation, spatial relationship extraction, multi-view reconstruction.

🧭 Navigation

Path planning, obstacle avoidance, SLAM, multi-destination routing, real-world wayfinding.

🎯 Reasoning

Spatial logic, physics prediction, object permanence, "what's behind X?", relative positioning.

⚑ Physics

Force understanding, trajectory prediction, stability analysis, collision detection, material properties.

πŸ€– Control

Robotic manipulation, motion planning, grasping, assembly, human-robot interaction.

🌍 Geospatial

Real-world maps, satellite imagery, terrain analysis, urban environments, global positioning.


πŸ”¬ For Researchers

from spatial_agents.benchmarks import SpatialIQBenchmark

benchmark = SpatialIQBenchmark()
results = benchmark.evaluate(your_model, split="test")

print(results.to_latex())
print(results.statistical_analysis())

Cite our work:

@software{spatial_agents_2025,
  title={Spatial Agents: AI Agents That Understand, Simulate, and Act in the Real World},
  author={Qian, Dr. and QAI Lab},
  year={2025},
  url={https://github.com/qai-lab/spatial-agents}
}

🀝 Contributing

We welcome contributions! Whether you're:

  • πŸ” Adding perception β€” New vision models, depth estimators
  • 🌐 Building simulations β€” Physics engines, virtual environments
  • 🎯 Creating actions β€” Robotics integrations, control systems
  • 🏟️ Designing challenges β€” New arena benchmarks
  • πŸ“– Improving docs β€” Help others build spatial agents

Check out our Contributing Guide to get started.

git clone https://github.com/qai-lab/spatial-agents.git
cd spatial-agents
pip install -e ".[dev]"
pytest

🌐 Community & Support

Discord LinkedIn X/Twitter


Built with ❀️ by Dr. Qian and QAI Lab

Author LinkedIn

⭐ Star us on GitHub β€” it helps the project grow!


Spatial Agents Demo

AI agents that see, think, simulate, and act in the physical world

About

No description, website, or topics provided.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors