LogoLogo
HomeDocumentationLoginTry for free
  • CARTO Academy
  • Working with geospatial data
    • Geospatial data: the basics
      • What is location data?
      • Types of location data
      • Changing between types of geographical support
    • Optimizing your data for spatial analysis
    • Introduction to Spatial Indexes
      • Spatial Index support in CARTO
      • Create or enrich an index
      • Work with unique Spatial Index properties
      • Scaling common geoprocessing tasks with Spatial Indexes
      • Using Spatial Indexes for analysis
        • Calculating traffic accident rates
        • Which cell phone towers serve the most people?
    • The modern geospatial analysis stack
      • Spatial data management and analytics with CARTO QGIS Plugin
      • Using data from a REST API for real-time updates
  • Building interactive maps
    • Introduction to CARTO Builder
    • Data sources & map layers
    • Widgets & SQL Parameters
    • AI Agents
    • Data visualization
      • Build a dashboard with styled point locations
      • Style qualitative data using hex color codes
      • Create an animated visualization with time series
      • Visualize administrative regions by defined zoom levels
      • Build a dashboard to understand historic weather events
      • Customize your visualization with tailored-made basemaps
      • Visualize static geometries with attributes varying over time
      • Mapping the precipitation impact of Hurricane Milton with raster data
    • Data analysis
      • Filtering multiple data sources simultaneously with SQL Parameters
      • Generate a dynamic index based on user-defined weighted variables
      • Create a dashboard with user-defined analysis using SQL Parameters
      • Analyzing multiple drive-time catchment areas dynamically
      • Extract insights from your maps with AI Agents
    • Sharing and collaborating
      • Dynamically control your maps using URL parameters
      • Embedding maps in BI platforms
    • Solving geospatial use-cases
      • Build a store performance monitoring dashboard for retail stores in the USA
      • Analyzing Airbnb ratings in Los Angeles
      • Assessing the damages of La Palma Volcano
    • CARTO Map Gallery
  • Creating workflows
    • Introduction to CARTO Workflows
    • Step-by-step tutorials
      • Creating a composite score for fire risk
      • Spatial Scoring: Measuring merchant attractiveness and performance
      • Using crime data & spatial analysis to assess home insurance risk
      • Identify the best billboards and stores for a multi-channel product launch campaign
      • Estimate the population covered by LTE cells
      • A no-code approach to optimizing OOH advertising locations
      • Optimizing site selection for EV charging stations
      • How to optimize location planning for wind turbines
      • Calculate population living around top retail locations
      • Identifying customers potentially affected by an active fire in California
      • Finding stores in areas with weather risks
      • How to run scalable routing analysis the easy way
      • Geomarketing techniques for targeting sportswear consumers
      • How to use GenAI to optimize your spatial analysis
      • Analyzing origin and destination patterns
      • Understanding accident hotspots
      • Real-Time Flood Claims Analysis
      • Train a classification model to estimate customer churn
      • Space-time anomaly detection for real-time portfolio management
      • Identify buildings in areas with a deficit of cell network antennas
    • Workflow templates
      • Data Preparation
      • Data Enrichment
      • Spatial Indexes
      • Spatial Analysis
      • Generating new spatial data
      • Statistics
      • Retail and CPG
      • Telco
      • Insurance
      • Out Of Home Advertising
      • BigQuery ML
      • Snowflake ML
  • Advanced spatial analytics
    • Introduction to the Analytics Toolbox
    • Spatial Analytics for BigQuery
      • Step-by-step tutorials
        • How to create a composite score with your spatial data
        • Space-time hotspot analysis: Identifying traffic accident hotspots
        • Spacetime hotspot classification: Understanding collision patterns
        • Time series clustering: Identifying areas with similar traffic accident patterns
        • Detecting space-time anomalous regions to improve real estate portfolio management (quick start)
        • Detecting space-time anomalous regions to improve real estate portfolio management
        • Computing the spatial autocorrelation of POIs locations in Berlin
        • Identifying amenity hotspots in Stockholm
        • Applying GWR to understand Airbnb listings prices
        • Analyzing signal coverage with line-of-sight calculation and path loss estimation
        • Generating trade areas based on drive/walk-time isolines
        • Geocoding your address data
        • Find similar locations based on their trade areas
        • Calculating market penetration in CPG with merchant universe matching
        • Measuring merchant attractiveness and performance in CPG with spatial scores
        • Segmenting CPG merchants using trade areas characteristics
        • Store cannibalization: quantifying the effect of opening new stores on your existing network
        • Find Twin Areas of top-performing stores
        • Opening a new Pizza Hut location in Honolulu
        • An H3 grid of Starbucks locations and simple cannibalization analysis
        • Data enrichment using the Data Observatory
        • New police stations based on Chicago crime location clusters
        • Interpolating elevation along a road using kriging
        • Analyzing weather stations coverage using a Voronoi diagram
        • A NYC subway connection graph using Delaunay triangulation
        • Computing US airport connections and route interpolations
        • Identifying earthquake-prone areas in the state of California
        • Bikeshare stations within a San Francisco buffer
        • Census areas in the UK within tiles of multiple resolutions
        • Creating simple tilesets
        • Creating spatial index tilesets
        • Creating aggregation tilesets
        • Using raster and vector data to calculate total rooftop PV potential in the US
        • Using the routing module
      • About Analytics Toolbox regions
    • Spatial Analytics for Snowflake
      • Step-by-step tutorials
        • How to create a composite score with your spatial data
        • Space-time hotspot analysis: Identifying traffic accident hotspots
        • Computing the spatial autocorrelation of POIs locations in Berlin
        • Identifying amenity hotspots in Stockholm
        • Applying GWR to understand Airbnb listings prices
        • Opening a new Pizza Hut location in Honolulu
        • Generating trade areas based on drive/walk-time isolines
        • Geocoding your address data
        • Creating spatial index tilesets
        • A Quadkey grid of stores locations and simple cannibalization analysis
        • Minkowski distance to perform cannibalization analysis
        • Computing US airport connections and route interpolations
        • New supplier offices based on store locations clusters
        • Analyzing store location coverage using a Voronoi diagram
        • Enrichment of catchment areas for store characterization
        • Data enrichment using the Data Observatory
    • Spatial Analytics for Redshift
      • Step-by-step tutorials
        • Generating trade areas based on drive/walk-time isolines
        • Geocoding your address data
        • Creating spatial index tilesets
Powered by GitBook
On this page
  • Enable AI Agents in your organization
  • Create a map using PLUTO data in Builder
  • Set up an AI Agent in Builder
  • Accessing AI Agent as end-user

Was this helpful?

Export as PDF
  1. Building interactive maps
  2. Data analysis

Extract insights from your maps with AI Agents

Last updated 3 months ago

Was this helpful?

This feature is currently in Public Preview for SaaS organizations. We're already working of our next version of faster, smarter and more powerful AI Agents for maps. Stay tuned!

With CARTO Builder, you can effortlessly create AI Agents that empower end-users to explore and extract valuable insights from your maps. In this tutorial, you’ll learn how to enable AI Agents in your CARTO platform, configure them using best practices, and interact with them effectively. We’ll also provide example prompts and highlight the current capabilities of AI Agents to help you get the most out of this feature.

Steps:

  • Enable AI Agents in your organization

  • Create a map using PLUTO data in Builder

  • Set up an AI Agent in Builder

  • Accessing AI Agents as end-user


Enable AI Agents in your organization

To enable AI Agents in your organization you must be an Admin user.

  1. Login to your CARTO organization and navigate to Settings > Customizations section and choose AI Agents tab.

  2. Use the toggle button to enable AI Agents in your CARTO platfrom. Once enabled, Editor users in your organization can add an AI Agent to any Builder map.


Create a map using PLUTO data in Builder

In this section, we will create a Builder map showcasing the PLUTO dataset for Manhattan and demonstrate how to create an AI Agent that allows end-users to extract information effortlessly. This AI Agent will enable users to explore land use, zoning details, building attributes, and other key insights from the map.

  1. Access the Maps section from your CARTO Workspace using the navigation menu and create a new map using the button at the top right of the page. This will open the Builder in a new tab.

  1. Name your Builder map "Exploring Manhattan buildings" and using Add Source button navigate to CARTO Data Warehouse > carto-demo-data > demo_tables and add manhattan_pluto_data table.

  1. Rename your layer "Buildings" and style the Fill Color using yearbuilt property using sunset palette. Set the Stroke Color to dark purple and the Stroke Weight fixed to 0,5 pixels.

  1. First, add a Formula Widget to display the total number of buildings in the entire dataset. To do so, navigate to the Widgets tab, select Formula Widget, and set the configuration as follows:

    • Operation: COUNT

    • Behaviour: Global

  2. Add another Formula Widget, this time to display the total number of buildings in the map extent (known as viewport) and set the configuration as follows:

    • Operation: COUNT

    • Behaviour: Filter by viewport

  3. To display the distribution of buildings' number of floors, add a Histogram Widget and set the configuration as follows:

    • Column: numfloors

    • Behaviour: Global

  4. Add another Histogram Widget to display the distribution of buildings' total units in the viewport. Set the configuration as follows:

    • Column: yearbuilt

    • Behaviour: Global

  5. Finally, add a Category Widget to display the buildings grouped by land use type and configure this widget as follows:

    • Column: landuse

    • Behaviour: Global


Set up an AI Agent in Builder

Learn how to configure an AI Agent in Builder to enhance your map’s interactivity. By linking it to your map, you enable end-users to ask questions, extract insights, and explore data effortlessly.

  1. First, enable the AI Agent by toggling the switch located at the top of the AI panel.

  1. Provide the AI Agent with additional context of the map using the Map Context section.

Using Map Context section, you have the flexibility to provide additional instructions to enhance the AI Agent's responses. While the AI Agent already has access to your map's configuration—such as layer styling, widget settings, and other components—it uses this information to deliver relevant answers to end-users.

This section is optional, but adding custom instructions allows you to tailor the AI Agent’s behavior to align more closely with your specific use case. These inputs will help the AI Agent offer more precise, insightful interactions when engaging with end-users.

For this example, we will include the following:

  • Styling guidelines to ensure a consistent and visually coherent map presentation.

  • A detailed description of the Land Use classification, based on the NYC Department of City Planning, as this information is not directly included in the dataset.

You can use the sample text provided below or customize it to suit your specific requirements, ensuring the AI Agent meets the unique needs of your map.

This map allows end-users to explore the PLUTO dataset for Manhattan and understand the distribution of buildings across the borough.

The Land Use in the dataset is specified by numerical codes. Use the following descriptions to provide answers and interact with the map effectively:

01 - One & Two Family Buildings
02 - Multi-Family Walk-Up Buildings
03 - Multi-Family Elevator Buildings
04 - Mixed Residential & Commercial Buildings
05 - Commercial & Office Buildings
06 - Industrial Buildings
07 - Transportation & Utility
08 - Public Facilities & Institutions
09 - Open Space & Outdoor Recreation
10 - Parking Facilities
11 - Vacant Land
  1. The Conversation Starters provide end-users with common prompts that the AI Agent can respond to, making interactions more intuitive and engaging. In our case, we will include the following four questions as conversation starters:

    • What is this map?

    • Show open spaces on the map.

    • Highlight residential areas in Manhattan.

    • Display all commercial buildings in Times Square.

  2. Finally, you have the option to include a User Guide to customize the explanation displayed when the Agent greets your end-users. In our case, we'll add the following explanation:

This agent can help you explore and analyze the map using the PLUTO dataset for Manhattan.
  1. Before publishing the map, we'll define Map settings for viewers, enabling the following functionalities:

    • Feature selection tool

    • Export viewport data

    • Search location bar

    • Measure tool

    • Scroll wheel zoom (enabled by default)

    • Basemap selector

  1. To publish the map, click on the Share button and share the map with your organization.


Accessing AI Agent as end-user

AI Agents are not yet supported in Public maps.

  1. To access the AI Agent, copy the map link from the Share window or the Copy link option in the Share quick actions and open it in a new tab. Ensure the link contains /viewer/ to confirm you’re accessing the map in the correct mode.

  1. Once the map loads, the AI Agent will appear at the bottom center of your screen. Click on it to initiate a conversation. The Agent will greet users by displaying the user guide and conversational starter prompts, making it easy to start exploring the map.

In addition to providing text-based answers, the AI Agent has access to several capabilities for interacting with the map and helping users extract insights:

  • Search and zoom to specific locations.

  • Extract insights from widgets.

  • Filter data through widget interactions.

  • Switch layers on and off.

  • Retrieve the latitude and longitude of current map position.

In the example below, adding the prompt “Display all commercial buildings near Times Square older than 1920” from the interface will instruct the AI Agent to:

  1. Search for and zoom to Times Square.

  2. Filter the map’s buildings to the commercial type, using the land use descriptions provided in the map context and applying the Category widget.

  3. Filter the map’s buildings to those older than 1920, using the available slots in the Histogram widget.

This showcases how the AI Agent dynamically combines map context and widget functionality to provide targeted insights and interactions.

Note: AI Agent responses are generated in real time and may vary slightly depending on the context.

And that's it! You've successfully set up your map with an AI Agent, enabling powerful insights and seamless exploration for your end-users. With AI capabilities integrated into the CARTO platform, you can empower users to extract meaningful information effortlessly.

Stay tuned for upcoming iterations and enhancements to this feature—we're excited to bring even more possibilities to your mapping experience!

Now, we will add to empower users and the AI Agent to dynamically extract insights from your source. They also serve to filter data based on the map viewport and interconnected widgets.

Your map should look similar to the example below. When configuring , make sure to set up the appropriate formatting to enhance readability and add notes or descriptions to provide context for end-users. This will help users and the AI Agent extract valuable insights and interact with the map effortlessly.

For more information on the AI Agent's capabilities, please refer to .

Widgets
widgets
this section of the documentation