SpatialAgents QGIS plugin

Coding agents and QGIS in one workspace.

The plugin connects the open QGIS project state with Codex CLI, Claude Code or OpenCode. Each of these agent systems can launch multiple SpatialAgents. Tasks, tool calls and results move through a local, token-authenticated bridge. The language model can also be one operated entirely locally — Benchmark 08 documents this with 83.7 of 100 points on a notebook.

The fundamentals explain tool use, MCP, skills and planning in thirteen sections.

SpatialAgents architecture from coding agents through the shared workspace and local bridge to the QGIS plugin
SpatialAgents / SystemThe architecture connects the shared workspace, domain computation and visible QGIS interaction in a traceable workflow.

Architecture

A shared workspace connects code and map.

The agents and QGIS use the same project files. Spatial computation is performed in the workspace; the plugin handles controlled interaction with the open QGIS project.

  1. Read task and project state.

    The participating agents receive the domain task and reads layers, map extent, project structure and available tools.

  2. Apply data and methods.

    Skills and the Geospatial API support acquisition, analysis and processing. Results are created as files in the shared workspace.

  3. Make results visible in QGIS.

    The bridge loads layers, styles maps, navigates the project and exports project or layout artefacts.

  4. Verify project state and artefacts.

    Screenshots, layer information and generated files return to the participating agents and inform the next step.

Geospatial API for AI agents

Direct Python use with low token overhead.

The Geospatial API is part of SpatialAgents. Coding agents import it directly in the workspace and use their native abilities for code generation, execution and verification.

01 / Direct access

The library runs in the shared workspace.

Geospatial functions are available as a Python API. These domain computations require no additional MCP server.

02 / Self-correction

Errors lead to a useful next step.

The interface responds fault-tolerantly with structured, AI-specific messages, correction hints and appropriate alternatives.

03 / Recursion

Agent analyses improve the framework.

Feedback from spatial tasks flows back into the API, tests, benchmarks, documentation and agent skills.

Explore the Geospatial API

Local data flow

Declared QGIS actions and visible results.

The bridge runs locally, authenticates connections with a token and provides defined QGIS operations. Compute-intensive processing remains in the shared workspace.

Connection
The selected agent system and QGIS communicate through the local SpatialAgents bridge.
QGIS operations
Nine groups of declared actions: project, state, layers, features, map, layouts, jobs, plugins and files. The groups with counts and examples.
Domain computation
Geospatial API, GDAL, GRASS GIS and other Python tools run in the shared workspace.
Deliberate changes
High-impact plugin actions are presented for confirmation in QGIS.

Application evidence

From the architecture to an executed QGIS task.

SpatialAgents Benchmark 08 documents the complete prompt, assessment criteria, generated geodata, maps, charts and portable QGIS project.