Schema API

The map your LLM reads to route itself. Abel exposes structured metadata so any LLM learns to translate natural language into CAP calls — without Abel running any LLM.

Design principle: Schema API exposes topology (who connects to whom) but not parameters (weights, tau). Those come from calling explain() or intervene() — paid computation.

GET/cap/v1/schema/communities

List all semantic communities with member variables, typical queries, and cross-community connections.

response.jsonjson
{
  "communities": [
    {
      "id": 42,
      "name": "US Monetary Policy Complex",
      "member_variables": [
        { "name": "Fed_Funds_Rate", "type": "MACRO", "connections": 47 },
        { "name": "DXY", "type": "FINANCIAL", "connections": 31 }
      ],
      "typical_queries": [
        "What happens if the Fed raises rates?",
        "Impact of inflation on markets"
      ],
      "connects_to": [17, 63, 89],
      "regime_sensitive": true
    }
  ]
}
GET/cap/v1/schema/variables?search=bitcoin

Fuzzy search variables by name, type, or domain. Returns matching variables with community context.

response.jsonjson
{
  "variables": [
    {
      "name": "BTCUSD_close",
      "type": "FINANCIAL",
      "domain": "crypto",
      "community_id": 17,
      "community_name": "Crypto Market Structure",
      "connections": 54,
      "data_frequency": "1h"
    }
  ]
}
GET/cap/v1/schema/neighborhood?variable=BTCUSD_close&depth=2

Causal neighborhood — parents, children, and depth-2 cross-domain paths. Structure only, no weights.

response.jsonjson
{
  "center": "BTCUSD_close",
  "parents": [
    { "name": "ETHUSD_close", "direction": "→ center" },
    { "name": "DXY", "direction": "→ center", "cross_domain": true }
  ],
  "children": [
    { "name": "ALTCOIN_INDEX", "direction": "center →" }
  ],
  "depth_2": [
    { "name": "Fed_Funds_Rate",
      "path": "Fed_Funds_Rate → DXY → BTCUSD_close",
      "cross_domain": true }
  ]
}
GET/cap/v1/schema/primitives

Operation catalog — what each CAP primitive does, its parameters, and usage examples. The "instruction manual" for LLMs.

response.jsonjson
{
  "primitives": [
    {
      "name": "intervene",
      "formal": "Estimate P(Y|do(X=x))",
      "when_to_use": "User asks 'what if...', 'should I...'",
      "params": {
        "treatment": "string — variable to intervene on",
        "outcome": "string — variable to measure",
        "treatment_value": "float — intervention magnitude"
      }
    }
  ]
}
GET/cap/v1/schema/regimes

Current causal regime and recent structural changes. Alerts agents when the causal graph has shifted.

response.jsonjson
{
  "current_regime": {
    "id": 7,
    "start_date": "2026-02-15",
    "description": "Post-rate-hike cycle, crypto-macro decoupling",
    "key_changes": [
      { "edge": "NVDA → BTC", "status": "WEAKENED",
        "old_stability": 0.82, "new_stability": 0.31 }
    ]
  },
  "recent_structural_changes": 3
}