Skip to main content

GeoTask Core: deterministic verification for verifiable spatiotemporal AI-agent tasks

Project description

GeoTask

简体中文 | English

Verifiable spatiotemporal task protocol for AI agents.

License: MIT Python 3.10+ CI Pages Release PyPI

pip install geotask-core

GeoTask turns spatial, temporal, evidential, resource, and action constraints into explicit YAML tasks that both models and programs can read. GeoTask Core then recomputes supported claims with local deterministic operators, so a fluent model response is not mistaken for a verified result.

  • Models propose: objects, assertions, explanations, and candidate actions.
  • GeoTask Core verifies: structure, references, operator contracts, deterministic results, and assurance metadata.
  • Applications decide: whether a result can continue, must be blocked, needs evidence, or requires review.

A model-generated answer is a proposal. It becomes trustworthy only through an explicit verification path.

Start here

Why GeoTask

LLMs can misunderstand coordinates, boundaries, interval semantics, object capabilities, and resource margins. Tool calling solves individual function calls, but it does not by itself preserve task intent, object binding, evidence status, blocked outputs, or resume conditions.

GeoTask provides a task-level intermediate representation:

flowchart LR
  A[Natural-language intent] --> B[GeoTask document]
  B --> C[Parse and canonicalize]
  C --> D[Validate]
  D --> E[Deterministic execution]
  E --> F[Structured result and assurance]
  M[Model-generated proposal] --> G[Comparator]
  F --> G
  G --> H[verified / contradicted / review]

Five-minute quickstart

python -m pip install geotask-core
geotask --help
geotask inspect operators

Save this minimal task as my_distance.yaml:

geotask:
  id: "example"
  schema_version: "1.0"

objects:
  a: {type: "point", coordinates: [0, 0]}
  b: {type: "point", coordinates: [3, 4]}

operator_set: [distance_2d]

tasks:
  - id: "calc"
    assertions:
      - id: "ab"
        operator: "distance_2d"
        object_refs: ["a", "b"]

The local executor returns ab = 5.0 meter with assurance_level: local_deterministic.

geotask validate my_distance.yaml
geotask run my_distance.yaml

Public application cases

Stage Cases Main question
Geometry GT01–GT03 What spatial relationship is actually true?
Space-time composition GT04–GT06 Do horizontal, vertical, and temporal conditions all hold?
Uncertainty and evidence GT07–GT09 What happens when evidence is missing or conflicting?
Action and feasibility GT10–GT20 What executable action follows from verified spatial, resource, response, live-environment, multi-UAV conflict, city-event deduplication, equipment-capability, and high-risk action-gate constraints?

Selected examples:

  • GT07: unknown is not false when a schedule cannot be verified.
  • GT09: two individually verified no-fly notices can still conflict.
  • GT10: two robots competing for one corridor need an explicit coordination policy.
  • GT11: a target 50 meters away may require a 300-meter accessible route.
  • GT12: enough energy to arrive is not enough to complete a UAV mission safely.
  • GT13: an open road may still be impassable for a specific vehicle envelope.
  • GT14: the nearest rescue team may not have the earliest verified arrival or meet the response deadline.
  • GT15: a structurally passable map corridor may still be occupied by a live obstacle.
  • GT16: crossing routes and overlapping altitudes do not prove collision when crossing-zone occupancy times are separated.
  • GT17: ten reports of one incident should create one dispatch task while preserving all ten evidence sources.
  • GT18: the geometrically shortest route may be unsafe when it crosses a hazard beyond the rescue robot's operating capability.
  • GT19: reaching the target overhead does not authorize payload release while the live ground-clearance condition remains false.
  • GT20: a green signal does not authorize intersection entry while the downstream exit cannot store and clear the full vehicle.

See the Cookbook for all cases and source files.

Implemented public Core

Canonical object types

point, polyline, rect, time_interval, altitude_interval, and feature_collection.

feature_collection is represented in the Canonical IR; individual operators accept only combinations declared by the operator registry.

Deterministic operators

Operator Inputs Output
distance_2d point, point number
line_intersects_rect polyline, rect boolean
point_to_line_distance_2d point, polyline number
rect_contains_point rect, point boolean
time_overlap time interval, time interval boolean
altitude_overlap altitude interval, altitude interval boolean

Execution chain

parse YAML → canonicalize → validate → execute → GeotaskResult

The public Core includes YAML parsing, Canonical IR, structured diagnostics, deterministic execution, result assembly, assurance metadata, model-output normalization, local verification, Agent tool-contract discovery, mechanical preparation of generated drafts, structured revision requests, guarded revision-diff retries, offline validation of four registered Agent report Artifacts, deterministic GT08 evidence recovery, CLI commands, JSON Schema, examples, and conformance tests.

Workflow semantics in the weekly cases

The cases also demonstrate unverifiable, conflicted, blocked, evidence_request, blocked_outputs, resume_when, and next_action. These remain control and workflow semantics under extensions, not base ClaimStatus enum values. The public Core strictly validates and read-only evaluates them through geotask.control/1.0, and can recover one single-named condition by rerunning the affected deterministic assertion. The recovery trace is available as the offline-verifiable geotask.agent-evidence-recovery Artifact. Real evidence retrieval, approval, and action execution remain outside Core in a Runtime or Domain Pack.

Not included in the public Core

  • Hosted model execution or API keys
  • Production orchestration and model routing
  • Industry Domain Packs and customer rules
  • Private data connectors and approval thresholds
  • Automatic device control
  • Patent-sensitive optimization and commercial governance

See Target Specification Status and Open Core Boundary.

CLI

geotask validate <file.yaml>
geotask run <file.yaml>
geotask normalize <model-output.txt>
geotask eval <file.yaml> <model-output.txt>
geotask inspect operators
geotask agent inspect --format json
geotask agent prepare <generated.yaml> --repaired-output <prepared.yaml>
geotask agent retry <blocked-report.json> <revised.yaml> --verification-output <verification.json> --prepared-output <prepared.yaml>
geotask agent recover <task.yaml> --evidence <verified-state.yaml> --output <recovery-report.json>
geotask artifact validate geotask.agent-evidence-recovery <recovery-report.json> --format json

Version map

Artifact Current version Meaning
GeoTask Core package 0.3.0 Python implementation version
GeoTask document schema 1.0 YAML/JSON document format
Language specification 1.0 Implemented public normative profile
Agent Integration Profile 0.1 Model-neutral tool contract, evidence recovery, and recovery-report Artifact
White paper 0.1 Public conceptual draft

Documentation

Contributing

Read CONTRIBUTING.md or 中文贡献指南. Bug reports, operator proposals, documentation improvements, and new application-case ideas are welcome.

Use an editable source install only when contributing to development:

git clone https://github.com/stpku/GeoTask.git
cd GeoTask
python -m pip install -e ".[dev]"
pytest

License and boundary

GeoTask Core is released under the MIT License. Public code, specifications, and examples are separate from private Runtime, Domain Packs, customer data, and patent-sensitive implementation details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

geotask_core-0.3.0.tar.gz (140.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geotask_core-0.3.0-py3-none-any.whl (151.8 kB view details)

Uploaded Python 3

File details

Details for the file geotask_core-0.3.0.tar.gz.

File metadata

  • Download URL: geotask_core-0.3.0.tar.gz
  • Upload date:
  • Size: 140.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for geotask_core-0.3.0.tar.gz
Algorithm Hash digest
SHA256 37a78758937cd563f2360c50e51244a5e2ed71f349c125f535e385d06200cc25
MD5 bab8c76b222c291515f5fe7ab419f20c
BLAKE2b-256 d8156d3c3d51bfa1442f6c60c24dae57d916ecb136f3465d1bc25d32818001a0

See more details on using hashes here.

Provenance

The following attestation bundles were made for geotask_core-0.3.0.tar.gz:

Publisher: publish-pypi.yml on stpku/GeoTask

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file geotask_core-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: geotask_core-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 151.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for geotask_core-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 357deb11decc41aa6646f6bba61584b3af18859b995e401437b3d38903c679aa
MD5 ea2fffec8708c030f5fe971196b6c248
BLAKE2b-256 5f06966eab735931a654d44b6c61c43663acb2dc5996c9ea2dddbb1e6db9d015

See more details on using hashes here.

Provenance

The following attestation bundles were made for geotask_core-0.3.0-py3-none-any.whl:

Publisher: publish-pypi.yml on stpku/GeoTask

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page