Current

Unified artifact model

Benchmark first

Corpora: BEIR, FEVER, and LongMemEval form the end-to-end matrix; deterministic fixture suites cover stores, serialization, compiler output, and failure recovery.

Protocol: Pin every input, dependency, model, prompt, and seed. Preserve per-case traces and report quality beside p50/p95 latency, tokens, storage, index-build time, refresh work, and failure count. Compare outputs after restart and across supported stores; compiled configurations must reproduce the same artifact graph and evaluator inputs.

KnowledgeArtifact[T] gives facts, answers, decisions, summaries, procedures, and graph statements common identity, scope, provenance, review, temporal, and supersession semantics.

How it works

The payload type T holds domain content; the envelope holds governance. Artifact identity stays stable while each revision is immutable. Evidence and derived_from capture inputs, generated_by captures the producing activity/configuration, validity bounds describe when the claim applies, and supersedes closes a lineage edge without erasing history. Stores reject a revision if its evidence, scope, or predecessor is invalid.

Research basisW3C PROV models entities, activities, agents, derivation, revision, and responsibility. Nanopublications attach provenance and metadata to atomic assertions. These results require first-class lineage; the single generic Python envelope is a Mari design choice to validate across artifact types.

KnowledgeArtifact[T]

identity + revisionKnowledgeScopeevidencevalid timereview stategeneratorsupersedes

Immutable, provenance-bearing artifact revision
from datetime import datetime, timezone

from mari_components.knowledge import (
    Activity,
    KnowledgeArtifact,
    KnowledgeScope,
    ReviewState,
)

artifact = KnowledgeArtifact[dict[str, int]](
    artifact_id="fact:refund-window:enterprise",
    revision="sha256:8f31",
    value={"days": 30},
    scope=KnowledgeScope(tenant="acme", space="support"),
    recorded_at=datetime.now(timezone.utc),
    review_state=ReviewState.APPROVED,
    generated_by=Activity(
        identifier="refund-policy/v4",
        implementation="extractor@2026-08",
    ),
    derived_from=("github:policy/refunds.md@8f31c2a",),
    supersedes=("fact:refund-window:enterprise@v2",),
)