Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.mareforma.com/llms.txt

Use this file to discover all available pages before exploring further.

View on GitHub

examples/01_api_walkthrough/
Every API method — assert, query, get, validate — demonstrated in sequence. Runs in a temporary directory with no external dependencies.

What it covers

  1. Open — zero setup, no init required
  2. Assert — INFERRED, ANALYTICAL, DERIVED classifications
  3. Query — text filter, min_support, classification, limit
  4. Idempotency — retry-safe writes and convergence convention
  5. REPLICATED — automatic when two independent agents share upstream evidence
  6. ESTABLISHED — human validation only, requires REPLICATED first
  7. Anti-patterns — what silently corrupts the epistemic model

Run

cd examples/01_api_walkthrough
python 01_api_walkthrough.py
No external dependencies. Uses a temporary directory — safe to run anywhere.

Key snippet

import tempfile, mareforma

with tempfile.TemporaryDirectory() as tmp:
    with mareforma.open(tmp) as graph:
        prior_id = graph.assert_claim("upstream reference", generated_by="seed")
        id_a = graph.assert_claim(
            "finding A", supports=[prior_id], generated_by="agent/a"
        )
        id_b = graph.assert_claim(
            "finding B", supports=[prior_id], generated_by="agent/b"
        )
        assert graph.get_claim(id_a)["support_level"] == "REPLICATED"