Skip to content

paruls101/recursive-research

Repository files navigation

Recursive ML Research Agent

A recursive ML research agent with a Streamlit UI. Enter a research direction and the agent autonomously loops through literature review → experiment design → code generation → evaluation until stopping criteria are met. All knowledge is written to a Cortex memory graph that can be exported for a marketplace.

Quick Start

cd recursive-research
pip3 install -r requirements.txt
streamlit run app.py

Supported Models

Uses litellm for multi-provider support:

Provider Model Example API Key Env Var
Google Gemini gemini/gemini-2.0-flash GEMINI_API_KEY
Anthropic claude-sonnet-4-20250514 ANTHROPIC_API_KEY
OpenAI gpt-4o OPENAI_API_KEY

Architecture

Per iteration: 2 LLM calls (Literature + Experimenter) and 2 Python functions (Evaluator + Decision). Mock compute returns fake metrics on a diminishing-returns curve — no GPU needed.

Project Structure

recursive-research/
├── app.py                 # Streamlit dashboard
├── research_loop.py       # Main orchestration loop
├── agents/
│   ├── __init__.py        # Package init
│   ├── literature.py      # Semantic Scholar/arXiv API + LLM synthesis
│   └── experimenter.py    # Hypothesis + code generation prompt
├── evaluator.py           # Pure Python metric comparison
├── decision.py            # Continue/pivot/stop logic
├── cortex_client.py       # Cortex SDK + HTTP fallback
├── mock_compute.py        # Fake metrics with diminishing returns
├── db.py                  # SQLite for sessions + messages
├── baseline_train.py      # Starting GPT training script
├── utils.py               # JSON parsing helpers
└── requirements.txt

Optional: Cortex Setup

The app works without Cortex (prints warnings but won't crash).

# Docker
docker run -d -p 9090:9090 -p 9091:9091 mikesquared/cortex:latest
pip3 install cortex-memory

License

MIT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages