INT
Apr 26

Agent Map Artifact

Template-style GeoJSON map artifact with data-mapDelta streaming, MapLibre preview and JSON source editor, GeoJSON export, in-memory versions, and quick prompts — no database persistence.

View Full Pattern on Desktop
Agent Map Artifact preview

Problems Solved

  • Stream GeoJSON map data with custom UI data parts
  • Template-style Artifact class without a full chat backend

Use Cases

  • Location-centric demos
  • Routes and territories without a database

AI SDK APIs

streamTextcreateUIMessageStreamgatewaytool

Tags

aimapgeojsonmaplibregeostreamingai-sdkartifacts

Requirements

Node.js
24+
Memory
256MB
Other
  • Vercel AI Gateway API key
  • MapLibre / shadcn map component

Environment Variables

External Services

openaiupstash

Ready to use?

View the full interactive pattern with live preview and copy the source code.

View Pattern on Desktop
End of Pattern