How nexaai/nexa-sdk works
GenieX is an on-device LLM/VLM inference runtime for Qualcomm Snapdragon devices, with model discovery and download alongside local generation. Users can enter through the CLI, Python, Android, or the C SDK; the CLI also exposes an OpenAI-compatible server. The model manager plans models from supported hubs, downloads and tracks them, and resolves local paths. Inference then dispatches through the SDK to llama.cpp or Qualcomm AI Engine Direct. README documents these interface and backend capabilities; several connections below are based on that documentation because their source was not sampled.
Main entry points: registry.cpp Plugin Registry · lib.rs Model FFI · main.go CLI Commands · geniex.h C API
Components 24
User Interfaces
- CLI Commands
cli/cmd/geniex/main.go - Python API
bindings/python/geniex/auto.py - Android API
bindings/android/app/src/main/java/com/geniex/sdk/GenieXSdk.kt - C API
sdk/include/geniex.h - Go Binding
bindings/go/common.go - Python FFI
bindings/python/geniex/_ffi/_api.py - Model Wrapper
bindings/android/app/src/main/java/com/geniex/sdk/ModelManagerWrapper.kt - JNI Bridge
bindings/android/app/src/main/cpp/model_manager_jni.cpp
Model Management
- Model FFI
sdk/model-manager/crates/ffi/src/lib.rs - Model Manager Core
sdk/model-manager/crates/core/src/lib.rs - Model Query
sdk/model-manager/crates/core/src/query.rs - Model Pull
sdk/model-manager/crates/core/src/pull.rs - Hub Sources
sdk/model-manager/crates/core/src/source/mod.rs - Model Store
sdk/model-manager/crates/core/src/store.rs
Inference SDK
- LLM API
sdk/src/llm.cpp - VLM API
sdk/src/vlm.cpp - Plugin Registry
sdk/src/registry.cpp
Runtime Backends
- llama.cpp Backend
sdk/plugins/llama_cpp/src/plugin.cpp - QAIrt Backend
sdk/plugins/qairt/src/plugin.cpp
HTTP Server
- HTTP Server
cli/server/server.go - API Routes
cli/server/route.go - Chat Handlers
cli/server/handler/chat.go
Other components
- Developer / User
- OpenAI Client
Connections 28
- Developer / User → CLI Commands: runs commands
- Developer / User → Python API: uses API
- Developer / User → Android API: uses API
- Developer / User → C API: calls
- CLI Commands → Go Binding: uses binding
- Python API → Python FFI: calls
- Android API → Model Wrapper: uses wrapper
- Model Wrapper → JNI Bridge: calls
- Go Binding → Model FFI: calls C FFI
- Python FFI → Model FFI: calls C FFI
- JNI Bridge → Model FFI: calls C FFI
- C API → LLM API: exposes API
- C API → VLM API: exposes API
- CLI Commands → HTTP Server: starts
- OpenAI Client → HTTP Server: sends requests
- HTTP Server → API Routes: registers routes
- API Routes → Chat Handlers: dispatches
- Chat Handlers → Go Binding: uses SDK binding
- Model FFI → Model Manager Core: invokes operations
- Model Manager Core → Model Query: plans candidates
- Model Manager Core → Model Pull: pulls models
- Model Query → Hub Sources: plans against
- Model Pull → Hub Sources: fetches from
- Model Pull → Model Store: writes model data
- LLM API → Plugin Registry: selects plugin
- VLM API → Plugin Registry: selects plugin
- Plugin Registry → llama.cpp Backend: dispatches
- Plugin Registry → QAIrt Backend: dispatches