Golem — 面向地理空间行业的自演化 GeoAI 代理 — 自然语言 GDAL/PostGIS 工作流、学习的工作流重用、人工工具框架
Golem — 面向地理空间行业的自演化 GeoAI 代理 — 自然语言 GDAL/PostGIS 工作流、学习的工作流重用、人工工具框架
Golem is a vertical AI Agent for the geospatial industry, built with Go and Eino. It bridges the gap between natural-language interaction and professional GIS workflows — turning complex GDAL/PostGIS operations into conversational requests accessible from a WebUI, terminal TUI, or any IM channel.
Unlike generic chatbot wrappers, Golem ships with a real agent loop (tool calling up to 20 iterations), workspace-local GDAL/PostGIS tooling, learned pipeline reuse, fabricated tool scaffolding, and skill telemetry loops — all governed by a built-in approval and audit framework.
Golem (גולם): In Jewish folklore, a golem is an animated being made from inanimate matter, created to serve.
The geospatial industry suffers from fragmented tooling, steep learning curves, and repetitive workflows. Existing GeoAI solutions are either locked inside desktop GIS platforms (QGIS/ArcGIS plugins), limited to Jupyter notebooks, or lack autonomous execution capabilities.
Golem solves this with a unique combination:
| Pain Point | How Golem Addresses It |
|---|---|
| GDAL commands are hard to memorize | Natural-language → GDAL command orchestration |
| PostGIS spatial SQL is error-prone | Verified Spatial SQL Codebook with pattern matching |
| CRS confusion is a daily nightmare | Auto-detection, smart projection selection, common-mistake warnings |
| Analysis workflows are repeated manually | Learned pipeline reuse with parameter-aware replay |
| Missing tools require custom scripting | Fabricated tool scaffolding — Agent generates new Geo tools at runtime |
| GIS tools are inaccessible to non-experts | Three access modes: WebUI / TUI / IM channels (Telegram, Slack, etc.) |
| Tool execution risks on production data | Built-in approval gate, policy enforcement, and audit trail |
…When tools.geo.enabled=true, Golem registers a full workspace-local Geo execution surface:
| Tool | Description |
|---|---|
geo_info |
Inspect spatial datasets — format, extent, layer count, feature count |
geo_process |
GDAL/OGR processing — clip, merge, reproject, rasterize, etc. |
geo_crs_detect |
Auto-detect CRS from coordinate range, metadata, or EPSG inference |
geo_format_convert |
Convert between Shapefile, GeoJSON, GeoPackage, GeoTIFF, etc. |
geo_data_catalog |
Discover datasets in workspace or remote catalogs |
geo_sql_codebook |
Query verified spatial SQL patterns with parameter substitution |
geo_spatial_query |
Execute PostGIS spatial SQL (when postgis_dsn is configured) |
Workspace conventions:
geo-codebook/ — reusable spatial SQL patternstools/geo/ — fabricated workspace Geo tools and dry-run scaffoldspipelines/geo/ — learned Geo tool sequencesNo existing GeoAI competitor offers all three of these capabilities simultaneously:
Learned Pipeline Reuse — When a Geo tool sequence succeeds, it is saved as a replay-ready pipeline under pipelines/geo/. On similar future requests, the Agent injects the learned sequence as a parameter-aware reuse candidate, reducing execution time and improving reliability.
Fabricated Tool Scaffolding — When the Agent encounters a spatial task with no matching tool, it generates a dry-run manifest/script bundle under tools/geo/. The scaffold passes validator checks and can be filled in by a human or by the Agent itself, then registered as a first-class Geo tool.
Skill Telemetry — Every Geo skill tracks shown, selected, success, and failure counters. A deterministic report view surfaces underperforming skills first, giving the Agent a local, explainable signal for continuous improvement.
Golem treats security as a first-class concern, not an afterthought:
| Capability | Description |
|---|---|
| Policy modes | strict / relaxed / off — control which tools require approval before execution |
| Approval gate | Sensitive tools (e.g. exec, geo_spatial_query) require explicit human approval in strict mode |
| Temporary bypass | off_ttl allows time-limited policy relaxation that auto-reverts |
| Audit trail | All tool executions are logged to state/audit.jsonl with full request context |
| Approval state | Pending/approved/rejected requests tracked in state/approvals.json |
| CLI management | golem approval list/approve/reject for out-of-band approval workflows |
| Workspace restriction | Geo file operations and shell commands can be confined to workspace boundaries |
| PostGIS readonly | Spatial queries default to read-only transactions when supported |
This makes Golem suitable for production environments where spatial data involves privacy, commercial secrets, or regulatory requirements.
Golem can be accessed through three modes, making professional GIS capabilities available to both technical and non-technical users:
…golem run) — Landing page at /, chat console at /console. No install required for end users; share a URL and they can start spatial analysis immediately.golem chat) — Full-featured terminal interface for GIS professionals who prefer command-line workflows.golem run) — Connect Telegram, Discord, Slack, Feishu, WhatsApp, QQ, DingTalk, or MaixCam. Urban planners, field workers, and non-technical stakeholders can request spatial analysis from the apps they already use.| Tool | Description |
|---|---|
exec |
Run shell commands (workspace restriction supported) |
read_file / write_file / edit_file / append_file |
File read/write/edit/append in workspace |
list_dir |
List directory contents |
read_memory / write_memory |
Persistent memory access |
append_diary |
Append daily notes |
web_search |
Web search (Brave when API key exists; fallback available) |
web_fetch |
Fetch and extract web page content |
geo_* |
Geospatial toolset — GDAL/PostGIS workflows, CRS, format conversion, spatial SQL |
manage_cron |
Manage scheduled jobs |
message |
Send messages to channels |
spawn / subagent / workflow |
Delegate tasks to subagents and orchestrated workflows |
| Component | Path | Description |
|---|---|---|
| Agent Loop | internal/agent/ |
Main processing loop with tool calling, max 20 iterations |
| Message Bus | internal/bus/ |
Event-driven message routing via Go channels |
| Channel System | internal/channel/ |
Multi-platform integrations (Telegram, Discord, Slack, etc.) |
| Provider | internal/provider/ |
Unified LLM interface via Eino's OpenAI wrapper |
| Session | internal/session/ |
Persistent JSONL-based conversation history |
| Tools | internal/tools/ |
Built-in tools: file, shell, memory, web, cron, geo, message, subagent, workflow |
| Memory | internal/memory/ |
Long-term memory and daily diary system |
| Skills | internal/skills/ |
Extensible Markdown-based prompt packs |
| Cron | internal/cron/ |
Scheduled job management |
| Heartbeat | internal/heartbeat/ |
Periodic health probe and status reporting |
| Gateway | internal/gateway/ |
HTTP API server plus embedded WebUI |
…Golem supports delegating tasks to subagents for parallel processing:
spawn: Asynchronous subagent, returns task ID immediately, notifies via message bussubagent: Synchronous subagent, blocks until completion, returns result directlyworkflow: Built-in workflow orchestration (decompose task, run sequential/parallel subtasks, aggregate results)Two-tier memory architecture:
MEMORY.md file for persistent knowledgeYYYY-MM-DD.md files for timestamped journal entriesOpenRouter, Claude, OpenAI, DeepSeek, Gemini, Ark, Qianfan, Qwen, Ollama.
Download Windows/Linux binaries from Releases.
go install github.com/MEKXH/golem/cmd/golem@latestgolem initThis creates ~/.golem/config.json and workspace directories.
cp config/config.example.json ~/.golem/config.jsonPowerShell:
Copy-Item config/config.example.json "$HOME/.golem/config.json"Then edit ~/.golem/config.json and set at least one provider key (for example `providers.openai
暂无开放 Issues,或尚未同步最近议题。