AESDK: Econometrics Guardrails For AI-Assisted Research
AESDK helps economics research assistants, applied researchers, and faculty use AI coding tools more safely when writing econometric analysis code.
The basic problem is simple: AI agents can write Python, R, or Stata-like analysis code quickly, but they can also choose the wrong estimator, skip required diagnostics, use the wrong standard errors, or cite methods loosely. AESDK gives the agent a checklist grounded in econometrics before it writes or runs code.
Think of AESDK as a research-methods preflight:
- What design is this? OLS, IV, DiD, panel fixed effects, RDD?
- What assumptions must be stated?
- What diagnostics should be planned?
- What standard errors or clustering choices are required?
- Should the proposed analysis be allowed to run?
- Can we leave behind a reproducible audit trail?
AESDK is not a replacement for judgment, supervision, or peer review. It is a guardrail that makes AI-assisted analysis less ad hoc.
Who This Is For
AESDK is designed for:
- economics RAs using AI agents to draft analysis code
- professors supervising empirical projects
- applied researchers who want pre-analysis discipline in AI-assisted workflows
- teams that need reproducible, auditable research pipelines
You do not need to be a software engineer to benefit from it. The intended workflow is: install AESDK once, add a short instruction to AGENTS.md or CLAUDE.md, and make the AI agent call AESDK before it writes analysis code.
What AESDK Does
AESDK currently provides:
- method guidance for common econometric workflows, including OLS/CEF, IV/2SLS, panel fixed effects, DiD, randomized controlled trials/experimental methods, RDD, matching, synthetic control, nonlinear DiD, GMM, limited dependent variable models, time series, maximum likelihood estimation, double/debiased machine learning, structural/BLP estimation, nonparametric/semiparametric estimation, Bayesian econometrics, and ARCH/GARCH volatility models
- pre-analysis plan checks
- proposal validation with
pass, warn, or block
- data-aware preflight that reads the declared dataset and cross-checks the PAP against it (missing variables, undeclared staggered adoption, few clusters, singleton clusters, missingness, no-variation regressors)
- AI-agent context packets that explain the relevant assumptions and diagnostics
- governed execution that refuses to run blocked analysis code
- governed execution for Python scripts, Stata
.do files, and R scripts
- reproducibility records through an
.aesdk.json audit file
- task/prompt intake helpers that draft a reviewable
pap.yaml and proposal.json and create the required .aesdk.json audit file
- HTML workflow reports that supervisors can inspect without reading raw JSON
- AI Replicability Passports for archived prompts, raw outputs, model metadata, AI-generated code, and AI-derived variables
- replay checks for recorded execution
- enforced online citation/source integrity checks for agent-generated research text
- coding-agent hooks that enforce the methods check (Claude Code): estimation code that skips preflight is denied, and prompts and session transcripts are archived automatically
- Agent Skills generated from every method pack, a Claude Code plugin and marketplace, and an independent methods-reviewer subagent
- an MCP server with read-only tool annotations, typed results, resources, prompts, and a one-click Claude Desktop bundle (
aesdk.mcpb)
- reproducible AI-derived variables:
aesdk.llm.ResearchLLM archives every model call (served model, request id, schema, batch id) for the AI passport
The method guidance is compact and paraphrased. It is meant to guide agents, not to redistribute textbooks.
A Typical RA Workflow
Suppose an RA asks an AI agent:
Estimate whether a state-level job-training subsidy affected county employment using panel data.
Without AESDK, the agent may immediately write a regression. With AESDK, the agent first runs a preflight check.
aesdk agent context --method did
aesdk agent preflight --method did --pap pap.yaml --proposal proposal.json --conformance strict
If the proposed analysis uses panel DiD with non-clustered standard errors, AESDK blocks it before code runs. If the proposal is acceptable, the agent can proceed.
Install
Install AESDK before adding AESDK commands to AGENTS.md, CLAUDE.md, or another agent instruction file. If the package is not installed, the agent will usually report aesdk as missing when it tries to run preflight.
For local development from this repository:
pip install -e .
From PyPI:
pip install aesdk
Then get set up in one step. This verifies the install, saves the ready-made
assistant instructions into your project, and prints a plain-language "you're
ready" summary — no other commands to learn:
aesdk setup