Skip to content

Derive

Derive is a Mixture of Experts (MoE) which attempts to achieve synergies at the intersection of all the strongest deep thinking models (Claude Code with Opus 4.6, Codex 5.3, and Gemini CLI with Gemini 3 Pro Preview), for

Core trick

Launches Claude Code, Codex, and Gemini CLIs as subprocesses, then an orchestrator scores and merges their LaTeX drafts until they converge.

Tags

Description

Derive is a Mixture of Experts (MoE) which attempts to achieve synergies at the intersection of all the strongest deep thinking models (Claude Code with Opus 4.6, Codex 5.3, and Gemini CLI with Gemini 3 Pro Preview), for the purposes of solving hard unsolved math/physics/CS problems. Specifically Derive launches the full CLI coding agents, rather than using the LLM APIs, under the assumption that the CLI agents will have greater power to solve hard problems than the LLM APIs. The goal is to use the different strengths of these various models to create massive synergy, enabling discovery in the area of very hard problems. Derive implements a web-based chat interface, and a very powerful UI, which contains full custom parsers and HTML renderers for markdown and LaTeX, including allowing the user to select text of interest for injection into a prompt. An orchestrator coordinates the problem-solving efforts of the CLI agents.
lukehutch/derive★ 00 forksTypeScriptMITCreated Feb 11, 2026 · last push Feb 18, 2026

README excerpt

# Derive

Automated theorem prover that creates, edits, and renders LaTeX manuscripts using a multi-agent LLM critique/improvement loop.

Three LLM agents (Claude, Codex, Gemini) work in parallel on each task, then iteratively score and merge their responses until convergence. The result is applied to the project files.

## Prerequisites

- **Node.js** >= 22.0.0
- **Git**
- At least one of the following CLI tools:
  - [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (`claude`)
  - [OpenAI Codex CLI](https://github.com/openai/codex) (`codex`)
  - [Google Gemini CLI](https://github.com/google-gemini/gemini-cli) (`gemini`)

## Quick Start

```bash
npm install
npm run build
npm start -- /path/to/your/project
```

Open http://localhost:3001. For development with Vite HMR, use `NODE_ENV=development npm start -- /path/to/your/project`.

## Build

```bash
npm run build
```

This runs `tsc` for the backend (emitting to `dist/`), type-checks the frontend, and builds the Vite bundle to `dist/frontend/`.

## Test

```bash
npm test              # all tests
npm run test:watch    # watch mode
```

## Environment Variables

| Variable | Default | Description |
|---|---|---|
| `DERIVE_PORT` | `3001` | Server port |
| `DERIVE_CLAUDE_MODEL` | `claude-opus-4-6` | Model for Claude Code agent |
| `DERIVE_CODEX_MODEL` | `gpt-5.3-codex` | Model for Codex agent |
| `DERIVE_GEMINI_MODEL` | `gemini-3-pro-preview` | Model for Gemini agent |
| `DERIVE_ORCHESTRATOR_MODEL_ROUTER` | `claude

Team