A collaborative platform that transforms LLM conversations into structured research ideas and automated AI-driven scientific experiments.
AE-Scientist consists of three main components that work together to facilitate AI-powered research:
Next.js web application for conversation and project management
- Import and manage LLM conversations from various providers
- Generate and refine research proposals through interactive AI dialogue
- Track project versions with visual diff viewers
- Search across conversations and projects
FastAPI backend for authentication, data management, and AI orchestration
- Google OAuth 2.0 authentication
- PostgreSQL database for data persistence
- REST API for frontend integration
- LLM integration for idea generation and refinement
- File upload and storage (AWS S3)
Automated AI scientist for running experiments and generating papers
- Multi-stage BFTS (Best-First Tree Search) experiment pipeline
- Automatic code generation and experimentation
- Multi-seed evaluation and ablation studies
- LaTeX paper generation with citations
- Support for both local and RunPod GPU execution
📖 Research Pipeline Documentation
- Python 3.12+ (for server and research pipeline)
- Node.js 20+ (for frontend)
- PostgreSQL (for server database)
- uv (Python package manager) - Installation guide
- Google OAuth credentials (for authentication)
Install all dependencies at once:
make installOr install each component individually:
make install-server # Install server dependencies
make install-research # Install research pipeline dependencies
cd frontend && npm install # Install frontend dependenciesEach component requires its own configuration:
-
Server:
cp server/env.example server/.env # Edit server/.env with your credentials -
Frontend:
cp frontend/env.local.example frontend/.env.local # Edit frontend/.env.local with API URL -
Research Pipeline:
cp research_pipeline/.env.example research_pipeline/.env # Edit research_pipeline/.env with API keys
See individual README files for detailed configuration instructions.
Start the development servers:
# Terminal 1 - Database
make migrate-db # Run database migrations (first time only)
# Terminal 2 - Server
make dev-server # Start FastAPI server (http://localhost:8000)
# Terminal 3 - Frontend
make dev-frontend # Start Next.js server (http://localhost:3000)Visit http://localhost:3000 and sign in with Google to get started.
make install # Install all dependencies
make install-server # Install server dependencies
make install-research # Install research pipeline dependenciesmake dev-server # Start server development server
make dev-frontend # Start frontend development servermake lint # Lint all Python projects
make lint-server # Lint server only
make lint-research # Lint research pipeline only
make lint-frontend # Lint frontend onlymake migrate-db # Run database migrations
make export-openapi # Export OpenAPI schema
make gen-api-types # Generate TypeScript types from OpenAPI schemaAE-Scientist/
├── frontend/ # Next.js web application
│ ├── src/ # Source code
│ ├── public/ # Static assets
│ └── README.md # Frontend documentation
│
├── server/ # FastAPI backend server
│ ├── app/ # Application code
│ ├── database_migrations/ # Alembic migrations
│ └── README.md # Server documentation
│
├── research_pipeline/ # AI scientist experiment pipeline
│ ├── ai_scientist/ # Core pipeline code
│ └── README.md # Research pipeline documentation
│
├── linter/ # Shared linting scripts
├── Makefile # Root makefile (delegates to sub-makefiles)
└── README.md # This file
-
Conversation Import (Frontend → Server)
- User imports LLM conversation via share URL
- Server fetches and stores conversation in database
-
Idea Generation (Server → AI)
- Server sends conversation to LLM
- AI generates structured research proposal
- Multiple refinement iterations possible
-
Experiment Execution (Research Pipeline)
- Research proposal exported to pipeline
- Automated multi-stage experiments
- Results collected and papers generated
-
Results Review (Server → Frontend)
- Experimental results stored in database
- Papers and artifacts accessible via web interface
Frontend:
- Next.js 15 with React 19
- TypeScript 5
- Tailwind CSS 4
Server:
- FastAPI
- PostgreSQL with Alembic migrations
- SQLAlchemy ORM
- Google OAuth 2.0
Research Pipeline:
- PyTorch for ML experiments
- LangChain for LLM orchestration
- Weights & Biases for experiment tracking
- LaTeX for paper generation
Both Python projects use the same strict linting configuration:
- black: Code formatting (100 char line length)
- isort: Import sorting
- ruff: Fast linting (pycodestyle, pyflakes, unused arguments)
- mypy: Strict type checking
Run linting:
make lint-server # Lint server
make lint-research # Lint research pipeline
make lint # Lint both- ESLint: Code linting
- Prettier: Code formatting
- Stylelint: CSS linting
- TypeScript: Type checking
Run linting:
make lint-frontend # Lint frontend- Use named arguments in Python functions
- Avoid optional arguments with defaults unless explicitly needed
- Use
pathlib.Pathinstead ofos.path - Check f-strings actually have variables being replaced
- Keep functions small and focused
- Refactor instead of duplicating code
The application uses Google OAuth 2.0 for authentication:
- Users sign in with Google account
- Server validates OAuth token
- Session cookie stores authentication state
- All API routes (except auth endpoints) are protected
See Server Documentation for OAuth setup instructions.
The server is configured for Railway deployment:
server/railway.tomldefines build configuration- Environment variables set in Railway dashboard
- Automatic migrations on deployment
The frontend can be deployed to Railway or Vercel:
frontend/railway.tomlfor Railway- Automatic Next.js detection on Vercel
- Configure
NEXT_PUBLIC_API_BASE_URLto point to production server
For GPU-accelerated experiments:
- Use provided RunPod scripts to create containers
- Configure environment variables in container
- Run experiments via SSH or Jupyter
See Research Pipeline Documentation for RunPod setup.
The RunPod pipeline uses a pre-baked Docker image defined at server/app/services/research_pipeline/Dockerfile. This image installs the LaTeX/PDF toolchain so pods skip long apt-get steps.
Build + push (macOS/Apple Silicon friendly):
DOCKER_DEFAULT_PLATFORM=linux/amd64 docker buildx build \
--platform linux/amd64 \
-t <dockerhub-username>/runpod_pytorch_texdeps:<tag> \
-f server/app/services/research_pipeline/Dockerfile \
--load .
docker push <dockerhub-username>/runpod_pytorch_texdeps:<tag>Setting DOCKER_DEFAULT_PLATFORM=linux/amd64 ensures you build an x86 image compatible with RunPod’s GPU hosts even when running on Apple Silicon.
Reference in code: server/app/services/research_pipeline/runpod_manager.py passes the image name to RunPodCreator.create_pod(). Update that constant when you publish a new tag so deployments use the latest base image.
- Follow the code style guidelines above
- Run linting before committing:
make lint - Update documentation when adding features
- Test authentication flows and protected routes
- Keep dependencies up to date
See LICENSE file for details.
For detailed documentation on each component:
- Frontend: frontend/README.md
- Server: server/README.md
- Research Pipeline: research_pipeline/README.md