How raullenchai/rapid-mlx works
Rapid-MLX combines an Apple-Silicon inference server with a macOS desktop client. The main workflow is a client sending OpenAI- or Anthropic-compatible requests to the server, which validates and adapts them before model inference and returns generated results. The repository also includes separate agent-runtime, computer-use, MCP, image, and video capabilities. Relationships are limited to those stated in the README or visible in the supplied source index and excerpts; several desktop-to-server and unsampled subsystem links remain unverified.
Main entry points: rapid_mlx/server.py API Server · agent_runtime/server.py Agent Server · RapidApp.swift Rapid Desktop · engine.py Image Engine
Components 25
API Serving
- API Server
rapid_mlx/server.py - API Schemas
rapid_mlx/api/models.py - Route Helpers
rapid_mlx/service/helpers.py - Error Handling
rapid_mlx/middleware/exception_handlers.py
Inference Runtime
- Batch Engine
rapid_mlx/engine_core.py - Server Config
rapid_mlx/config/__init__.py
Media Generation
- Image Engine
rapid_mlx/image/engine.py - Video Engine
rapid_mlx/video/engine.py - Video Pipeline
videox_fun_mlx/pipeline/pipeline_cogvideox_fun_inpaint.py
Agent Capabilities
- Agent Server
rapid_mlx/agent_runtime/server.py - Agent Runtime
rapid_mlx/agent_runtime/runtime.py - Agent Models
rapid_mlx/agent_runtime/models.py - Computer Use Server
rapid_mlx/cua/server.py - Computer Use Service
rapid_mlx/cua/service.py - Computer Use Backend
rapid_mlx/computer_use/backend.py - MCP Manager
rapid_mlx/mcp/manager.py - MCP Client
rapid_mlx/mcp/client.py
Mac Desktop
- Rapid Desktop
apps/rapid-mac/Sources/Rapid/RapidApp.swift - Chat Interface
apps/rapid-mac/Sources/Rapid/UI/ChatView.swift - Chat View Model
apps/rapid-mac/Sources/Rapid/Chat/ChatViewModel.swift - Chat Streaming
apps/rapid-mac/Sources/Rapid/Chat/ChatStreamClient.swift - Dictation
apps/rapid-mac/Sources/Rapid/Dictation/DictationController.swift - Audio Client
apps/rapid-mac/Sources/Rapid/Audio/AudioClient.swift
Other components
- API Client
- Desktop User
Connections 21
- API Client → API Server: sends requests
README.md - API Server → API Schemas: uses schemas
rapid_mlx/server.py - API Server → Route Helpers: delegates
rapid_mlx/server.py - API Server → Error Handling: installs handlers
rapid_mlx/server.py - API Server → Server Config: loads config
rapid_mlx/server.py - API Server → Batch Engine: dispatches inference
- API Server → Image Engine: offers generation
- Image Engine → Video Engine: separate media capability
- Video Engine → Video Pipeline: runs pipeline
rapid_mlx/video/engine.py - API Server → Agent Server: separate runtime
- Agent Server → Agent Runtime: uses runtime
rapid_mlx/agent_runtime/server.py - Agent Server → Agent Models: uses models
rapid_mlx/agent_runtime/server.py - Computer Use Server → Computer Use Service: routes to
rapid_mlx/cua/server.py - Computer Use Service → Computer Use Backend: uses backend
rapid_mlx/cua/service.py - MCP Manager → MCP Client: uses client
rapid_mlx/mcp/manager.py - Desktop User → Rapid Desktop: uses
- Rapid Desktop → Chat Interface: presents chat
- Chat Interface → Chat View Model: binds view model
- Chat View Model → Chat Streaming: streams replies
- Rapid Desktop → Dictation: offers dictation
- Dictation → Audio Client: uses audio client
apps/rapid-mac/Sources/Rapid/Dictation/DictationController.swift