AetherGrid, open-source distributed AI orchestrator

Architecture, built to be read

AetherGrid is organised in four layers with dependencies pointing inward. The domain holds the rules, the outer layers hold the details, and every non-obvious decision is written down in a public decision record.

Presentation

FastAPI endpoints for jobs, nodes, workers, events, cluster health and API keys. They validate input, call an application service and return the response. No business logic lives here.

Application

Services that coordinate domain objects and repositories. The worker execution loop runs each job as a real subprocess and keeps its lease renewed. The reconciliation loop recovers crashed workers, expired leases and inconsistent state.

Domain

Job, Node, Worker, Lease, Event and ApiKey enforce their own invariants. Scheduling policy and the job lifecycle live here as plain Python, with no FastAPI or psycopg imports.

Infrastructure

PostgreSQL repositories written with raw psycopg, so query behaviour and transaction boundaries stay visible. Every repository is validated by a shared contract test suite.

How recovery stays safe

Want a walkthrough of the design?

Book a technical consultation and we will go through it together.

Book a technical consultation