12345

Making deck.gl
AI-Ready

Declarative specs as an agent-native
interface for maps

Javier de la Torre
CARTO Founder

jatorre.github.io/deckgl-ai-ready · slides, experiments, raw model outputs, harnesses

Everybody uses AI to write code now.

So… how well does AI treat deck.gl?

Five questions, five discussions

  1. What do models recommend when someone asks for a map?
  2. How well do frontier models write deck.gl?
  3. How can agents drive deck.gl interactively?
  4. Does the website and documentation work for AI?
  5. How do we handle AI contributions?
Q1 · What do models recommend?

Given a prompt like "Make me a map that…"

Opus 4.8Fable 5.1GPT-5.6 SolGPT-6 AstraGemini 3.1 ProGemini 3.8 FlashGLM 5.3
…shows 2 million GPS pointsdeck.gldeck.gldeck.gldeck.gldeck.gldeck.gldeck.gl
…of airports from a GeoJSON, with tooltipLeafletMapLibreMapLibreLeafletLeafletLeafletLeaflet
…of H3 hexagons colored by countpydeckdeck.gldeck.gldeck.gldeck.gldeck.glLeaflet
…in a React app, best library in 2026MapLibreMapLibreMapLibreMapLibreMapLibreMapLibreMapLibre
…in one HTML file, five markersLeafletLeafletLeafletLeafletLeafletLeafletLeaflet

A clear progression. Older models (GPT-4o, Haiku 4.5, GPT-5-mini) answered Leaflet for anything simple, Mapbox for React and deck.gl 8. The frontier answers MapLibre for the basemap, deck.gl for the data, and Leaflet only for a throwaway page.

Q1 · What do models recommend?

Do they know today's deck.gl? No. None gets past 9.1.

Model"Latest" deck.gl it targets
Opus 4.89.0
Fable 5.19.1 hedges: "a later 9.x may exist"
GPT-5.6 Sol9.1.14
GPT-6 Astra9.1.0 "I can't verify the current release"
Gemini 3.1 Pro9.0.0
Gemini 3.8 Flash9.0.38
GLM 5.39.1
Actual9.4.0 5 Sept 2026 · 9.2 in May 2025, 9.3 in April 2026

Mistakes a user inherits, because nobody questions the model

  • Six of seven install the old MapLibre integration. It works, but deck.gl renamed the module three days ago. Only GPT-5.6 Sol knows.
  • GLM 5.3 invents a class name and, in another answer, reaches for Mapbox GL with an access token instead of MapLibre.
  • Two of seven answered the H3 question in Python or Leaflet, not a web map at all.

We need one deck.gl + MapLibre story. Our MapLibre page offers three modes, two packages, two React roots. In 75 generated maps the models took four routes; 12 still carry a v8 shim. One path per environment, the rest retired in v10.

Q2 · How well do frontier models write deck.gl?

How we tested it

Five maps to build. One prompt each. No tools, no docs.

  1. World airports as styled points with tooltip and legend
  2. Choropleth of 4,627 Vancouver blocks, skewed data, classed legend
  3. 3D hexagons of 140k UK accidents with a radius slider
  4. Animated taxi trips with play/pause
  5. Open brief: "the most impressive deck.gl visualization you can build"

How we scored the outputs

  • Each file rendered in a headless browser; errors, failed requests and library versions captured
  • Screenshots at 3, 8 and 14 seconds
  • A model judge scored each map on a fixed rubric: renders, meets the brief, cartography, interactivity, current API
  • Then we looked at every one

Seven models: Opus 4.8, Fable 5.1, GPT-5.6 Sol, GPT-6 Astra, Gemini 3.1 Pro, Gemini 3.8 Flash, GLM 5.3. Real public data, CDN scripts only, no API keys.

Q2 · How well do frontier models write deck.gl?

Almost every map works.

Score is the four-task total out of 68. Thumbnails are the 8-second screenshot of the generated page, unedited.

Q2 · How well do frontier models write deck.gl?

The open brief is where they differ

Q2 · How well do frontier models write deck.gl?

We have to update the examples

  • The code is a generation behind. Most files load a deck.gl 8.9 bundle or use v8 patterns; only GPT-5.6 Sol used the current overlay integration; none used 9.2 or later.
  • They copy the showcase examples. The hexagon and trips tasks pulled every model toward the official example's stack, palette and defaults, v8 included.
  • Same cartographic choices, same blind spots. Every choropleth is YlOrRd quantiles; skewed data goes unhandled; legends vanish when not demanded. Good, never excellent.
  • The open-weight model knows the words, not the rules. GLM 5.3 mutated layer props instead of replacing layers and shadowed the library global.

Why. Our examples are the training data, and they are years old: working maps, written like it's 2024. The open brief shows what models can build now. Update the examples with AI, and the next generation of models learns deck.gl from those.

Q3 · How can agents drive deck.gl interactively?

Many applications will use deck.gl with agents to drive dynamic maps

Not "write me an app" but "show me", "filter that", "color it by income", while the map is running. The most logical interface for that is one deck.gl has had since 2018: the agent writes declarative JSON.

User
"show accidents by district"
Agent
@deck.gl/json
spec
JSONConverter
deck.gl map
← errors? state? what the user clicked? not defined

We are lucky to have it: declarative, portable, no eval, and models already know its syntax. What follows is how far it gets us today, and what is missing.

Q3 · How can agents drive deck.gl interactively?

Everyone is already doing it

CARTO

An MCP tool renders agent-written @deck.gl/json inside the chat; a closed registry of CARTO layers; credentials injected, never in the spec.

SQLRooms

Keeps @deck.gl/json canonical, adds dataset binding for DuckDB and GeoArrow, plus its own AI normalizer and instructions.

And

pydeck · kepler.gl configs · noodles.gl's portable project JSON · CARTO's open-source agentic deck.gl library.

"a growing need to generate powerful visualizations directly from the backend… without having knowledge about how to code front-end applications."Ib Green, RFC: JSON Layers, July 2018. Replace "backend" with "agent". The v2 tracker opened in April 2026 names LLMs as goal #1.
Q3 · How can agents drive deck.gl interactively?

How CARTO does it, two ways

Verbs on a live map

The in-app assistant has about 27 tools: add source, add layer, set style, filter. It edits the running map's state one call at a time.

Stateful and precise. But every rule lives in prose ("add the layer right after the source") and nothing checks it.

A document the agent writes

The agent emits a complete @deck.gl/json spec. An MCP App renders it inside the conversation; the same spec can be re-rendered in any app.

Stateless and portable. But the agent never sees the result; only errors come back.

Both work in production. Both hit the same wall.

Q3 · How can agents drive deck.gl interactively?

We flood the agent's context, and it never learns what happened

Going in
36 KB
of rules the agent must read on every call

The spec has no schema, so every rule about what will render lives in prose: which layers exist, which layer takes which source, which props are required, which expressions are allowed. Half of it lists ways to get an empty map with no error. For charts, the same service hands a 1.9 MB JSON Schema to a validator instead.

Coming back
0
errors, viewport, counts or clicks returned to the agent

An unknown layer type is logged and replaced with null; the map renders without it. The docs: "Error detection is currently limited." Nothing flows back from the rendered map, so the agent cannot see what it built. We send errors only, passively, with the legal alternatives spelled out. Silence equals success.

An agent recovers from any error it can see. Not from an empty map.

Q3 · How can agents drive deck.gl interactively?

Can frontier models write the spec? Mostly. And the failures are silent.

Opus 4.8Fable 5.1GPT-5.6 SolGPT-6 AstraGemini 3.1 ProGemini 3.8 FlashGLM 5.3
invented helpervalidCARTO helpervalidvalidvalidinvented helper

Task: a choropleth of countries by population, as @deck.gl/json. Every model got the @@type syntax and the view right. The failure is always in the same place: the data-driven color.

Four wrote a valid expression. One used CARTO's helper vocabulary, which only exists in our registry. Two invented a helper that does not exist. Older models reached for Mapbox style expressions.

"getFillColor": {
  "@@function": "interpolateColor",   ← does not exist
  "value": "@@=properties.population", ...
}

What the user sees: a map with no fill, and no error. The agent thinks it succeeded.

Q3 · Proposal

Make @deck.gl/json v2 the agent interface

  1. JSON Schema from Zod, including the compatibility rules. Validation, structured outputs, editors.
  2. Loud failure. A conversion report (ok · partial · error, dropped items with reasons) instead of warn-and-drop.
  3. State read-back. Viewport, layers with counts, picked object, optional screenshot. Finish the 2018 back-channel. Ship a reference MCP App.
  4. Patch semantics for multi-turn editing.
  5. A data-source concept for SQL, tiles, Arrow and COG.
  6. Registry profiles. Core plus vendor registries, published with their schemas.

Two provocations, and v10

  • Accept Mapbox-style expression arrays as accessors. Models speak it, and in v10, with GeoArrow data and luma.gl's GPGPU module, expressions could compile to GPU transforms instead of per-row JavaScript.
  • One color-scale vocabulary in core, not three plus what models invent.
  • v10 is a breaking release: decide the @@ prefixes and the data model together.

Posted on the v2 tracker, deck.gl-community #596, with a full draft RFC and an offer to help drive it. Step 1, GeoJSON schemas, has been an open PR since April. Let's finish what Ib started in 2018.

Q4 · Does the website and documentation work for AI?

How does deck.gl compare with similar projects?

Sitellms.txtAgent skillsMCP server
luma.gl same TSCyes, plus page Markdownofficial lumagl skill in the repo, plus an AI guide
maplibre.orgyesofficial repo, 9 skills, "to inform the LLMs"community
docs.mapbox.comyestwo official, one for coding agents
deck.gl404nonenone

Measured consequence. Every frontier model stops at deck.gl 9.0 or 9.1. Most generated maps load a v8 bundle. Six of seven explain a module rename that already happened.

Suggestion: copy luma.gl. PRs are open.

  • llms.txt and page Markdown, same plugin: #10677, 185 pages, verified on the /next/ deploy
  • skills/deckgl plus a "Working with AI" page, built from the mistakes on the previous slides: #10678
Q5 · How do we handle AI contributions?

The contributions are already AI-assisted

Median PR description length per month in visgl/deck.gl

Median length of a pull request description in visgl/deck.gl, bots excluded: about 400 characters through mid-2025, 1,200 to 2,500 since late 2025. Four of the six most active contributors quadrupled theirs within two quarters; two did not change. The repo's own AGENTS.md now tells agents to prepare the PR description.

Q5 · How do we handle AI contributions?

The Foundation has a policy. Our repos don't say so.

  • OpenJS adopted a Policy on Use of AI Coding Assistants on 27 March 2026. It binds every submission to a vis.gl repo: you stay responsible, only humans sign the DCO, add an Assisted-by tag.
  • deck.gl briefs agents in AGENTS.md. Its contributing guide, PR template and TSC documents tell humans nothing about it.
  • Node.js wrote it into its docs in August; MapLibre has a policy and a PR checkbox. Elsewhere: bans (Zig, Gentoo, QEMU), disclosure (curl, Linux, LLVM, Kubernetes, NumPy).
  • Already here: PR descriptions tripled; three AI-forward RFCs in one day; this talk.

Suggestion: write it down. PRs are open.

  • vis.gl developer process: the OpenJS policy, quoted, plus ten practices from Node.js, MapLibre, LLVM and the kernel: visgl/tsc #20
  • deck.gl, once the TSC adopts it: contributing section, one PR-template checkbox, AGENTS.md pointer: #10680 (draft)
  • Disclose, understand, verify; good first issues for people; no unattended agents
Q5 · How do we handle AI contributions?

But let's be real: everybody is assisted. The question is our posture.

  • Naming the tool is free advertising. Assume every PR is AI-assisted and stop caring which vendor. Care about what the author verified.
  • The flood is coming. PRs opened for social validation, and PRs from autonomous agents that fix bugs and improve performance without anyone asking. CARTO already runs agents like that on its own code. Who reviews them here, and who pays for that time?
  • Automation is not optional. A security issue in a library like this will be found by agents first. The only defence that keeps up is agent-driven too.
  • So the real design question: how do agent contributions plug into deck.gl? Verified how, tested how, budgeted how, reviewed by whom.

Disclosure is the easy part. The posture is the discussion.

For Thursday's "Future of Vis.gl"

Five asks

  1. Adopt @deck.gl/json v2 as a TSC priority, with a schema and a conversion report. CARTO helps drive it.
  2. Ship llms.txt and an official agent-skills repo this quarter.
  3. Improve our documentation and examples now, with AI.
  4. Adopt the OpenJS AI policy into the vis.gl developer process, with disclosure.
  5. Are we OK with automatic development? Who pays for it?

Ready for Thursday, each disclosed and reviewed: llms.txt #10677 · skill and AI guide #10678 · JSON v2 on the tracker · AI policy tsc #20, #10680

Agents are deck.gl's newest users and its newest developers.
They already like it. Let's make it easy for them to be right.

jatorre.github.io/deckgl-ai-ready · everything in this talk, reproducible

Backup · References

Sources

  • JSON Layers RFC (2018): github.com/visgl/deck.gl/blob/master/dev-docs/RFCs/v6.1/json-layers-rfc.md
  • @deck.gl/json v2 tracker: deck.gl-community #596 · step 1 PR #597 · AI-forward RFCs #594, #595
  • deck.gl 9.4 release notes and @deck.gl/maplibre: deck.gl/docs/whats-new
  • MapLibre agent skills: github.com/maplibre/maplibre-agent-skills · Mapbox MCP servers: docs.mapbox.com/api/guides/mcp-server
  • MCP Apps specification: github.com/modelcontextprotocol/ext-apps
  • SQLRooms deck package: sqlrooms.org/api/deck · CARTO agentic deck.gl: github.com/CartoDB/carto-agentic-deckgl
  • Open-source AI contribution policies: github.com/melissawm/open-source-ai-contribution-policies · RedMonk survey (Feb 2026)
  • Experiments, raw outputs and harnesses: github.com/jatorre/deckgl-ai-ready
Backup · Q1 detail

deck.gl on MapLibre, ten models

ModelsPackageClassAttachVerdict
Opus 4.8 · Sonnet 5 · Opus 5 · Fable 5.1 · GPT-5.2 · GPT-6 Astra · Gemini 3.1 / 3.7 / 3.8@deck.gl/mapboxMapboxOverlayaddControlcorrect for 9.3 and earlier
GPT-5.6 Sol@deck.gl/maplibreMapLibreOverlayaddControlcorrect for 9.4, three days old
Haiku 4.5@deck.gl/mapboxMapboxOverlaymap.addLayerwrong attach call
GLM 5.3@deck.gl/mapboxMaplibreOverlayclass name does not exist
GPT-4o · GPT-5-mini@deck.gl/maplibreMaplibreLayermap.addLayerpackage now exists, class and API do not
Backup · Q2 detail

GLM 5.3, the open-weight model

  • Its endpoint makes reasoning mandatory. Default: 24,000 tokens of thinking, no HTML, about 400 s per task. Only an explicit 8,000-token reasoning cap produced files, in 10 to 33 s.
  • One earlier map pinned deck.gl@8.10.1, which does not exist.
  • Choropleth: const deck = new deck.Deck(...) shadows the library global; loads Mapbox GL JS, which demands a token. Blank page.
  • Hexagons: hand-rolled TileLayer reading props.bbox instead of props.tile.bbox; hexagons on black.
  • Trips: mutates layer.props.currentTime and calls internal setState instead of recreating the layer; the animation dies on frame one.
Backup · Q5 detail

PR description length by author, quarterly medians

Median PR description length per quarter for the six most active authors

Six most active authors, anonymized, plus everyone else (80 authors). Four of six rise from a few hundred characters to about 2,000 between 2025 Q4 and 2026 Q2; two stay flat. Bots excluded.

Backup · Today's programme

Adjacent talks

  • 10:00 · Boyandin · SQLRooms (deck.gl JSON specs with dataset binding)
  • 14:15 · Krebs & Gervang · noodles.gl, a visual programming language for deck.gl
  • 14:45 · Elsinga · MLT in the deck.gl ecosystem (MapLibre)
  • 16:00 · Koschinsky & Li · Skill-based design for AI spatial analysis tools
  • Day 2 · kepler.gl update · Future of Vis.gl discussion 15:30