How koramyashwanthreddy/max works
MAX is presented in the README as a self-hosted personal AI platform; this repository state documents the platform foundation, configuration, identity, provider-neutral AI runtime, and model management. The main user workflow is to submit a request to the API, use the registered model/runtime capabilities to generate a response, and manage model lifecycle separately. Identity supplies owner/profile context, while core infrastructure provides application lifecycle and shared configuration. The tree contains additional domain directories, but the README marks later modules as out of scope; their wiring was not inspected.
Main entry points: router.py API routing · manager.py Model manager · main.py Application entry · routes.py Identity endpoints
Components 17
Platform foundation
- Application entry
src/max/main.py - API routing
src/max/api/router.py - Configuration
src/max/config/settings.py - Lifecycle services
src/max/core/application.py
Identity profile
- Identity endpoints
src/max/identity/api/routes.py - Identity service
src/max/identity/services/identity_service.py - Identity repository
src/max/identity/repositories/memory.py
AI runtime
- Inference endpoints
src/max/ai/api/routes.py - Runtime manager
src/max/ai/runtime/manager.py - Runtime registry
src/max/ai/runtime/registry.py - Stub runtime
src/max/ai/runtime/stub.py
Model management
- Model endpoints
src/max/models/api/routes.py - Model manager
src/max/models/services/manager.py - Model registry
src/max/models/services/registry.py - Model loaders
src/max/models/services/loaders.py - Model repositories
src/max/models/services/repositories.py
Other components
- API client
Connections 16
- API client → Application entry: sends requests
- Application entry → API routing: serves API
- Application entry → Lifecycle services: initializes
- API routing → Identity endpoints: routes identity
- API routing → Inference endpoints: routes inference
- API routing → Model endpoints: routes models
- Identity endpoints → Identity service: handles identity
- Identity service → Identity repository: reads and writes
- Inference endpoints → Runtime manager: requests inference
- Runtime manager → Runtime registry: selects runtime
- Runtime registry → Stub runtime: provides default
- Model endpoints → Model manager: manages models
- Model manager → Model registry: uses registry
- Model manager → Model loaders: loads models
- Model manager → Model repositories: persists metadata
- Configuration → Application entry: configures