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-<version>.tgz attached to the latest release with npm install ./xybrid-web-<version>.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.

Pages

  • Home: one SDK across your apps, device first and the cloud when needed, and the languages it supports
  • Models: every model in the registry, with its task and size
  • Demo: a small language model running in the browser
  • Blog: guides and engineering notes
  • Setup prompt: the agent setup, as markdown

Contact

This text is served at /llms.txt. The setup prompt is markdown at /agent-setup/prompt.md.