[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72059":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":9,"language":10,"languages":9,"totalLinesOfCode":9,"stars":11,"forks":12,"watchers":13,"openIssues":14,"contributorsCount":15,"subscribersCount":15,"size":15,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":15,"forks30d":15,"starsTrendScore":19,"compositeScore":20,"rankGlobal":9,"rankLanguage":9,"license":21,"archived":22,"fork":22,"defaultBranch":23,"hasWiki":24,"hasPages":22,"topics":25,"createdAt":9,"pushedAt":9,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":15,"starSnapshotCount":15,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},72059,"AI-Scientist-v2","SakanaAI\u002FAI-Scientist-v2","SakanaAI","The AI Scientist-v2: Workshop-Level Automated Scientific Discovery via Agentic Tree Search",null,"Python",6539,894,50,42,0,44,120,382,132,114.86,"Other",false,"main",true,[],"2026-06-12 04:01:03","\u003Cdiv align=\"center\">\n  \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FSakanaAI\u002FAI-Scientist_v2\u002Fblob\u002Fmain\u002Fdocs\u002Flogo_v1.jpg\">\n    \u003Cimg src=\"docs\u002Flogo_v1.png\" width=\"215\" alt=\"AI Scientist v2 Logo\" \u002F>\n  \u003C\u002Fa>\n  \u003Ch1>\n    \u003Cb>The AI Scientist-v2: Workshop-Level Automated\u003C\u002Fb>\u003Cbr>\n    \u003Cb>Scientific Discovery via Agentic Tree Search\u003C\u002Fb>\n  \u003C\u002Fh1>\n\u003C\u002Fdiv>\n\n\u003Cp align=\"center\">\n  📚 \u003Ca href=\"https:\u002F\u002Fpub.sakana.ai\u002Fai-scientist-v2\u002Fpaper\">[Paper]\u003C\u002Fa> |\n  📝 \u003Ca href=\"https:\u002F\u002Fsakana.ai\u002Fai-scientist-first-publication\u002F\"> [Blog Post]\u003C\u002Fa> |\n  📂 \u003Ca href=\"https:\u002F\u002Fgithub.com\u002FSakanaAI\u002FAI-Scientist-ICLR2025-Workshop-Experiment\"> [ICLR2025 Workshop Experiment]\u003C\u002Fa>\n\u003C\u002Fp>\n\nFully autonomous scientific research systems are becoming increasingly capable, with AI playing a pivotal role in transforming how scientific discoveries are made.\nWe are excited to introduce The AI Scientist-v2, a generalized end-to-end agentic system that has generated the first workshop paper written entirely by AI and accepted through peer review.\n\nThis system autonomously generates hypotheses, runs experiments, analyzes data, and writes scientific manuscripts. Unlike [its predecessor (AI Scientist-v1)](https:\u002F\u002Fgithub.com\u002FSakanaAI\u002FAI-Scientist), the AI Scientist-v2 removes reliance on human-authored templates, generalizes across Machine Learning (ML) domains, and employs a progressive agentic tree search, guided by an experiment manager agent.\n\n> **Note:**\n> The AI Scientist-v2 doesn’t necessarily produce better papers than v1, especially when a strong starting template is available. v1 follows well-defined templates, leading to high success rates, while v2 takes a broader, more exploratory approach with lower success rates. v1 works best for tasks with clear objectives and a solid foundation, whereas v2 is designed for open-ended scientific exploration.\n\n> **Caution!**\n> This codebase will execute Large Language Model (LLM)-written code. There are various risks and challenges associated with this autonomy, including the potential use of dangerous packages, uncontrolled web access, and the possibility of spawning unintended processes. Ensure that you run this within a controlled sandbox environment (e.g., a Docker container). Use at your own discretion.\n\n## Table of Contents\n\n1.  [Requirements](#requirements)\n    *   [Installation](#installation)\n    *   [Supported Models and API Keys](#supported-models-and-api-keys)\n2.  [Generate Research Ideas](#generate-research-ideas)\n3.  [Run AI Scientist-v2 Paper Generation Experiments](#run-ai-scientist-v2-paper-generation-experiments)\n4.  [Citing The AI Scientist-v2](#citing-the-ai-scientist-v2)\n5.  [Frequently Asked Questions](#frequently-asked-questions)\n6.  [Acknowledgement](#acknowledgement)\n\n## Requirements\n\nThis code is designed to run on Linux with NVIDIA GPUs using CUDA and PyTorch.\n\n### Installation\n\n```bash\n# Create a new conda environment\nconda create -n ai_scientist python=3.11\nconda activate ai_scientist\n\n# Install PyTorch with CUDA support (adjust pytorch-cuda version for your setup)\nconda install pytorch torchvision torchaudio pytorch-cuda=12.4 -c pytorch -c nvidia\n\n# Install PDF and LaTeX tools\nconda install anaconda::poppler\nconda install conda-forge::chktex\n\n# Install Python package requirements\npip install -r requirements.txt\n```\n\nInstallation usually takes no more than one hour.\n\n### Supported Models and API Keys\n\n#### OpenAI Models\n\nBy default, the system uses the `OPENAI_API_KEY` environment variable for OpenAI models.\n\n#### Gemini Models\n\nBy default, the system uses the `GEMINI_API_KEY` environment variable for Gemini models through OpenAI API.\n\n#### Claude Models via AWS Bedrock\n\nTo use Claude models provided by Amazon Bedrock, install the necessary additional packages:\n```bash\npip install anthropic[bedrock]\n```\nNext, configure valid [AWS Credentials](https:\u002F\u002Fdocs.aws.amazon.com\u002Fcli\u002Fv1\u002Fuserguide\u002Fcli-configure-envvars.html) and the target [AWS Region](https:\u002F\u002Fdocs.aws.amazon.com\u002Fbedrock\u002Flatest\u002Fuserguide\u002Fbedrock-regions.html) by setting the following environment variables: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`, `AWS_REGION_NAME`.\n\n#### Semantic Scholar API (Literature Search)\n\nOur code can optionally use a Semantic Scholar API Key (`S2_API_KEY`) for higher throughput during literature search [if you have one](https:\u002F\u002Fwww.semanticscholar.org\u002Fproduct\u002Fapi). This is used during both the ideation and paper writing stages. The system should work without it, though you might encounter rate limits or reduced novelty checking during ideation. If you experience issues with Semantic Scholar, you can skip the citation phase during paper generation.\n\n#### Setting API Keys\n\nEnsure you provide the necessary API keys as environment variables for the models you intend to use. For example:\n```bash\nexport OPENAI_API_KEY=\"YOUR_OPENAI_KEY_HERE\"\nexport S2_API_KEY=\"YOUR_S2_KEY_HERE\"\n# Set AWS credentials if using Bedrock\n# export AWS_ACCESS_KEY_ID=\"YOUR_AWS_ACCESS_KEY_ID\"\n# export AWS_SECRET_ACCESS_KEY=\"YOUR_AWS_SECRET_KEY\"\n# export AWS_REGION_NAME=\"your-aws-region\"\n```\n\n## Generate Research Ideas\n\nBefore running the full AI Scientist-v2 experiment pipeline, you first use the `ai_scientist\u002Fperform_ideation_temp_free.py` script to generate potential research ideas. This script uses an LLM to brainstorm and refine ideas based on a high-level topic description you provide, interacting with tools like Semantic Scholar to check for novelty.\n\n1.  **Prepare a Topic Description:** Create a Markdown file (e.g., `my_research_topic.md`) describing the research area or theme you want the AI to explore. This file should contain sections like `Title`, `Keywords`, `TL;DR`, and `Abstract` to define the scope of the research. Refer to the example file `ai_scientist\u002Fideas\u002Fi_cant_believe_its_not_better.md` for the expected structure and content format. Place your file in a location accessible by the script (e.g., the `ai_scientist\u002Fideas\u002F` directory).\n\n2.  **Run the Ideation Script:** Execute the script from the main project directory, pointing it to your topic description file and specifying the desired LLM.\n\n    ```bash\n    python ai_scientist\u002Fperform_ideation_temp_free.py \\\n     --workshop-file \"ai_scientist\u002Fideas\u002Fmy_research_topic.md\" \\\n     --model gpt-4o-2024-05-13 \\\n     --max-num-generations 20 \\\n     --num-reflections 5\n    ```\n    *   `--workshop-file`: Path to your topic description Markdown file.\n    *   `--model`: The LLM to use for generating ideas (ensure you have the corresponding API key set).\n    *   `--max-num-generations`: How many distinct research ideas to attempt generating.\n    *   `--num-reflections`: How many refinement steps the LLM should perform for each idea.\n\n3.  **Output:** The script will generate a JSON file named after your input Markdown file (e.g., `ai_scientist\u002Fideas\u002Fmy_research_topic.json`). This file will contain a list of structured research ideas, including hypotheses, proposed experiments, and related work analysis.\n\n4.  **Proceed to Experiments:** Once you have the generated JSON file containing research ideas, you can proceed to the next section to run the experiments.\n\nThis ideation step guides the AI Scientist towards specific areas of interest and produces concrete research directions to be tested in the main experimental pipeline.\n\n## Run AI Scientist-v2 Paper Generation Experiments\n\nUsing the JSON file generated in the previous ideation step, you can now launch the main AI Scientist-v2 pipeline. This involves running experiments via agentic tree search, analyzing results, and generating a paper draft.\n\nSpecify the models used for the write-up and review phases via command-line arguments.\nThe configuration for the best-first tree search (BFTS) is located in `bfts_config.yaml`. Adjust parameters in this file as needed.\n\nKey tree search configuration parameters in `bfts_config.yaml`:\n\n-   `agent` config:\n    -   Set `num_workers` (number of parallel exploration paths) and `steps` (maximum number of nodes to explore). For example, if `num_workers=3` and `steps=21`, the tree search will explore up to 21 nodes, expanding 3 nodes concurrently at each step.\n    -   `num_seeds`: Should generally be the same as `num_workers` if `num_workers` is less than 3. Otherwise, set `num_seeds` to 3.\n    -   Note: Other agent parameters like `k_fold_validation`, `expose_prediction`, and `data_preview` are not used in the current version.\n-   `search` config:\n    -   `max_debug_depth`: The maximum number of times the agent will attempt to debug a failing node before abandoning that search path.\n    -   `debug_prob`: The probability of attempting to debug a failing node.\n    -   `num_drafts`: The number of initial root nodes (i.e., the number of independent trees to grow) during Stage 1.\n\nExample command to run AI-Scientist-v2 using a generated idea file (e.g., `my_research_topic.json`). Please review `bfts_config.yaml` for detailed tree search parameters (the default config includes `claude-3-5-sonnet` for experiments). Do not set `load_code` if you do not want to initialize experimentation with a code snippet.\n\n```bash\npython launch_scientist_bfts.py \\\n --load_ideas \"ai_scientist\u002Fideas\u002Fmy_research_topic.json\" \\\n --load_code \\\n --add_dataset_ref \\\n --model_writeup o1-preview-2024-09-12 \\\n --model_citation gpt-4o-2024-11-20 \\\n --model_review gpt-4o-2024-11-20 \\\n --model_agg_plots o3-mini-2025-01-31 \\\n --num_cite_rounds 20\n```\n\nOnce the initial experimental stage is complete, you will find a timestamped log folder inside the `experiments\u002F` directory. Navigate to `experiments\u002F\"timestamp_ideaname\"\u002Flogs\u002F0-run\u002F` within that folder to find the tree visualization file `unified_tree_viz.html`.\nAfter all experiment stages are complete, the writeup stage begins. The writeup stage typically takes about 20 to 30 minutes in total. Once it finishes, you should see `timestamp_ideaname.pdf` in the `timestamp_ideaname` folder.\nFor this example run, all stages typically finish within several hours.\n\n## Citing The AI Scientist-v2\n\nIf you use **The AI Scientist-v2** in your research, please cite our work as follows:\n\n```bibtex\n@article{aiscientist_v2,\n  title={The AI Scientist-v2: Workshop-Level Automated Scientific Discovery via Agentic Tree Search},\n  author={Yamada, Yutaro and Lange, Robert Tjarko and Lu, Cong and Hu, Shengran and Lu, Chris and Foerster, Jakob and Clune, Jeff and Ha, David},\n  journal={arXiv preprint arXiv:2504.08066},\n  year={2025}\n}\n```\n\n## Frequently Asked Questions\n\n**Why wasn't a PDF or a review generated for my experiment?**\n\nThe AI Scientist-v2 completes experiments with a success rate that depends on the chosen foundation model, and the complexity of the idea. Higher success rates are generally observed when using powerful models like Claude 3.5 Sonnet for the experimentation phase.\n\n**What is the estimated cost per experiment?**\n\nThe ideation step cost depends on the LLM used and the number of generations\u002Freflections, but is generally low (a few dollars). For the main experiment pipeline, using Claude 3.5 Sonnet for the experimentation phase typically costs around $15–$20 per run. The subsequent writing phase adds approximately $5 when using the default models specified in the example command. Using GPT-4o for `model_citation` is recommended as it can help reduce writing costs.\n\n**How do I run The AI Scientist-v2 for different subject fields?**\n\nFirst, perform the [Generate Research Ideas](#generate-research-ideas) step. Create a new Markdown file describing your desired subject field or topic, following the structure of the example `ai_scientist\u002Fideas\u002Fi_cant_believe_its_not_better.md`. Run the `perform_ideation_temp_free.py` script with this file to generate a corresponding JSON idea file. Then, proceed to the [Run AI Scientist-v2 Paper Generation Experiments](#run-ai-scientist-v2-paper-generation-experiments) step, using this JSON file with the `launch_scientist_bfts.py` script via the `--load_ideas` argument.\n\n**What should I do if I have problems accessing the Semantic Scholar API?**\n\nThe Semantic Scholar API is used to assess the novelty of generated ideas and to gather citations during the paper write-up phase. If you don't have an API key, encounter rate limits, you may be able to skip these phases.\n\n**I encountered a \"CUDA Out of Memory\" error. What can I do?**\n\nThis error typically occurs when the AI Scientist-v2 attempts to load or run a model that requires more GPU memory than available on your system. To resolve this, you can try updating your ideation prompt file (`ai_scientist\u002Fideas\u002Fmy_research_topic.md`) to suggest using smaller models for the experiments.\n\n## Acknowledgement\n\nThe tree search component implemented within the `ai_scientist` directory is built on top of the [AIDE](https:\u002F\u002Fgithub.com\u002FWecoAI\u002Faideml) project. We thank the AIDE developers for their valuable contributions and for making their work publicly available.\n\n\n## Star History\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=SakanaAI\u002FAI-Scientist-v2&type=Date)](https:\u002F\u002Fstar-history.com\u002F#SakanaAI\u002FAI-Scientist-v2&Date)\n\n## ⚖️ License & Responsible Use\n\nThis project is licensed under **The AI Scientist Source Code License** (a derivative of the Responsible AI License). \n\n**Mandatory Disclosure:** By using this code, you are legally bound to clearly and prominently disclose the use of AI in any resulting scientific manuscripts or papers. \n\nWe recommend the following attribution in your paper's Abstract or Methods section:\n> \"This manuscript was autonomously generated using [The AI Scientist](https:\u002F\u002Fgithub.com\u002FSakanaAI\u002FAI-Scientist).\"\n","AI Scientist-v2 是一个通过智能体树搜索实现自动化科学发现的系统。其核心功能包括自动生成假设、执行实验、数据分析以及撰写科研论文，无需依赖人类编写的模板，并且能够跨机器学习领域通用。该系统采用渐进式的智能体树搜索方法，在实验管理智能体的指导下进行探索。适合用于开放性较强的科学研究场景，特别是当研究目标不明确或需要广泛探索时。请注意，由于此系统会运行由大语言模型生成的代码，存在一定的安全风险，建议在受控环境中使用，例如Docker容器内。",2,"2026-06-11 03:40:10","high_star"]