Skip to content

Web UI

GeoAgent includes a Solara-based chat interface for interactive geospatial analysis with a persistent, interactive map.

Quick Start

1
2
3
4
5
# Install UI dependencies
pip install "geoagent[ui]"

# Launch the UI
geoagent ui

Or run directly:

1
solara run geoagent/ui/pages

Features

  • Persistent map — layers accumulate across queries on the same interactive MapLibre map
  • Native widget rendering — full bidirectional map interaction (zoom, pan, click)
  • Chat interface — type natural language queries with real-time status updates
  • Provider selection — switch between OpenAI, Anthropic, Google Gemini, or Ollama
  • Generated code — toggle code display for transparency

Python API

You can also launch the UI programmatically:

1
2
3
from geoagent.ui import launch_ui

launch_ui()

Module Reference

geoagent.ui.launch_ui(extra_args=None)

Launch the Solara UI for GeoAgent.

Parameters:

Name Type Description Default
extra_args Optional[List[str]]

Additional args passed to solara run.

None

Returns:

Type Description
int

Process return code.

Source code in geoagent/ui/__init__.py
def launch_ui(extra_args: Optional[List[str]] = None) -> int:
    """Launch the Solara UI for GeoAgent.

    Args:
        extra_args: Additional args passed to `solara run`.

    Returns:
        Process return code.
    """
    cmd = [sys.executable, "-m", "solara", "run", PAGES_DIR]
    if extra_args:
        cmd.extend(extra_args)
    try:
        return subprocess.call(cmd)
    except FileNotFoundError:
        raise RuntimeError(
            "Solara is not installed. Install with `pip install solara`."
        )