Analyze experiment data and generate analysis reports.
Analyze experiment data and generate reports. Supports single experiment, batch experiments, and synthesis.
# Get PYTHON_PATH from .env
PYTHON_PATH=$(grep "^PYTHON_PATH=" .env | cut -d'=' -f2)
PYTHON_PATH=${PYTHON_PATH:-python3}
$PYTHON_PATH scripts/analyze.py --hypothesis-id 1 --experiment-id 1
This skill requires agentsociety2 to be installed in the Python environment.
Use the PYTHON_PATH from your .env file to ensure the correct Python interpreter is used. See CLAUDE.md for details.
| Parameter |
|---|
| Type |
|---|
| Required |
|---|
| Description |
|---|
| --mode | string | No | single (default) | batch | synthesize |
| --hypothesis-id | string | single/batch | Hypothesis ID (e.g., '1', '2') |
| --experiment-id | string | single | Experiment ID (e.g., '1', '2') |
| --experiment-ids | string[] | batch/synthesize | Experiment IDs list (default: auto-discover) |
| --hypothesis-ids | string[] | synthesize | Hypothesis IDs list (default: auto-discover) |
| --workspace | string | No | Workspace path (default: current directory) |
| --instructions | string | No | Additional analysis/synthesis instructions |
| --literature-summary | string | No | Optional literature summary to incorporate |
This skill calls agentsociety2.skills.analysis (same code as the Python package):
service.Analyzer / run_analysis_workflowagents.AnalysisAgent — data-first insights, ReAct-style tool rounds (executor.AnalysisRunner), visualization + LLM judgesoutput.Reporter (bilingual MD/HTML); output.EDAGenerator (optional EDA / quick stats)llm_contracts.py; composable Markdown bullets in instruction_md/ (loaded via utils.get_analysis_skills)For complex analysis, it runs as a multi-stage workflow (not one-shot):
DataReader.read_full_summary() + data-grounded insightscode_executor)The analysis follows a data-first approach:
presentation/hypothesis_{id}/experiment_{id}/
├── report.md # Markdown report
├── report.html # HTML report (complete document)
├── README.md # Output file guide
├── data/
│ ├── analysis_summary.json # Structured analysis results
│ ├── eda_profile.html # ydata-profiling (if generated)
│ └── eda_sweetviz.html # Sweetviz (if generated)
├── charts/ # Generated charts
└── assets/ # Report-embedded static resources
| Source | Output | Notes |
|---|---|---|
| ydata-profiling | eda_profile.html | Sampled table via EDAGenerator |
| Sweetviz | eda_sweetviz.html | Sampled table via EDAGenerator |
| Quick stats | Injected into report prompt | Markdown from DataReader / EDAGenerator.generate_quick_stats |
The experiment must have been run with data:
hypothesis_{id}/experiment_{id}/run/sqlite.db must existagentsociety-synthesize| Aspect | agentsociety-analysis | agentsociety-synthesize |
|---|---|---|
| Scope | Single experiment | Multiple experiments/hypotheses |
| Output | presentation/hypothesis_X/experiment_Y/ | synthesis/ |
| Purpose | Deep dive into one experiment | Cross-experiment comparison |
| When to use | After each experiment run | After multiple experiments |
After analysis completes, update: