On this page

    Agents and AI on MapTiler

    AI coding assistants, such as Claude Code, Cursor, GitHub Copilot, and ChatGPT, transform geospatial application development. They generate boilerplate code, configure map styles, and integrate complex APIs.

    This guide explains how to connect AI agents to MapTiler resources. You will learn how to use machine-readable documentation endpoints (llms.txt and llms-full.txt), integrate MapTiler Agent Skills, and execute effective prompts for geospatial tasks.

    How to use MapTiler with AI

    AI models often generate outdated or incorrect map code when relying solely on training data. They may use deprecated methods or construct inaccurate tile URLs. MapTiler provides optimized entry points designed specifically for Large Language Models (LLMs) and autonomous agents to resolve this challenge:

    • Machine-Readable Docs (llms.txt and llms-full.txt): condensed, structured documentation designed for quick LLM context ingestion.
    • MapTiler Agent Skills: reusable instructions and workflows that allow AI assistants to generate accurate geospatial integrations across web, mobile, and backend platforms.

    Integrating these resources into your development workflow helps your AI assistant produce production-ready code that follows modern MapTiler best practices.

    Warning

    Never paste raw MapTiler API keys directly into AI chat interfaces or commit them to public repositories. Store your keys in environment variables (for example, MAPTILER_API_KEY) and instruct the assistant to reference the variable name instead.

    Machine-Readable docs: llms.txt and llms-full.txt

    MapTiler serves lightweight, structured context files at the root of its documentation domain. These files follow the open llms.txt standard, making them ideal for context retrieval.

    Available endpoints

    Endpoint Size / Scope Recommended use case
    https://docs.maptiler.com/llms.txt Light High-level index, standard style URLs, and quick start references.
    https://docs.maptiler.com/llms-full.txt Comprehensive Full API specification, complex vector tile schemas, and deep SDK method signatures.

    How to use llms.txt with AI assistants

    When starting a prompt session, instruct your AI assistant to fetch and read the contents of llms.txt before it generates any code.

    Example prompting with llms.txt

    
    Before writing any code, retrieve and read the full contents of https://docs.maptiler.com/llms.txt using your web browsing tool. 
    
    Do not rely on prior knowledge or guess API parameter names. 
    
    Task: Create an HTML page that displays a MapTiler street vector map using MapTiler SDK JS. Center the view on Barcelona, Spain, at zoom level 12. Use process.env.MAPTILER_API_KEY for authorization.
    

    Agent skills

    MapTiler Agent Skills are specialized capabilities that you can integrate into AI agents. They enable tasks such as building and optimizing map applications across web, mobile, and backend environments, and integrating search, geocoding, and performance patterns.

    It gives AI coding agents the context to generate correct, production-ready code using MapTiler APIs, the MapTiler SDK, MapTiler GeoSplats SDK, mobile SDKs, and on-premise tools.

    Built on the Agent Skills open standard, so the same skill works across Claude Code, Gemini CLI, Cursor, Windsurf, and other compatible AI agents.

    For complete setup instructions and repository details, review the MapTiler Skills Installation Guide.

    Best practices and common pitfalls

    Best practices

    Token scoping

    Create dedicated, domain-restricted API keys in the MapTiler console for client-side deployments. Keep administration-level or billing-sensitive token isolated in server-side environment variables. Never paste raw MapTiler API keys directly into AI chat interfaces or commit them to public repositories.

    Exact product name

    To obtain accurate results, construct your prompts by specifying the exact product name @maptiler/sdk, MapTiler Geocoding API, or MapTiler Swift SDK.

    Target platform

    Always include the target platform and language in your prompt to avoid receiving code for the wrong SDK or environment.

    Verify generated code against the official docs

    AI models rely on historical training data that may contain deprecated API parameters, outdated SDK methods, or removed features. Always verify generated code against the official MapTiler documentation to ensure accuracy and compatibility.

    Common pitfall

    Outdated SDK versions

    AI models frequently mix syntax from Mapbox GL JS, MapLibre GL JS and MapTiler SDK JS. Always specify @maptiler/sdk or MapTiler SDK JS version in your prompts to prevent version mismatch errors.

    Outdated style versions

    AI models often use older (e.g., streets-v2) or deprecated style versions because that’s the data they were trained on. Always specify the style version you want to use (e.g., streets-v4, outdoor-v4) in your requests to avoid version incompatibility errors.

    Was this helpful?
    AI guides
    Agents and AI on MapTiler
    Agents and AI on MapTiler