Production-grade asynchronous AI job orchestration infrastructure.
Atlas is designed to reliably execute AI inference jobs at scale. The infrastructure is the product; AI models are plugins.
Supported Job Types (V1):
- OCR
- Text Summarization
- Translation
- API: FastAPI (Python 3.11+)
- Database: PostgreSQL 16 (async SQLAlchemy)
- Queue: Redis 7 + Celery 5.x
- Workers: Celery Workers (horizontal scaling)
- Logging: structlog (JSON format)
- Metrics: Prometheus
- Docker + Docker Compose
- Python 3.11+ (for local development)
-
Clone the repository
git clone <repository-url> cd atlas
-
Copy environment file
cp .env.example .env
-
Start services with Docker Compose
docker compose up -d postgres redis
-
Install Python dependencies
pip install -r requirements.txt
-
Run database migrations
alembic upgrade head
-
Start the API server
uvicorn app.main:app --reload --host 0.0.0.0 --port 8000
-
Start Celery workers (in separate terminal)
celery -A app.worker.celery_app worker --loglevel=info --concurrency=4
docker compose up -dThis starts:
- API server (port 8000)
- 4 Celery workers
- PostgreSQL (port 5432)
- Redis (port 6379)
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/jobs |
Submit a new job |
| GET | /api/v1/jobs/{id} |
Get job status |
| GET | /api/v1/jobs |
List jobs |
| GET | /api/v1/workers |
List workers |
| GET | /health |
Health check |
| GET | /metrics |
Prometheus metrics |
curl -X POST http://localhost:8000/api/v1/jobs \
-H "Content-Type: application/json" \
-d '{
"job_type": "ocr",
"payload": {"image_url": "https://example.com/image.png"}
}'Response:
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"status": "QUEUED",
"created_at": "2026-06-26T14:00:00Z"
}curl http://localhost:8000/api/v1/jobs/550e8400-e29b-41d4-a716-446655440000CREATED ? QUEUED ? RUNNING ? COMPLETED
+? FAILED ? RETRYING ? QUEUED
+? DEAD_LETTER
pytestpytest tests/unit -vpytest tests/integration -vpytest --cov=app --cov-report=htmlStructured JSON logs to stdout. View with:
docker compose logs -f api
docker compose logs -f workerPrometheus metrics at GET /metrics:
atlas_jobs_created_totalatlas_jobs_completed_totalatlas_jobs_failed_totalatlas_queue_depthatlas_execution_time_secondsatlas_workers_active
curl http://localhost:8000/health| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
postgresql+asyncpg://... |
PostgreSQL connection |
REDIS_URL |
redis://redis:6379/0 |
Redis connection |
CELERY_BROKER_URL |
redis://redis:6379/0 |
Celery broker |
WORKER_CONCURRENCY |
4 |
Worker concurrency |
WORKER_MAX_RETRIES |
3 |
Default max retries |
RATE_LIMIT_REQUESTS |
100 |
Rate limit requests |
atlas/
+-- app/
� +-- domain/ # Business entities, enums
� +-- application/ # Services, repositories
� +-- infrastructure/ # DB, queue, external
� +-- api/ # FastAPI routes, schemas
� +-- models/ # Model handlers
� +-- services/ # Business logic
� +-- worker/ # Celery workers
� +-- core/ # Config, logging, metrics
+-- tests/
� +-- unit/
� +-- integration/
+-- alembic/ # Database migrations
+-- docs/ # Engineering docs
+-- docker-compose.yml
MIT
