Skip to content

Repository files navigation

AgentSandbox — Local CrewAI Orchestration

A private, local-first CrewAI application. Submit an objective, get a manager → specialist → reviewer pipeline execution with SQLite job persistence and Git-artifact output.

Quick Start

# Activate the virtual environment
.venv\Scripts\activate

# Start the app (dashboard + API on 127.0.0.1:8090)
python start.py

Then open http://localhost:8090 in your browser.

CLI Usage

# Run an objective from the command line
python cli.py "Create a Python script that reads a CSV and prints summary stats"

# List recent jobs
python cli.py --list

# List only failed jobs
python cli.py --list --status failed

Architecture

Component Purpose
src/api.py FastAPI service (port 8090, localhost-only)
src/flow.py CrewAI Flow: manager → specialist → reviewer
src/agents.py Agent role definitions + workspace writer tool
src/db.py SQLite persistence (jobs + events)
src/workspace.py Safe workspace writes + Git commits
src/dashboard.html Browser UI for submitting and monitoring jobs

API

Method Path Description
GET /health App, DB, workspace, active-job count
POST /jobs Submit a new objective
GET /jobs List jobs (optional ?status=running)
GET /jobs/{id} Get job detail + event log
POST /jobs/{id}/cancel Cancel a running job

Configuration (.env)

OLLAMA_BASE_URL=http://localhost:11434
MODEL=hf.co/mradermacher/LFM2.5-2.6B-UNCENSORED-ABLITERATED-PHILADELPHIA-CLASS-GGUF:Q4_K_M
APP_HOST=127.0.0.1
APP_PORT=8090
WORKSPACE_REPO=C:/Users/Drew/Documents/Jarvis_Context/Projects/AgentSandbox/workspace
SQLITE_DB=C:/Users/Drew/Documents/Jarvis_Context/Projects/AgentSandbox/data/agentsandbox.db

Requirements

  • Python 3.11+
  • Local Ollama running at localhost:11434 with the configured model
  • CrewAI + LiteLLM for local Ollama integration

Startup Checklist

  1. Ollama service is running at localhost:11434
  2. Workspace Git repo initialized (auto-done on first start)
  3. SQLite database auto-created on first start
  4. App bound to 127.0.0.1:8090 — no LAN exposure

Restart Recovery

On startup, any job left in RUNNING state is marked FAILED with a RECOVERED event. Jobs in PENDING, COMPLETED, FAILED, or CANCELLED are left untouched.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages