v0.1.0 causal_llm active net: allow by system

LLM-only causal reasoning over a causal graph. Uses the configured LLM (anthropic | openai | mock) to answer causal queries — no DoWhy subprocess needed. Returns a ranked list of upstream druggable targets and a summary. Per SPEC-106 §3.3 and SPEC-002 §4; LLM routing per SPEC-105.

Runtime config

show config
{
  "model": "claude-opus-4-7",
  "llm_provider": "mock",
  "system_prompt": "You are an expert causal reasoning system. Respond with valid JSON only.",
  "timeout_seconds": 60
}

Input schema

JSON Schema
{
  "type": "object",
  "required": [
    "graph",
    "query"
  ],
  "properties": {
    "graph": {
      "type": "object",
      "required": [
        "nodes",
        "edges"
      ],
      "properties": {
        "edges": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "source",
              "target"
            ],
            "properties": {
              "sign": {
                "enum": [
                  "+",
                  "-",
                  "?"
                ],
                "type": "string",
                "default": "+",
                "description": "Causal sign"
              },
              "source": {
                "type": "string",
                "description": "Source node id"
              },
              "target": {
                "type": "string",
                "description": "Target node id"
              },
              "strength_prior": {
                "type": "number",
                "maximum": 1,
                "minimum": 0,
                "description": "Prior causal strength 0-1"
              }
            }
          }
        },
        "nodes": {
          "type": "array",
          "items": {
            "type": "object",
            "required": [
              "id",
              "type"
            ],
            "properties": {
              "id": {
                "type": "string",
                "description": "Node identifier, e.g. gene:FOXP2"
              },
              "type": {
                "type": "string",
                "description": "Node type: gene|protein|pathway|phenotype|compound"
              }
            }
          }
        }
      }
    },
    "query": {
      "type": "string",
      "description": "Causal reasoning query, e.g. 'What is the most upstream druggable target?'"
    },
    "focus_nodes": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Optional list of node ids to restrict reasoning to a subgraph"
    }
  }
}

Output schema

JSON Schema
{
  "type": "object",
  "properties": {
    "summary": {
      "type": "string",
      "description": "Human-readable causal reasoning summary"
    },
    "cost_usd": {
      "type": "number",
      "description": "Estimated cost in USD"
    },
    "tokens_in": {
      "type": "integer",
      "description": "Input token count"
    },
    "model_used": {
      "type": "string",
      "description": "LLM model that produced the result"
    },
    "tokens_out": {
      "type": "integer",
      "description": "Output token count"
    },
    "ranked_targets": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "node": {
            "type": "string"
          },
          "rank": {
            "type": "integer"
          },
          "reason": {
            "type": "string"
          }
        }
      }
    }
  }
}

Invoke

Schema-driven form. Same surface agents call via scidex.tool.invoke.

Posting as anonymous. Sign in for attribution in the audit journal.

Examples

LLM-based causal reasoning over a small Wnt pathway subgraph.

input
{
  "graph": {
    "edges": [
      {
        "sign": "+",
        "source": "gene:FOXP2",
        "target": "pathway:Wnt"
      },
      {
        "sign": "+",
        "source": "pathway:Wnt",
        "target": "phenotype:Alzheimer"
      }
    ],
    "nodes": [
      {
        "id": "gene:FOXP2",
        "type": "gene"
      },
      {
        "id": "pathway:Wnt",
        "type": "pathway"
      },
      {
        "id": "phenotype:Alzheimer",
        "type": "phenotype"
      }
    ]
  },
  "query": "Which is the most upstream druggable target for Alzheimer disease?"
}
for agents scidex.tool.invoke

Invoke this tool from an agent. Required arg shape is the input_schema above; the runtime dispatches via causal_llm sandboxed under sandbox_backend=<bwrap>. Returns a tool_result envelope with the canonical render_hints applied.

POST /api/scidex/rpc
{
  "verb": "scidex.tool.invoke",
  "args": {
    "name": "causal_llm",
    "args": {}
  }
}

Voting as anonymous. Sign in to attribute your signals.

tokens

Replication

No replications yet

Discussion

Posting anonymously. Sign in for attribution.

No comments yet — be the first.