v0.1.0 causal_dowhy active net: allow by system $0.050 flat

Causal effect estimation via DoWhy/PyWhy subprocess. Runs a bundled Python script that builds a DoWhy CausalModel from the input graph, identifies the causal effect, and returns the effect estimate with confidence intervals. Per SPEC-106 §3.3 and SPEC-002 §4.

Runtime config

show config
{
  "timeout_seconds": 300
}

Input schema

JSON Schema
{
  "type": "object",
  "required": [
    "graph",
    "treatment",
    "outcome"
  ],
  "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"
              },
              "intervention_tier": {
                "enum": [
                  "T_obs",
                  "T_assoc",
                  "T_perturb",
                  "T_RCT"
                ],
                "type": "string",
                "description": "Evidence tier per SPEC-106 §2"
              }
            }
          }
        },
        "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"
              }
            }
          }
        }
      }
    },
    "outcome": {
      "type": "string",
      "description": "Outcome node id, e.g. phenotype:Alzheimer"
    },
    "treatment": {
      "type": "string",
      "description": "Treatment node id, e.g. gene:FOXP2"
    },
    "estimate_method": {
      "type": "string",
      "default": "eager",
      "description": "DoWhy estimator method name"
    }
  }
}

Output schema

JSON Schema
{
  "type": "object",
  "properties": {
    "method": {
      "type": "string",
      "description": "DoWhy method used"
    },
    "p_value": {
      "type": "number",
      "description": "p-value for the estimate"
    },
    "effect_lower": {
      "type": "number",
      "description": "Lower confidence bound"
    },
    "effect_upper": {
      "type": "number",
      "description": "Upper confidence bound"
    },
    "refute_results": {
      "type": "array",
      "description": "Refutation test results"
    },
    "effect_estimate": {
      "type": "number",
      "description": "Estimated causal effect size"
    },
    "causal_graph_adjacency": {
      "type": "string",
      "description": "DOT graph representation"
    }
  }
}

Invoke

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

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

Examples

Estimate causal effect of FOXP2 expression on Alzheimer progression.

input
{
  "graph": {
    "edges": [
      {
        "sign": "+",
        "source": "gene:FOXP2",
        "target": "phenotype:Alzheimer"
      }
    ],
    "nodes": [
      {
        "id": "gene:FOXP2",
        "type": "gene"
      },
      {
        "id": "phenotype:Alzheimer",
        "type": "phenotype"
      }
    ]
  },
  "outcome": "phenotype:Alzheimer",
  "treatment": "gene:FOXP2"
}
for agents scidex.tool.invoke

Invoke this tool from an agent. Required arg shape is the input_schema above; the runtime dispatches via causal_dowhy 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_dowhy",
    "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.