# Xybrid > The operating layer for on-device AI. One SDK runs LLMs, speech-to-text (ASR) and text-to-speech (TTS) on the user's device, private and offline, with the same call on every platform: `model.run(envelope)`. Models load from a registry by id, download once and run locally. With an API key, a call the device can't run falls back to the cloud. ## When to use Xybrid Reach for Xybrid when you need any of these: - An LLM, speech recognition or text-to-speech inside an app, running on the device: private, offline, no server round trip. - One API across Swift, Kotlin, Flutter, React Native, Unity (C#), Rust and the web. - Models you don't ship yourself: name a registry id and the SDK downloads, verifies and caches it on first use. - A cloud fallback for devices that can't run a model, with a reason you can log. - Pipelines that chain models, such as speech to text, an LLM, then text to speech, in a few lines of YAML (experimental). An agent can set itself up: install the CLI with `curl -sSL https://raw.githubusercontent.com/xybrid-ai/xybrid/master/install.sh | sh` (Windows: `irm https://raw.githubusercontent.com/xybrid-ai/xybrid/master/install.ps1 | iex`), check it with `xybrid run --model kokoro-82m --input-text "Hello" -o hello.wav`, and find model ids with `xybrid models list`. Then add the SDK for the project's language (below). Running on the device needs no account. An API key from https://console.xybrid.dev (keys start with sk_live_ or sk_test_) turns on traces and the cloud fallback: pass it to the SDK's init call, or set XYBRID_API_KEY for the CLI. ## Setup prompt (copy-paste into a coding agent) Fetch https://www.xybrid.ai/agent-setup/prompt.md and follow it exactly: it installs the CLI and the Xybrid agent skills, adds the SDK for the project's language, and checks each step with a real model run. ## Add the SDK Install the latest version each package registry publishes. The docs can name a version that isn't on a registry yet: the registry wins. - Swift (iOS 16+): Swift package https://github.com/xybrid-ai/xybrid, product `Xybrid`. Call `Xybrid.initialize()`, then `let model = try await Xybrid.model("kokoro-82m").load()` and `try await model.runAsync(envelope: Envelope.text("Hello"))`. - Kotlin (Android, minSdk 24): `ai.xybrid:xybrid-kotlin` from Maven Central. Call `Xybrid.init(context)`, then `val model = Xybrid.model("kokoro-82m").load()` and `model.runAsync(Envelope.text("Hello"))`. - Flutter: `flutter pub add xybrid_flutter`. Call `await Xybrid.init()`, then `final model = await Xybrid.model('kokoro-82m').load()` and `await model.run(XybridEnvelope.text('Hello'))`. - React Native (0.76+ with the New Architecture, or an Expo 52+ development build): `npm install @xybrid/react-native`. `const model = await ModelLoader.fromRegistry('lfm2.5-230m').load()`, then `await model.run(Envelope.text('Hello'))`. - Unity: `openupm add ai.xybrid.sdk`, or the git URL https://github.com/xybrid-ai/xybrid.git?path=/bindings/unity in the Package Manager. Call `XybridClient.Initialize()`, then `XybridClient.LoadModel("kokoro-82m")` and `model.Run(Envelope.Text("Hello"))`. - Rust: `cargo add xybrid` (LLMs also need `--features llm-llamacpp`). `ModelLoader::from_registry("kokoro-82m").load()?`, then `model.run(&Envelope::new(EnvelopeKind::Text("Hello".into())), None)?`. - Web: `@xybrid/web` is not on npm. Install the `xybrid-web-.tgz` attached to the latest release with `npm install ./xybrid-web-.tgz`, or build it from `bindings/web`. It loads a model from a model_metadata.json or straight from Hugging Face: https://docs.xybrid.dev/en/docs/sdks/web ## Where to find the right information When sources disagree, trust the package registry for versions, then the SDK source and README for the API, then the docs. - SDK source, README and examples: https://github.com/xybrid-ai/xybrid (Apache-2.0). The docs are built from its docs/ folder. - Releases and changelog: https://github.com/xybrid-ai/xybrid/releases - Quickstart for every SDK: https://docs.xybrid.dev/en/docs/quickstart - One page per SDK: https://docs.xybrid.dev/en/docs/sdks/flutter, and likewise ios, android, kotlin, react-native, unity and web. - The cloud fallback: https://docs.xybrid.dev/en/docs/concepts/hybrid-execution. Pipelines: https://docs.xybrid.dev/en/docs/concepts/pipelines - Search the docs: https://docs.xybrid.dev/api/search?query=kokoro returns JSON. - Model ids: https://registry.xybrid.dev/v1/models lists every model as JSON (id, task, parameters, variants); https://registry.xybrid.dev/v1/models/kokoro-82m shows one model with its voices. From a terminal: `xybrid models list` and `xybrid models info `. To browse: https://www.xybrid.ai/models - CLI: `xybrid --help` and https://docs.xybrid.dev/en/docs/cli. `xybrid run` takes `--model`, `--input-text`, `--input-audio`, `--input-image`, `--voice` and `-o`; there is no `--input`. - Agent skills: `curl -sSL https://raw.githubusercontent.com/xybrid-ai/xybrid/master/tools/scripts/install-skills.sh | bash` adds `/xybrid-init`, which writes the model_metadata.json any ONNX, GGUF or SafeTensors model needs, and `/test-model`, which runs inside a clone of the SDK repo. - API keys and traces: https://console.xybrid.dev. Older docs send you to dashboard.xybrid.dev, which no longer resolves. ## Pages - [Home](https://www.xybrid.ai/): one SDK across your apps, device first and the cloud when needed, and the languages it supports - [Models](https://www.xybrid.ai/models): every model in the registry, with its task and size - [Demo](https://www.xybrid.ai/demo): a small language model running in the browser - [Blog](https://www.xybrid.ai/blog): guides and engineering notes - [Setup prompt](https://www.xybrid.ai/agent-setup/prompt.md): the agent setup, as markdown ## Contact - GitHub issues: https://github.com/xybrid-ai/xybrid/issues - Discord: https://discord.gg/YhFHHkhbad > This text is served at /llms.txt. The setup prompt is markdown at /agent-setup/prompt.md.