Core concepts

Architecture

How the runtime is layered and what runs where.

The stack
Your app (Expo / React Native / native)
  └ expo-lyboai / Swift / Kotlin bindings
     └ lybo-ffi — 4-function C ABI, JSON protocol
        └ lybo-core (Rust)
           agents · workflows · middleware · model router
           knowledge/RAG · memory · tools · policy
           packs · observability · encrypted storage
─────────────────────────────────────────────────
Optional server: lybo-plane (pack catalogue, entitlements)

One Runtime instance lives in your app process. Every turn flows: middleware → intent routing → skill execution (pattern or workflow) → policy-gated tools → memory + trace persistence. Hosts receive progress as a stream of events (agent.token, tool.awaitingApproval, checkpoint.created, …).

  • Local first — all state in an encrypted store (ChaCha20-Poly1305, key from Keychain/Keystore).
  • Bounded by construction — step budgets on workflows, iteration caps on agent loops.
  • Declarative packs — no downloaded code execution, ever.
  • Untrusted infrastructure — devices verify pack hashes + signatures locally.