🚀 Causal AI Agent Quick Start
Follow these simple steps to
perform a premium spatiotemporal causal analysis workflow:
- Connect with Email: Enter your email in the setup drawer and click Connect. The portal
creates the testing session automatically.
- Pick a Demo or Dataset: Start with one of the canonical demo workflows, upload a CSV,
or
generate a custom dataset.
- Follow the Workflow: Use suggested actions to profile the data, explore charts, define
the causal question, check design assumptions, and estimate effects.
- Review Artifacts: Open charts, tables, model summaries, and exported files from the
artifact panel as the analysis runs.
📝 Pro
Tip
The agent maintains
conversational state. If a calculation completes, ask: "Explain the counterfactual baseline and
suggest sensitivity tests."
🧠 Causal Inference & Methodology
Causal
AI estimates the direct structural impact of interventions rather than simple correlations. The causal
engine fully implements the following methodologies:
📈
Quasi-Experimental / Time-Series
• BSTS (CausalImpact): State-space counterfactual estimation for time-series lift.
• ITS (Interrupted Time Series): Segmented regression measuring level and slope
shifts.
• GeoLift & CausalPy: Multi-region panel synthetic control algorithms.
• Difference-in-Differences (DiD): Standard OLS and Logit interaction models.
🔬
Observational Cross-Sectional
• OLS & Propensity Matching (PSM): Covariance control and patient propensity pair
matching.
• Meta-Learners (S-Learner, T-Learner): Multi-model Random Forest learners estimating
heterogeneous effects (CATE).
• Double Machine Learning (DML): Cross-fitting and residualization estimators (LinearDML,
CausalForestDML).
🕸️
Directed Acyclic Graphs (DAGs)
Graphical networks defining
variables dependencies. Enforces backdoor path verification to completely eliminate selection bias prior
to cross-sectional estimation.
Developers can interact with the agent engine directly from backend services. Start by issuing a per-user
token with frictionless login, then pass that token to dataset, session, and action endpoints.
LLM Key
Requirement
Programmatic API clients are
required to pass X-Gemini-API-Key: YOUR_GEMINI_API_KEY only for LLM-backed chat and dynamic
generation requests. Deterministic workflow actions and web portal demos can run without a user-provided
Gemini key.
Per-User
Workspace
User tokens issued through
frictionless login are scoped to your email. Datasets, sessions, jobs, and generated dataset versions are
isolated to that token.
1.
Issue a User Token
curl -X POST "https://causal-agent-platform-rgkprfm4oa-uc.a.run.app/auth/frictionless-login" \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com"}'
2.
Start a Chat Session
curl -X POST "https://causal-agent-platform-rgkprfm4oa-uc.a.run.app/agent/sessions" \
-H "Authorization: Bearer YOUR_USER_TOKEN"
3. Send
a Message (with LLM Key)
curl -X POST "https://causal-agent-platform-rgkprfm4oa-uc.a.run.app/agent/sessions/{id}/messages" \
-H "Authorization: Bearer YOUR_USER_TOKEN" \
-H "X-Gemini-API-Key: YOUR_GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "profile this dataset"}'
4.
Delete a Dataset
curl -X DELETE "https://causal-agent-platform-rgkprfm4oa-uc.a.run.app/datasets/{dataset_id}" \
-H "Authorization: Bearer YOUR_USER_TOKEN"
Dataset
Retention
Uploaded datasets are stored
privately for analysis and are automatically deleted after 3 days during early access. You can delete a
dataset sooner with the API.
💡 Response
Payload
The endpoint returns a JSON
payload containing the agent's textual explanation, current workflow step, and custom visualization
artifacts.
🔌 Model Context Protocol (MCP)
The
Causal Agent Platform implements an MCP Server using Server-Sent Events (SSE), allowing external clients
like Claude Desktop or Cursor to connect natively to our robust causal tools.
Available
Tools
run_causal_analysis: Executes a rigorous causal
workflow on a dataset. Automatically profiles data, generates Directed Acyclic Graphs (DAGs), and
estimates treatment effects.
Connecting Claude Desktop
Add this
to your claude_desktop_config.json:
{
"mcpServers": {
"causal-agent": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/mcp-client-sse", "--url", "https://causal-agent-platform-rgkprfm4oa-uc.a.run.app/mcp/sse"]
}
}
}