# STORM

> LLM-powered knowledge curation system that researches a topic and writes a cited, Wikipedia-style article

- Category: Agents & Automation / Agent Frameworks & Builders
- Language: Python
- Licence: MIT
- Repository: https://github.com/stanford-oval/storm
- Website: https://storm.genie.stanford.edu
- Canonical page: https://ai-tldr.dev/tools/storm/

## In short

STORM is an open-source knowledge-curation system from Stanford OVAL that turns a topic prompt into a long, citation-grounded, Wikipedia-style article. It sits in the Agent Frameworks & Builders category of the Agents & Automation tools and is open-source, written in Python and licensed MIT. To get started: install knowledge-storm.

## Overview

STORM is an open-source knowledge-curation system from Stanford OVAL that turns a topic prompt into a long, citation-grounded, Wikipedia-style article. It splits the job into two stages — research and writing — so the LLM has structured material to draw from instead of being asked to write a long article from memory.

In the research stage STORM first discovers different perspectives on the topic, then runs simulated conversations between a writer agent and an expert agent grounded in web search results, building up an outline and a set of citations. In the writing stage it generates the full article section by section against those citations. A companion mode, Co-STORM, opens the loop so a human can collaborate with the agents while they research.

STORM is built on DSPy, which makes its components modular and tunable. It supports multiple retrieval back-ends — You.com, Bing, DuckDuckGo, Tavily and document-based retrievers — and works as a library you can drop into your own pipeline or via the hosted demo at storm.genie.stanford.edu.

## What it does

- Two-stage pipeline: perspective-guided research, then long-form sectioned writing
- Simulated writer↔expert conversations grounded in retrieved web results
- Co-STORM mode where humans collaborate with the agents during research
- Modular DSPy-based architecture so language models and retrievers can be swapped
- Multiple retrieval back-ends: You.com, Bing, DuckDuckGo, Tavily, document search
- Outputs an outline plus a long article with inline citations

## Getting started

Install the knowledge-storm package, configure a language model and a retriever, then call STORMWikiRunner to research a topic and generate the article.

1. Install knowledge-storm

   STORM is published on PyPI as the knowledge-storm package.

```bash
pip install knowledge-storm
```

2. Set provider API keys

   Export keys for the LLM provider and the retriever you want to use (the README lists the supported back-ends).

```bash
export OPENAI_API_KEY=sk-...
export YDC_API_KEY=...  # You.com retriever
```

3. Run STORM on a topic

   Wire a language-model config and a retriever module into STORMWikiRunner, then run it with do_research and do_generate_article enabled.

```python
from knowledge_storm import STORMWikiRunner, STORMWikiRunnerArguments, STORMWikiLMConfigs
from knowledge_storm.lm import LitellmModel
from knowledge_storm.rm import YouRM

lm_configs = STORMWikiLMConfigs()
engine_args = STORMWikiRunnerArguments(output_dir="./out")
retriever_module = YouRM(ydc_api_key="...", k=3)
runner = STORMWikiRunner(engine_args, lm_configs, retriever_module)
runner.run(topic="Small language models", do_research=True, do_generate_article=True)
```

## When to use it

- Pre-writing a long article on an unfamiliar topic before a human editor takes over
- Generating internal topic primers that come with citations to the underlying sources
- Researching a topic interactively as a team using Co-STORM
- Studying or extending agent research pipelines built on DSPy
