ReplAgent
An AI-powered coding assistant with live sandbox execution feedback.
Features
- Full-stack React + FastAPI application.
- Live sandboxing using Docker to safely execute Python and JavaScript code.
- AI assistant powered locally by Ollama.
Setup Instructions
Prerequisites
- Docker: Must be installed and running.
- Ollama: Must be installed and running. Pull a model before starting:
ollama pull qwen2.5-coder
Running Locally with Docker Compose
The easiest way to run the full stack is using docker-compose.
docker-compose up --build
This will start:
- Frontend on
http://localhost:5173 - Backend on
http://localhost:8000
Running Manually
Backend:
cd backend
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
cp .env.example .env
uvicorn app.main:app --reload
Frontend:
cd frontend
npm install
npm run dev
Security Limitations
- Code execution is containerized and restricted using Docker limits (
mem_limit,nano_cpus,network_disabled). - Temporary files are created per session and cleaned up automatically.
- Do not deploy this sandboxing method directly to public internet without further security hardening (like gVisor or Firecracker).