Autonomous ML research agent
Project description
Epochler
Autonomous ML Research Agent. Define your ML task through conversation, approve decisions progressively, then let the agent iterate autonomously until it hits your target metric.
Early beta (v0.1.0). The core workflow is functional, but expect rough edges, breaking changes between releases, and incomplete documentation.
Why Epochler?
Training ML models involves a repetitive cycle: choose a dataset, pick metrics, design preprocessing, select a model family, write training code, run it, analyze results, tweak, repeat. Epochler automates this loop. You describe what you want in plain language, approve structured decisions through a UI, and the agent handles code generation, execution, and iteration, while you watch in real time.
Quick Start
Option A: Docker (recommended)
git clone https://github.com/elilat/epochler.git
cd epochler
cp backend/.env.example .env
# Edit .env with your API keys and a secure password/secret
docker compose up --build
Open http://localhost:8000 and sign in with your configured password.
Option B: pip install from source
git clone https://github.com/elilat/epochler.git
cd epochler
# Backend
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install .
cp .env.example .env
# Edit .env with your API keys and a secure password/secret
# Frontend
cd ../frontend
npm install
npm run build
# Run
cd ..
epochler
Open http://localhost:8000.
Option C: Development mode
# Backend
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env
# Edit .env with your API keys and a secure password/secret
# Frontend
cd ../frontend
npm install
# Start both (from repo root)
cd ..
./dev.sh
Open http://localhost:5173 (frontend dev server with hot reload).
How It Works
Epochler splits every ML project into two deterministic phases:
flowchart TD
subgraph locking ["Phase 1: Progressive Locking (you approve)"]
Chat[Chat with agent] --> D1[Dataset decision]
D1 --> D2[Preprocessing decision]
D2 --> D3[Evaluation decision]
D3 --> D4[Model decision]
D4 --> D5[Target threshold]
D5 --> Freeze[Contract freezes]
end
subgraph execution ["Phase 2: Autonomous Execution (agent iterates)"]
Freeze --> Preprocess[Preprocessing]
Preprocess --> Feature[Featurization]
Feature --> Train[Training]
Train --> Eval[Evaluation]
Eval --> Analyze[Analysis]
Analyze -->|"target not met"| Train
Analyze -->|"target met or budget hit"| PostRun[Post-run recommendation]
end
PostRun --> Review[You review results]
Review -->|continue| Train
Review -->|finalize| Done[Done]
Phase 1 - Progressive Locking. You describe your ML task in natural language. The agent proposes structured decisions (dataset, preprocessing, evaluation metrics, model family, target threshold). You approve or reject each one through decision cards in the UI. Nothing executes until every decision is locked and the contract freezes.
Phase 2 - Autonomous Execution. Once the contract is frozen, the agent runs the full experiment loop: preprocessing, featurization, training, evaluation, and analysis. It iterates autonomously, writing new training code each round, trying to beat your target metric. Preprocessing and featurization outputs are cached and reused across iterations. Every experiment is logged with its hypothesis, code, results, and verdict.
You can watch live activity, training output, and experiment history in the dashboard at any point.
Architecture
- Frontend: React 19 + Vite 7 + TailwindCSS 4 + shadcn/ui
- Backend: Python FastAPI with WebSocket
- Agents: Claude (planning + coding) via Anthropic API, Gemini (web search) via Google AI API
- Storage: File-based JSON (conversations, contracts, experiments, activity logs)
Tabs
- Chat - Conversation with the planner agent
- Experiments - Table of all experiment runs with expandable reasoning (hypothesis, verdict, lessons, diffs)
- Contract - Current state of the experiment contract (dataset, eval, model, preprocessing)
- Activity - Real-time feed of what the agent is doing
- Console - Live training stdout/stderr output
Project Structure
epochler/
frontend/ # React + Vite + TailwindCSS + shadcn/ui
backend/ # Python FastAPI
epochler/
agents/ # Planner, coder, search agents
orchestrator/ # State machine, message routing
contract/ # Pydantic models, progressive locking
runner/ # Experiment loop, hardware detection, subprocess execution
storage/ # File-based JSON persistence
data/ # Runtime data (gitignored)
docs/ # Design documents
scripts/ # Build and release scripts
dev.sh # Development startup script
Configuration
All configuration is done through environment variables (or a .env file in the backend directory). See backend/.env.example for all available options.
Key settings:
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Anthropic API key (required) |
GEMINI_API_KEY |
Google AI API key (required) |
EPOCHLER_PASSWORD |
Login password (required, must change from default) |
EPOCHLER_SECRET_KEY |
JWT signing secret (required, must change from default) |
CORS_ORIGINS |
Allowed CORS origins (comma-separated) |
WORKSPACE_ROOT |
Root directory for experiment workspaces |
ANTHROPIC_MODEL |
Override the default planner/coder model |
LOG_LEVEL |
DEBUG, INFO, WARNING (default: INFO) |
Known Limitations
- Single-user: Epochler is designed for individual use. There is no multi-user auth or role system.
- Sandbox model: Training scripts run in subprocess isolation with env scrubbing, but this is not OS-level sandboxing. See SECURITY.md.
- Preview model names: The default LLM model names in config may reference preview versions that could be renamed or deprecated by providers. Override them via
.envif needed. - File-based storage: All data is stored as JSON files on disk. There is no database. This is simple and portable but not designed for high concurrency.
Contributing
See CONTRIBUTING.md.
License
Epochler is licensed under the Business Source License 1.1. You may use it for any non-commercial purpose. The license converts to Apache 2.0 on 2028-03-11.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file epochler-0.1.0.tar.gz.
File metadata
- Download URL: epochler-0.1.0.tar.gz
- Upload date:
- Size: 556.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
253aab8e1d2516465505d1756ce1d0cc7ff048497ea1d9d0f51815cbd38b0696
|
|
| MD5 |
5f9a3a66ec504fc8b981b77f35378ab4
|
|
| BLAKE2b-256 |
65412ac2214475307f1f5b52aebda4eb6a3835fcd584ed7c190be7222e146257
|
File details
Details for the file epochler-0.1.0-py3-none-any.whl.
File metadata
- Download URL: epochler-0.1.0-py3-none-any.whl
- Upload date:
- Size: 564.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
71c2a2dc7168c4204aa12e5f8257adef81a87494488f7bbc5558f235d918f3a3
|
|
| MD5 |
1d8b50c9e23c553afb5def5acce12a6f
|
|
| BLAKE2b-256 |
06accee1ef06d4d27fc198dacbf93542bd000c9785b07fd9c11453fba70c1413
|