Skip to content

AgenticGIS v0.2.3 — Context Compaction, Parallel Tools, Prompt Size Cuts

Choose a tag to compare

@ultramenid ultramenid released this 10 Jun 11:44

AgenticGIS v0.2.3

Performance Improvements

Fix A1 — Elide stale tool results
Old tool-result payloads older than the last 2 user turns are replaced with compact stub previews (tool name, payload length, first 200 characters). This significantly reduces per-turn token cost for long sessions. Works with both OpenAI and Anthropic message formats.

Fix A2 — Background pre-compaction
After every turn completes, compaction runs in a daemon thread while the UI is idle. The next send() starts with an already-compacted history, eliminating the inline compaction latency stall. A generation counter invalidates stale in-flight results. The existing inline compaction path is untouched and remains the fallback.

Fix A3 — Parallel background-safe tools
analyze_layer, create_chart, get_layer_statistics, and gee_* tools now dispatch concurrently via ThreadPoolExecutor. Canvas-side-effect tools (add_layer, zoom_to_layer, etc.) stay single-threaded with strict ordering.

Fix A4 — Trim tool descriptions & limit result size
Tool specs reduced by ~60% (shorter descriptions, leaner input schemas). MAX_TOOL_RESULT_CHARS=30_000 caps per-payload size. New _system_arg hook enables compaction for API backends.

Prompt Architecture: Conditional GEE

The system prompt is now split into _PROMPT_CORE + _PROMPT_GEE. The GEE section is dynamically omitted when the ee_plugin is not available, saving ~4,000 tokens per request for users without Google Earth Engine installed.

Other Improvements

  • Cached GEE availability check (toolkit.gee_available)
  • Config option compaction_model for using a cheaper/faster model for compaction summaries
  • Prewarm throttled to once per 120s (was once per dock lifetime)
  • Context-window heuristics expanded (Gemini 1M, o4, o3, o1, DeepSeek, Qwen, Llama)
  • Default context window bumped from 128K to 200K

Install

Download AgenticGIS-v0.2.3.zip below and install via Plugins → Manage and Install Plugins → Install from ZIP in QGIS.