ai-scientist
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "ai-scientist" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-4570d113f3ccbdb4840007605b11014e507da0fcbc79379c2f940e969497ec1a. Verify the upstream source and version against https://github.com/TerminalSkills/skills before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Build AI agents that automate scientific research by using agent-tree search to generate hypotheses, design experiments, analyze data, and write papers. Applicable scenarios include automating research workflows, generating and validating hypotheses, and creating AI-driven research assistants.
Introduction source: third_party · TerminalSkills · 1.0.0 Reference
SkillPi interpretation
- Testing
- Not tested
Browse files
Frontmatter
name: ai-scientist
description: >-
Build AI agents that automate scientific research — hypothesis generation, experiment design,
data analysis, and paper writing using agentic tree search. Use when: automating research
workflows, generating and testing hypotheses, building AI-powered research assistants.
license: Apache-2.0
compatibility: "Python 3.10+"
metadata:
author: terminal-skills
version: "1.0.0"
category: research
tags:
- research
- science
- hypothesis
- experiment
- automationAI Scientist
Build AI agents that automate scientific research using AI-Scientist-v2 — an agentic tree search framework for hypothesis generation, experiment design, data analysis, and paper writing.
Overview
AI Scientist explores research problems as a tree search: generate candidate hypotheses, evaluate them based on evidence and feasibility, design experiments for promising branches, and prune dead ends. It covers the full research lifecycle from literature review through paper drafting.
Instructions
Installation
pip install ai-scientist
Set up API key:
export ANTHROPIC_API_KEY="sk-ant-..." # or OPENAI_API_KEY
Define a Research Problem
from ai_scientist import Researcher
researcher = Researcher(
model="claude-sonnet-4-20250514",
domain="machine-learning",
)
result = researcher.investigate(
question="How does data augmentation affect few-shot learning performance?",
max_depth=3,
max_hypotheses=5,
budget_hours=2,
)
print(result.best_hypothesis)
print(result.evidence_summary)
print(result.suggested_experiments)
Hypothesis Generation
from ai_scientist import HypothesisGenerator
generator = HypothesisGenerator(model="claude-sonnet-4-20250514")
hypotheses = generator.generate(
context="Recent work shows transformers struggle with compositional generalization",
num_hypotheses=5,
constraints=[
"Must be testable with existing benchmarks",
"Should suggest a concrete architectural modification",
],
)
for h in hypotheses:
print(f"Hypothesis: {h.statement}")
print(f"Novelty: {h.novelty:.2f}, Feasibility: {h.feasibility:.2f}")
print(f"Test approach: {h.test_plan}")
Experiment Design
from ai_scientist import ExperimentDesigner
designer = ExperimentDesigner(model="claude-sonnet-4-20250514")
experiment = designer.design(
hypothesis="Adding a symbolic reasoning layer improves compositional generalization",
resources={
"compute": "4x A100 GPUs",
"time": "48 hours",
"datasets": ["COGS", "SCAN", "CFQ"],
},
)
print(experiment.methodology)
print(experiment.variables)
print(experiment.metrics)
print(experiment.code_outline)
Result Analysis
from ai_scientist import ResultAnalyzer
analyzer = ResultAnalyzer(model="claude-sonnet-4-20250514")
analysis = analyzer.analyze(
hypothesis="Symbolic reasoning layer improves compositional generalization",
results_path="./experiment_results/",
metrics=["accuracy", "generalization_gap", "training_time"],
)
print(analysis.supports_hypothesis)
print(analysis.key_findings)
print(analysis.next_steps)
Literature Review
from ai_scientist import LiteratureReviewer
reviewer = LiteratureReviewer(model="claude-sonnet-4-20250514")
review = reviewer.review(
topic="Compositional generalization in neural networks",
sources=["arxiv", "semantic-scholar"],
max_papers=50,
)
print(review.summary)
print(review.research_gaps)
print(review.taxonomy)
Paper Writing
from ai_scientist import PaperWriter
writer = PaperWriter(model="claude-sonnet-4-20250514")
paper = writer.draft(
title="Symbolic Reasoning Layers for Compositional Generalization",
sections=["abstract", "introduction", "related-work", "method",
"experiments", "results", "discussion", "conclusion"],
results=analysis,
literature=review,
style="neurips",
)
paper.save("draft.tex")
Examples
Example 1: End-to-End Research on RAG for Code Generation
from ai_scientist import ResearchPipeline
pipeline = ResearchPipeline(
model="claude-sonnet-4-20250514",
output_dir="./research_output/",
)
result = pipeline.run(
question="Can retrieval-augmented generation reduce hallucination in code generation?",
stages=["literature-review", "hypothesis-generation", "experiment-design",
"result-analysis", "paper-draft"],
config={"tree_search_depth": 3, "hypotheses_per_level": 4, "auto_prune_threshold": 0.3},
)
print(f"Hypotheses explored: {result.total_hypotheses}")
print(f"Experiments designed: {result.total_experiments}")
print(f"Best finding: {result.top_finding}")
print(f"Paper draft: {result.paper_path}")
Example 2: Quick Hypothesis Screening for Few-Shot Learning
from ai_scientist import Researcher
researcher = Researcher(model="claude-sonnet-4-20250514", domain="machine-learning")
result = researcher.investigate(
question="Does contrastive pre-training improve few-shot classification on medical images?",
max_depth=2,
max_hypotheses=3,
budget_hours=1,
)
for h in result.all_hypotheses:
print(f"{h.statement} — score: {h.score:.2f}, pruned: {h.pruned}")
print(f"Best: {result.best_hypothesis.statement}")
Guidelines
- Start with
max_depth=2andmax_hypotheses=3to get quick results before scaling up - Use domain-specific constraints in hypothesis generation — unconstrained search wastes compute
- The pruning threshold (
auto_prune_threshold) controls exploration vs exploitation — lower values explore more - Literature review works best with
semantic-scholarfor ML papers andpubmedfor bio/medical - Always review generated hypotheses and papers — the agent is a research accelerator, not a replacement
- For reproducibility, set
seedin the pipeline config - Tree search depth beyond 4 rarely improves results but significantly increases cost
Current listing version
1.0.0
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 自动化科学研究是前沿AI应用,解决研究人员核心痛点
- 显著提升科研效率,覆盖完整研究生命周期
- 具有明确的高价值使用场景和广泛受众
Areas to improve
-
缺少明确的When to Use章节 Reported severity: Minor
文档中缺少独立的When to Use章节,虽然frontmatter中有使用场景描述,但不够突出。
Recommendation: 建议添加独立的When to Use章节,更清晰地说明适用场景和使用时机。
Highlights
- 触发词精准完整,覆盖多种变体
- 边界清晰,包含使用场景描述
- 描述准确反映了Skill的核心功能
Areas to improve
-
缺少明确的When to Use章节 Reported severity: Minor
文档结构基本完整,但缺少独立的When to Use章节。
Recommendation: 建议添加独立的When to Use章节,提升文档的可用性。
Highlights
- Phase/步骤清晰,有出口条件
- 含端到端示例,frontmatter完整
- 文档结构良好,易于理解执行流程
Areas to improve
-
缺少对API key获取失败的异常处理 Reported severity: Minor
文档中提到了设置API key,但没有说明如果API key获取失败或无效时的处理方式。
Recommendation: 建议添加对API key获取失败的异常处理说明,提升执行可靠性。
Highlights
- 工具来源明确,参数正确
- 覆盖主要异常,不可逆操作有确认机制
- 提供了详细的安装和使用说明
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
-
Save or modify files
Confirm the output directory and whether existing files will be replaced. Back up important files and prefer a new output directory.
Mentioned in main document · lines 161 -
Install or fetch external dependencies
Use official sources and pin versions. Check install scripts in an isolated environment. This document check does not cover code downloaded later.
Mentioned in main document · lines 34 -
Accounts, secrets or authorization
Use a dedicated least-privilege account. Keep secrets out of public content and command logs; verify the receiving service and tenant.
Mentioned in main document · lines 37
Domains or addresses referenced in the document
These addresses may be documentation links or examples, not an approved network allowlist. Verify actual destinations and outgoing data before use.
- github.com
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.