AI Core
AI Core is the runtime boundary for running AI Core packages from applications, services, CLIs, and language bindings. It handles package install, model calls, pipeline checkpoints, Wasm actions, direct model chat, speech transcription handoff, and runtime events.
The host application still owns product data, users, billing, durable settings, secrets, databases, queues, UI, deployment policy, and retry scheduling. AI Core receives explicit config snapshots and request payloads, then returns JSON results, checkpoints, events, and install reports.
Choose The Runtime Artifact
Pick the artifact by the boundary your product wants:
- Shared library: use
ai-core-ffiwhen Go, Python, PHP, Flutter, Swift, Kotlin, or another host can load a native library. - Rust library: use the Rust SDK artifact when the host itself is Rust and wants an in-process runtime.
- Process binary: use the
ai-coreCLI binary when the host wants a subprocess worker instead of native linking. - Package tool: use the
aip-packtool binary when you author, sign, inspect, approve, or export.aippackages.
The artifact version must match the packages you install. Package manifests declare runtime compatibility in requirements.core, for example ^0.1.0 or >=0.1.0, <0.2.0. AI Core validates that expression before a package becomes active.
Runtime artifacts may ship in different build variants. Some builds include both local speech-to-text and local model execution, while others omit one or both capabilities. Check the core download page on the site for the current artifact matrix. Local LLM support is exposed as a single built-in local model capability; native acceleration is an implementation detail of the shipped artifact. Hosts can pass an optional local LLM backend preference: auto, cpu, or metal; when omitted, AI Core uses auto. The native provider build automatically compiles available native acceleration support for the target platform. If the preferred backend cannot initialize at runtime, the local provider falls back to automatic backend selection. Local LLM and Whisper resident model state is process-local: FFI handles inside one process can share it, but separate worker processes cannot.
For ai-core-ffi source builds, builtin-local-llm links the native llama.cpp provider, builtin-speech-whisper links the native Whisper provider, and builtin-local-all links both. ai_core_version_json reports the loaded shared library's builtin_local_llm and builtin_speech_whisper flags.
Normal SDK Flow
- Choose an AI Core runtime artifact for your platform and trust mode.
- Store model endpoints, selected model slots, plugin settings, secret references, and optional local speech/LLM paths in host-owned config.
- Apply that config to AI Core through FFI, Rust, or the process boundary.
- Install
.aippackage bytes that match the runtime version and trust mode. - Start a pipeline, resume a checkpoint, run a known Wasm action, or call a configured model directly.
- Store pipeline state, completed outputs, user decisions, logs, and product records in the host.
The core runtime has one app-level routing model and one default model. Plugin packages can declare generation model_slots; missing bindings are seeded when their fallback resolves to core.default or another concrete model. Routing is never a plugin slot.
Package And Runtime Modes
Normal marketplace artifacts install encrypted packages after Marketplace approval and license checks. Hosts load core.license.v1 plus the matching private KEM material before installing an encrypted .aip.
No-marketplace artifacts are a separate local, enterprise, or white-label runtime mode. They accept packages produced for no-marketplace distribution, including plaintext unsigned packages when the package author chooses that flow, and they do not expose license-loading functions.
Do not mix package and runtime modes. A package produced for one mode should be installed into the matching runtime mode.
Read The Sections In This Order
- Language Bindings for the C ABI, JSON envelopes, memory ownership, and host-language wrapper examples.
- Process Host CLI if your host wants an async subprocess worker instead of FFI.
- AI Package Tool for authoring plugin and pipeline packages with
aip-packand choosing a downloadable reference example. - Runtime Contracts for config ownership, package activation, pipeline state, events, and compatibility checks.
- Speech To Text for local speech-to-text model paths and CLI/runtime configuration.
- Local LLM for local
.ggufmodel paths and native local LLM artifact requirements.