Skip to main content
Glama
README.md
<div align="center">

<picture>
  <source media="(prefers-color-scheme: dark)" srcset="docs/assets/helios-logo-dark.svg">
  <source media="(prefers-color-scheme: light)" srcset="docs/assets/helios-logo-light.svg">
  <img alt="Helios Collective" src="docs/assets/helios-logo-light.svg" width="560">
</picture>

<p>
  <a href="https://github.com/rasidi3112/helios/actions/workflows/tests.yml"><img alt="tests" src="https://github.com/rasidi3112/helios/actions/workflows/tests.yml/badge.svg?branch=main"></a>
  <a href="LICENSE"><img alt="License: Apache-2.0" src="https://img.shields.io/badge/license-Apache--2.0-blue.svg"></a>
  <a href="pyproject.toml"><img alt="Python 3.12+" src="https://img.shields.io/badge/python-3.12%2B-3776AB.svg?logo=python&amp;logoColor=white"></a>
  <a href="https://modelcontextprotocol.io/specification"><img alt="MCP 2026-07-28" src="https://img.shields.io/badge/MCP-2026--07--28-FB8500.svg"></a>
  <a href="https://docs.astral.sh/uv/"><img alt="Built with uv" src="https://img.shields.io/badge/built%20with-uv-DE5FE9.svg"></a>
</p>

</div>

# Helios Collective

An MCP-based platform for auditable, localized, cross-domain knowledge synthesis.

Ask a question about a place, for example "When is the rainy season in Khon Kaen?". Helios plans research questions, calls MCP tool servers through a gateway, and records every finding as a cited claim in a versioned world model. Every step lands in a hash-chained provenance ledger, so any answer can be audited back to the tool results it rests on.

```mermaid
flowchart TD
    Q(["Question"]) --> O["Orchestrator<br/>planner · inquiry"]
    O <-->|tool calls| G["MCP gateway<br/>grants · pinning · budgets"]
    G <--> S["MCP servers<br/>geo · climate · scholarly"]
    O -->|cited claims| W[("World model<br/>versioned · helios://")]
    W --> V["Citation verifier"]
    V --> D["Debate<br/>proponent · critic"]
    D -->|"verdicts, refined claims"| W
    W --> L["Localization<br/>en · th-TH"]
    L --> B(["Brief"])
    O & G & W & V & D & L -.-> P[("Provenance ledger<br/>hash-chained")]
```

<p align="center">
  <img alt="Terminal recording of the three make demo targets: a place lookup, an inquiry with debate, and a Thai brief" src="docs/assets/helios-demo.gif" width="820">
  <br>
  <sub>The three <code>make demo</code> targets, run offline: a place lookup, an inquiry with debate and refinement, and the same kind of inquiry with a Thai brief.</sub>
</p>

## Features

- **Provenance by default.** Every model call, tool call, resource read, commit and deliverable is a hash-chained event. Payloads are content-addressed, and `helios_prov verify` checks a whole run.
- **MCP gateway.** It handles server discovery, descriptor pinning, signed per-run grants, JSON-Schema validation and budget accounting, over stdio, Streamable HTTP or in-process.
- **Tool servers:**
  - **geo:** place resolution and bounding boxes over a fixture gazetteer;
  - **climate:** NASA POWER monthly climatology and rainfall seasonality;
  - **scholarly:** OpenAlex work search and lookup, with the actual cost of each call reported.
- **Versioned world model.** Claims and evidence live in event-sourced worlds with branches and commits, are served as `helios://` MCP resources, and are checked by `helios_world verify`.
- **Citation verifier.** It checks every number, month, quote, DOI and area id in a claim against the stored source. A model can optionally give a second opinion.
- **Debate.** A template proponent and critic argue over the claims that matter, and every argument is citation-checked. Each claim comes out `accepted`, `contested` or `needs_review`. A contested claim can be refined into a new version that states the conditions it was missing.
- **Localization.** Briefs can also be written in Thai (`th-TH`), generated from the same claims. Rai and Buddhist Era equivalents are shown alongside the original values, and every sentence is checked against its English source.

## Quick start

You need [uv](https://docs.astral.sh/uv/) and Python 3.12 or later.

```bash
uv sync
```

```bash
uv run pytest
```

These commands run offline, using recorded NASA POWER and OpenAlex responses:

```bash
uv run python -m helios_orchestrator "Khon Kaen"
```

```bash
uv run python -m helios_orchestrator inquiry "Compare the rainy seasons in Khon Kaen and Vientiane." --debate --climate-fixtures servers/climate/tests/fixtures --scholarly-fixtures servers/scholarly/tests/fixtures
```

```bash
uv run python -m helios_orchestrator inquiry "When is the rainy season in Khon Kaen?" --debate --locale th-TH --audience farmer --climate-fixtures servers/climate/tests/fixtures --scholarly-fixtures servers/scholarly/tests/fixtures
```

They are, in order:
1. a place lookup;
2. an inquiry with debate and refinement;
3. the same with a Thai brief.

`make demo` runs all three. Runs are stored in `.helios/`, which is git-ignored.

## Usage

### Place lookup

```bash
uv run python -m helios_orchestrator "Khon Kaen"
```

The output shows the resolved admin area and its bounding box, the MCP server and protocol used, tool and model cost, and whether the provenance chain verified. Names in other scripts work too, e.g. `"ขอนแก่น"`, `"Hà Nội"`, `"Vientiane, Laos"`.

### Inquiries

```bash
uv run python -m helios_orchestrator inquiry "When is the rainy season in Khon Kaen?"
```

Helios then:
1. finds the places in the question and forks a run branch of the `helios-demo` world;
2. plans research questions and calls the geo, climate and scholarly servers;
3. commits each finding as cited claims;
4. checks every citation;
5. prints a brief in which every claim carries its id and verdict.

| Option | Effect |
|---|---|
| `--place "Can Tho"` | Study an explicit place (repeatable, up to 3) |
| `--deliverable context_brief --deliverable claims_table` | Produce the brief, the claims table, or both |
| `--climate-fixtures DIR`, `--scholarly-fixtures DIR` | Use recorded responses instead of the live APIs |
| `--no-scholarly` | Skip the literature server; literature questions are recorded as not covered |
| `--model claude-opus-5-5` | Have a model write the brief, accepted only if every claim id it cites exists |
| `--verify-with-model` | Ask the model for a second opinion on claims the citation rules can't fully verify |
| `--json` | Machine-readable output |

Questions about research or adaptation also search the literature, for example "What does research say about drought adaptation by rice farmers in Khon Kaen?".

### Debate

Add `--debate` after the question to debate the claims that answer it, or `--debate all` to debate every claim.
- **Verdicts:** the brief lists each claim's verdict and every open challenge.
- **Refinement:** contested claims are refined and debated again; `--no-refine` turns this off.
- **Thresholds:** they live in one configuration (`packages/helios-debate/debate-config.example.toml`). Override them with `--debate-config FILE`.
- **Model arguments:** `--debate-with-model` (with `--model`) adds the model's own arguments, which are citation-checked before they count.

### Localization

Add `--locale th-TH` for a Thai brief; `--audience farmer` also shows rainfall as water per rai.
- **What's checked:** every Thai sentence is checked against its English source for numbers, ids, quotes, months, units, hedges and negations. A sentence that fails keeps its English text.
- **What's untouched:** the claims and the English brief stay exactly as they are.
- **Model translation:** `--localize-with-model` lets the model translate sentences no template covers, and those are checked too.

Locale assets live in [locales/](locales/README.md).

### Auditing a run

Every run prints the commands to audit it:

```bash
uv run python -m helios_prov verify <run_id>
```

```bash
uv run python -m helios_prov show <run_id> --type debate.
```

```bash
uv run python -m helios_world verify helios-demo --ref runs/<run_id>
```

```bash
uv run python -m helios_world show helios-demo --ref runs/<run_id> --debates
```

## Configuration

| Variable | Purpose |
|---|---|
| `HELIOS_DATABASE_URL` | Ledger and world store: `sqlite:///path`, `postgresql://…` or `memory://` (default `sqlite:///.helios/ledger.sqlite`) |
| `HELIOS_PAYLOAD_DIR` | Payload store directory (default `.helios/payloads`) |
| `ANTHROPIC_API_KEY` | Needed only for `--model claude-…` |
| `OPENALEX_API_KEY` | Optional: your own OpenAlex allowance. Without a key, searches share a small daily allowance. |
| `HELIOS_GRANT_SECRET` | Key for signing tool grants (default: random per process) |

## Docker Compose

This starts PostgreSQL and the geo, climate and scholarly servers over HTTP, then runs the demos:

```bash
docker compose -f deploy/compose/docker-compose.yml up --build
```

```bash
docker compose -f deploy/compose/docker-compose.yml run --rm inquiry "Compare the rainy seasons in Khon Kaen and Vientiane" --debate
```

```bash
docker compose -f deploy/compose/docker-compose.yml --profile test run --rm tests
```

Optional settings go in `deploy/compose/.env` (copy `.env.example`).

## Development

```bash
make sync
```

```bash
make test
```

```bash
make lint
```

```bash
make demo
```

The repository is a uv workspace: `packages/*` and `servers/*` are its members, and `uv.lock` pins every dependency.

| Path | What it is |
|---|---|
| `packages/helios-core` | IDs, RFC 8785 canonical JSON, hashes, the MCP 2026-07-28 protocol layer and server |
| `packages/helios-prov` | Provenance ledger, payload store, audit CLI |
| `packages/helios-models` | Model router (Claude, OpenAI-compatible) and budget ledger |
| `packages/helios-gateway` | MCP gateway |
| `packages/helios-world` | World model, `helios://` resources, audit CLI |
| `packages/helios-verifier` | Citation verifier |
| `packages/helios-debate` | Debate engine |
| `packages/helios-l10n` | Localization engine |
| `packages/helios-orchestrator` | Place lookup, research planner, inquiry path, CLI |
| `servers/geo`, `servers/climate`, `servers/scholarly` | First-party MCP servers |
| `locales/` | Locale profiles and assets |
| `deploy/compose` | Dockerfile and Compose stack |

## Documentation

- **[DESIGN.md](DESIGN.md):** the full architecture.
- **[STATUS.md](STATUS.md):** what is implemented, known limitations, and the roadmap.
- **Guides:**
  - [foundation](docs/foundation.md);
  - [inquiries](docs/inquiries.md);
  - [citation checks and literature](docs/citations-and-literature.md);
  - [debate](docs/debate.md);
  - [refinement and verdicts](docs/refinement.md);
  - [localization](docs/localization.md).
- **[docs/adr](docs/adr):** architecture decision records.

## License

Helios Collective is licensed under the [Apache License 2.0](LICENSE).

Recorded data used by the tests and offline demos comes from NASA POWER and OpenAlex and keeps their terms. See [servers/climate/tests/fixtures/README.md](servers/climate/tests/fixtures/README.md) and [servers/scholarly/tests/fixtures/README.md](servers/scholarly/tests/fixtures/README.md).

TDQS

A3.8/5.0

Scored across 3 tools

Disambiguation4/5

Each tool has a distinct role: find_places extracts admin-area mentions from free text, resolve_place resolves a given name to ranked candidates, and admin_to_bbox converts a resolve_place result into a bounding box. The boundary between find_places and resolve_place is the only soft spot, since both deal with matching admin-area names, but the descriptions make the text-scan vs. name-lookup distinction reasonably clear.

Naming Consistency4/5

All names are snake_case and descriptive, with two verb_noun forms (find_places, resolve_place) and one noun_to_noun form (admin_to_bbox). The slight deviation in the third name is a minor inconsistency but remains readable and predictable.

Tool Count4/5

Three tools is minimal, but the server targets a narrow purpose (admin-area resolution plus bbox output) and each tool contributes a distinct step in that pipeline. It sits near the thin end of the scale without feeling padded or redundant.

Completeness3/5

The core chain of name extraction, resolution, and bbox retrieval is covered, but there are notable gaps: no reverse geocoding from coordinates to admin areas, no way to obtain a bbox without going through resolve_place, and no listing of supported countries or lower admin levels. Agents working outside that exact pipeline will hit dead ends.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues