🚀 Causal AI Agent Quick Start
Follow these simple steps to perform a premium spatiotemporal causal analysis workflow:
- Request Access: Submit your email inside the sidebar form to obtain immediate testing credentials.
- Connect to API: Paste your access token into the Connection section in the sidebar and connect.
- Upload CSV Dataset: Drop your spatiotemporal campaign metrics file (supports files up to 50MB).
- Use Suggested Actions: Click the suggested action bubbles below the chat to automatically run profiling, verify causal backdoor paths, and execute time-series lift estimations.
📝 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. Programmatic integrations must provide their own Gemini key.
⚠️ API Key Requirement
Programmatic API clients are required to pass the custom request header: X-Gemini-API-Key: YOUR_API_KEY. Web portal testing utilizes the host's demo quota.
1. Start a Chat Session
curl -X POST "https://causal-agent-platform-154742125932.us-central1.run.app/agent/sessions" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
2. Send a Message (with LLM Key)
curl -X POST "https://causal-agent-platform-154742125932.us-central1.run.app/agent/sessions/{id}/messages" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
-H "X-Gemini-API-Key: YOUR_GEMINI_API_KEY" \
-H "Content-Type: application/json" \
-d '{"message": "profile this dataset"}'
💡 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-154742125932.us-central1.run.app/mcp/sse"]
}
}
}