Data Types

Complete reference for belief dicts, link dicts, graph stats, and model status structures.

Belief Dict

Returned by engine.get_belief() and engine.search_beliefs(). Contains all 32 columns from the beliefs table.

{
    "id": "a1b2c3d4-...",
    "statement": "The compound has reinforced concrete walls",
    "confidence": 0.8,
    "supporting_evidence": '["source doc mentions walls"]',  # JSON string
    "contradicting_evidence": '[]',
    "source_episodes": '["doc:sha256hash"]',
    "topics": '["defense", "construction"]',
    "entities": '["The Compound"]',
    "source_type": "corpus",
    "deprecated": 0,
    "operator_anchored": 0,
    "abstraction_depth": 0,
    "parent_a": None,               # set for dream-synthesized beliefs
    "parent_b": None,
    "generation_type": "extraction", # extraction | dream | triplet | hypothesis_confirmed
    "belief_status": "active",       # active | provisional | dormant
    "epistemic_class": "corpus",     # corpus | operator | web | provisional | synthesis
    "valid_from": "2026-03-28T...",
    "valid_to": None,                # set when superseded
    "superseded_by": None,
    "temporal_type": "ongoing",      # ongoing | event | period
    "core_similarity": 0.72,
    "created_at": "2026-03-28T...",
    "last_updated": "2026-03-28T...",
}

Key Fields

FieldTypeDescription
idstrUUID primary key
statementstrThe belief content
confidencefloat0.0–1.0 confidence score
source_typestrcorpus, operator, synthesis, meta, identity
topicsstrJSON-serialized list of topic tags
entitiesstrJSON-serialized list of named entities
deprecatedint0 or 1. Soft-deleted beliefs are excluded from search.
operator_anchoredint0 or 1. Anchored beliefs are protected from decay.
generation_typestrHow the belief was created
belief_statusstrLifecycle state
epistemic_classstrKnowledge provenance class
parent_a, parent_bstr | NoneParent belief IDs for dream-synthesized beliefs
valid_from, valid_tostr | NoneTemporal validity window
superseded_bystr | NoneID of the belief that replaced this one

JSON string fields. The topics, entities, supporting_evidence, contradicting_evidence, and source_episodes fields are JSON-serialized strings, not Python lists. Parse them with json.loads() when needed.

Link Dict

Returned by engine.get_belief_links().

{
    "id": "link-id-...",
    "belief_a": "belief-id-1",
    "belief_b": "belief-id-2",
    "link_type": "dream",            # dream | triplet | reinforcement
    "inference": "Both beliefs relate to compound defense...",
    "similarity": 0.72,
    "active": 1,
    "reinforced_count": 3,
    "direction": "bidirectional",    # bidirectional | a_to_b | b_to_a
    "created_at": "2026-03-28T...",
}
FieldTypeDescription
idstrLink UUID
belief_a, belief_bstrConnected belief IDs
link_typestrHow the link was created
inferencestrThe discovered connection or reason
similarityfloatCosine similarity between the beliefs
activeint0 or 1. Inactive links are excluded from graph ops.
reinforced_countintNumber of times this link was reinforced
directionstrEdge directionality

Graph Stats Dict

Returned by engine.get_graph_stats().

{
    "beliefs": 512,                  # total non-deprecated beliefs
    "edges": 650,                    # total active links
    "integration_pct": 74.4,         # edges / beliefs * 100
    "components": 12,                # connected components in graph
    "largest_component": 340,        # beliefs in largest component
    "domain_diversity": 15,          # distinct domains
    "topic_entropy": 1.29,           # Shannon entropy of domain distribution
}

Model Status Dict

Returned by engine.get_model_status(). One dict per configured model.

{
    "name": "local_model",
    "endpoint": "http://...",
    "online": true,
    "enabled": true,
    "in_flight": 2,
    "total_calls": 147,
    "tokens_per_second": 10.8,
    "health": "Healthy",
    "success_rate": 0.98,
    "p50_latency": 250.0,
    "p95_latency": 1200.0,
}

Model Health Dict

Returned by engine.get_model_health(). Per-model health metrics.

{
    "key": "local_model",
    "health": "Healthy",            # Healthy | Degraded | Quarantined | Recovering
    "success_rate": 0.98,
    "error_rate": 0.02,
    "p50_latency": 250.0,
    "p95_latency": 1200.0,
    "total_calls": 147,
    "total_errors": 3,
    "consecutive_failures": 0,
}

Queue Status Dict

Returned by engine.queue_status().

{
    "depth": 5,                     # items waiting
    "active": 2,                    # currently processing
    "completed": 47,                # total completed
    "workers": 3,                   # background worker count
    "by_priority": {0: 0, 1: 1, 2: 3, 3: 1},
}

Queue Result Dict

Returned by engine.queue_result(task_id).

{
    "status": "complete",            # pending | running | complete | error
    "response": "...",              # only when complete
    "latency_ms": 1234,             # only when complete
    "error": None,                  # only when error
}

License Info Dict

Returned by engine.get_license_info().

{
    "tier": "pro",
    "valid": true,
    "expires": "2027-03-28",
    "features": ["dreams", "profiling", "unlimited_models"],
}