Local AI. Woven in.
A pocket-sized AI gallery for Android. Run modern open-weight models entirely on your phone, triage your inbox via tool-using agents, talk to it hands-free, and ask grounded questions of your own documents — all without a single byte of conversation leaving the device.
Knit is an on-device LLM gallery for Android. Pick a model, pick an agent, chat. Your conversations, documents, and Gmail tokens never leave the phone in plaintext — inference happens locally on the CPU (with KleidiAI ARM optimisations) or the GPU (via Google AI Edge LiteRT-LM, Mali / Adreno).
.gguf.txt or render a .pdf straight to your DownloadsPlenty of apps wrap a single local model. Knit is its own on-device AI platform — model variety, agent orchestration, offline voice, encrypted storage, and real productivity workflows in one package.
Inference, speech-to-text, and text-to-speech all run locally. Chats sit in an SQLCipher-encrypted DB, documents in EncryptedFile, OAuth tokens in EncryptedSharedPreferences — keys bound to the Android Keystore.
GGUF via llama.cpp (CPU + KleidiAI) for breadth. .task via Google AI Edge LiteRT-LM (Mali / Adreno GPU, CPU fallback) for speed. The dispatcher picks based on the catalog.
Tool-calling loop, JSON protocol, ~50 native tools, multi-turn workflows (the Email Triage agent runs 10+ tool calls per request). A consent gate guards anything user-visible.
Whisper STT + VITS TTS + Silero VAD via sherpa-onnx — press-to-talk dictation, spoken replies, and a hands-free listen→answer→speak loop. Audio never leaves the device, unlike the system voice keyboard.
No developer Client ID baked into the APK. Each user supplies their own Google Cloud OAuth client — quota, billing, audit logs stay yours. Settings UI walks you through Cloud Console.
Upload a PDF / image / text. BM25 + TF-IDF hybrid retrieval surfaces the relevant chunks. The Doc Q&A agent's prompt forbids falling back to world knowledge — answers are quotable.
Three agents ship as defaults and can't be deleted. Thirteen more come pre-seeded as deletable starters. Tap + New agent in Home to write your own — system prompt, optional knowledge file, optional tool access — and it shows up in the picker.
General assistant. Concise, matches your tone, never writes code unless asked. Your "what's this thing called again?" agent.
Default · Non-deletableOAuth into Gmail. Categorises P0/P1/P2, applies Priority labels, drafts replies in your Drafts folder, asks for tap-confirmation before sending. Never auto-sends.
Default · Non-deletableUpload PDF / image / text. Answers strictly from the document. Refuses to guess. Hybrid BM25 + TF-IDF retrieval. Cites short phrases from the source chunks verbatim.
Default · Non-deletableChains calendar + unread Gmail + weather + news into one morning summary.
Structured analysis with confidence labels.
Code review, architecture decisions, debugging.
Sharp edits, tone fixing, headline brainstorms.
Socratic tutor. Probes before explaining.
Product, GTM, fundraising — operator framing.
Bilingual Tamil + English. Tanglish-friendly.
Bilingual Hindi + English. Hinglish-friendly.
ITR, GST, deductions — old vs new regime.
Workouts, nutrition basics, habit building.
Upload your bank statement (last 6 months ideal) — it's parsed on-device into spending breakdowns and recurring subscriptions, then advised on. Nothing leaves the phone.
Say what to send and to whom — it drafts the message and opens WhatsApp, SMS, or the share sheet, pre-filled. You tap Send.
Your launcher-assistant: opens installed apps, pulls up directions, follows deep links, and tells you what's installed — just by asking.
LiteRT-LM (.task / .litertlm files) targets the GPU on Mali / Adreno phones with CPU fallback via
TFLite XNNPACK. llama.cpp (.gguf Q4_K_M files) runs on CPU with KleidiAI matmul kernels. The
dispatcher picks based on the model's format field — you just pick the model. The
in-app picker groups the catalog by engine (GPU vs CPU), exactly like the two tables below, with
models you've already downloaded floated to the top.
| Model | Size | Context | Best for |
|---|---|---|---|
| SmolLM 135M Instruct | 159 MB | 1.3K | Instant chat, tiny footprint |
| SmolLM2 360M Instruct new | 374 MB | 2K | Tiny but noticeably smarter than 135M |
| Qwen3 0.6B (INT4) new | 498 MB | 4K | Fast INT4 — snappier than the old Q8 small models |
| OLMo 2 1B Instruct new | 931 MB | 4K | Fully-open model (AI2), Q4 — light on RAM |
| Qwen2.5 0.5B Instruct | 521 MB | 1.3K | Lightweight reasoning |
| TinyLlama 1.1B Chat | 1.1 GB | 1.3K | Classic small chatbot |
| Qwen2.5 1.5B Instruct | 1.5 GB | 1.3K / 4K | Balanced default |
| DeepSeek-R1 Distill Qwen 1.5B | 1.78 GB | 1.3K / 4K | Step-by-step reasoning |
| Qwen3 1.7B recommended | 2.06 GB | 4K | Current size/quality sweet spot |
| Gemma 4 E2B IT 12 GB RAM | 2.6 GB | 4K | Google's flagship edge model — needs a 12 GB device (crashes on 8 GB) |
| Qwen3 4B Instruct 2507 (INT4) new | 2.66 GB | 4K | Strongest Qwen3 that fits a phone (8 GB RAM) |
| Phi-4 Mini Instruct strong tools | 3.77 GB | 1.3K / 4K | Strongest small Phi, best at tool calls |
| Model | Size | Context |
|---|---|---|
| Qwen3 0.6B Instruct | 396 MB | 32K |
| Qwen2.5 1.5B Instruct | 1.04 GB | 32K |
| Gemma 2 2B Instruct | 1.59 GB | 8K |
| Qwen2.5 3B Instruct | 1.80 GB | 32K |
| Llama 3.2 1B Instruct | 808 MB | 128K |
| Llama 3.2 3B Instruct | 1.88 GB | 128K |
| LFM2 700M (LiquidAI) | 469 MB | 32K |
| LFM2 1.2B (LiquidAI) fast on-device | 731 MB | 32K |
| LFM2.5 1.2B Instruct (LiquidAI) new | 731 MB | 32K |
| Qwen2.5 Coder 1.5B Instruct new | 986 MB | 32K |
| SmolLM2 1.7B Instruct | 1.06 GB | 8K |
| Qwen3 1.7B Instruct | 1.11 GB | 32K |
| Ministral 3B Instruct 2512 new | 2.15 GB | 32K |
| Gemma 3 4B IT QAT | 2.32 GB | 128K |
| Qwen3 4B Instruct | 2.33 GB | 32K |
| Phi-4 Mini Instruct | 2.32 GB | 128K |
| xLAM-2 3B (function-calling) non-commercial | 1.80 GB | 32K |
| Mistral 7B Instruct v0.3 | 4.37 GB | 32K |
| Qwen2.5 7B Instruct | 4.36 GB | 128K |
Three offline voice capabilities built on sherpa-onnx (Apache-2.0), wired as Knit's own backends — the same way llama.cpp and LiteRT-LM are. Audio is captured, transcribed, and synthesised entirely on the phone. Models download once from Settings → Voice.
Tap the mic in any chat → speak → Whisper-tiny transcribes locally → text drops in the input box. Replaces the system voice keyboard, which streams your audio to Google. ~101 MB model.
Whisper · sherpa-onnxFlip "Speak agent replies" and every answer is read aloud by an on-device VITS voice. Code blocks, HTML, and tool JSON are stripped before speaking. ~40 MB voice.
VITS-LJSpeech · sherpa-onnxTap 🎧 for a full-screen loop: Silero VAD detects when you stop talking → Whisper → your agent answers (full tool loop) → VITS speaks → back to listening. The mic pauses while it thinks so it never hears itself.
VAD → STT → agent → TTSEverything above runs on-device. But sometimes you want an agent to touch a real service — Slack, GitHub, Notion, your inbox at large. Knit speaks the Model Context Protocol as a remote client: link an MCP server and its tools appear to your agents, alongside the native ones. Off by default — Knit stays fully on-device until you flip the switch, and the UI is blunt that calls to these tools leave the phone.
Pick a provider from the built-in catalog — Composio (one key, 250+ apps), a dedicated Google Drive entry (search, read, create Drive files; the Google sign-in happens in the gateway dashboard, never in Knit), or any Smithery server — paste one API key, and the apps you've connected — Gmail, Slack, Instagram, Notion, GitHub, Drive — show up as tools. Or add any MCP server URL by hand.
Settings → Connections (MCP)Global switch is off until you enable it. Server URLs are HTTPS-only (localhost excepted for dev); API keys live in EncryptedSharedPreferences. Disable a server and its tools vanish on the next turn.
Off by defaultA remote tool can never shadow a built-in one — collisions are dropped on a normalised name so lookalikes can't impersonate the consent-gated Gmail send. Untrusted tool names/descriptions are sanitised before they ever reach the prompt (injection defense). Pipeline agents keep a fixed tool surface regardless of what's connected.
Built-in tools always win
Knit is layered. The Compose UI talks to ViewModels (Hilt + StateFlow). ViewModels talk to a single
InferenceBackend interface implemented by a dispatcher that routes to llama.cpp or
LiteRT-LM. Tools and RAG sit alongside, accessed through the agent loop.
A tool-using agent emits a single JSON object (optionally wrapped in a <tool_call> tag):
{"tool":"gmail.list_unread","args":{"max":10}}
The chat layer parses it, dispatches via RealToolRegistry, then appends the result back
into the conversation. The loop continues until the model emits plain text (final answer) or hits
MAX_TOOL_ITERATIONS = 25.
Small on-device models fumble JSON, arithmetic, and multi-step plans. Rather than hand-tune every
agent's prompt, Knit wraps generation in a reliability layer (ReliabilityRuntime) that
makes agents robust by construction. Four layers:
Trims history → system prompt → oversized pastes to the loaded model's real window before every call. Keeps prefill fast and stops context-overflow garbage. Parity-preserving when under budget.
Each tool declares its args; dispatch coerces stringy numbers, single→array, key
aliases, and returns a structured invalid_args the model can self-correct from. Docs
are generated from the schema — they never drift.
Accepts tags, truncated JSON (auto-balanced), <think> reasoning, and name
variants. A repeated-identical-call guard breaks loops instead of spinning.
Built-in pipeline agents run a declarative Playbook — the framework calls the tools
itself and asks the model only for judgment. A NumericVerifier flags any figure not
present in the tool results, so totals can't be fabricated.
Built for people who want AI without giving it their data. These are real workflows where the on-device + agent combination unlocks something cloud chatbots can't do (or shouldn't be trusted to).
Email Triage agent connects to Gmail, applies Priority/High labels to customer escalations and investor pings, ignores newsletters, and drafts replies to the urgent ones — all saved to Drafts. You glance, tap Send on each one.
Upload a contract PDF. Doc Q&A agent answers strictly from the document. Quotes the exact phrase. Refuses to speculate if the document doesn't cover something. No fear that the model will hallucinate a clause that isn't there.
Doc Q&A on the arXiv PDF, or Deep Researcher agent for open questions. Structured answers with confidence labels — "the data shows X, but only with the assumption of Y". The Memory tools let the agent remember conclusions across sessions.
Download a model on Wi-Fi. Loaded model lives in memory across backgrounding via a foreground service. Chat works on a flight, in a metro tunnel, at a remote site. No network, no degraded mode.
Tap 🎧 once, then just speak. Silero VAD knows when you've finished, Whisper transcribes, your agent answers, and a VITS voice reads the reply back — all offline, looping until you exit. No audio ever leaves the phone, unlike the system voice keyboard.
Quick Chat or custom-built journaling agent. Conversations sit in an SQLCipher-encrypted DB whose key never leaves the Android Keystore. Even a full device backup can't decrypt them without the Keystore root.
India Tax Helper agent. Plain-language answers grounded in actual Section references. Distinguishes old vs new tax regime. Always recommends verifying with a CA — never claims authority.
Tamil and Hindi Companion agents are bilingual. Mix languages mid-sentence — they follow your lead. Useful for Indian users who don't want to constantly switch keyboards.
Tap + New Agent → write a system prompt → drop in a knowledge file (optional) → enable tools (optional). Persisted to encrypted prefs, available in the picker immediately. No app rebuild needed.
.gguf sideload.txt / .pdf to DownloadsKnit-debug.apk from the GitHub Releases page.Knit doesn't ship a developer OAuth Client ID. You make your own in Google Cloud — quota and tokens stay yours.
gmail.readonly, gmail.modify, gmail.send) and add your Gmail
address as a Test user.
…apps.googleusercontent.com string). Open Knit →
Settings → Gmail (Email Triage) → paste it → Save → Connect Gmail.
If you'd rather build the APK yourself, the toolchain is pinned:
git clone https://github.com/folkadonis/knit.git
cd knit
./gradlew assembleDebug
# → app/build/outputs/apk/debug/app-debug.apk
Requirements: JDK 17, Android SDK 34, NDK 27.x (for llama.cpp native build). Gradle 8.10.2, AGP 8.8.2, Kotlin 2.2.0, KSP 2.3.6, Hilt 2.58, Room 2.7.2 — all pulled by the wrapper / catalog.
Entirely local. Models are downloaded from Hugging Face once; after that, every prompt and token is generated on the device CPU/GPU. Zero network traffic during chat.
SQLCipher-encrypted SQLite (AES-256). The DB key is generated on first run and stored in EncryptedSharedPreferences, wrapped by the Android Keystore master key. A phone backup can't decrypt them.
EncryptedFile (AES-256-GCM) on disk. Decrypted only at chunk time when the RAG retriever pulls relevant passages. Wiping the app clears them with no recovery path.
Access + refresh tokens in EncryptedSharedPreferences. Each user uses their own OAuth Client ID — no shared developer credential to exfiltrate.
Off by default. When enabled, the web_search tool queries your SearXNG instance (self-hostable, or a public default). Off → only network is model downloads.
Whisper transcription and VITS synthesis run on-device via sherpa-onnx. Your microphone audio is never uploaded — a deliberate departure from the system voice keyboard, which streams to Google.
Agent-written .txt / .pdf land in your Downloads/Knit/ folder via MediaStore. Created locally from the model's output — nothing is uploaded to make them.
Knit is the work of one developer figuring out what genuinely useful on-device AI looks like on a mid-range phone. Strong background in backend systems; new to Android development — which is part of why Knit's architecture stays pragmatic: simple stores, simple state flows, no premature abstractions.
| Layer | Tech |
|---|---|
| UI | Jetpack Compose + Material 3 + custom Knit theme |
| DI | Hilt 2.58 |
| Persistence | Room 2.7 (SQLCipher) + EncryptedSharedPreferences |
| LLM inference | llama.cpp (vendored, KleidiAI on) · LiteRT-LM 0.11.0 |
| Voice (STT/TTS/VAD) | sherpa-onnx 1.13.1 — Whisper · VITS · Silero (ONNX Runtime) |
| OAuth | AppAuth 0.11.1 (PKCE, reversed-client-ID redirect) |
| RAG | BM25 + TF-IDF hybrid retriever (hand-rolled) |
| PDF parsing | PDFBox-Android 2.0.27.0 |
| OCR | Google ML Kit Text Recognition |
| Networking | java.net.HttpURLConnection (no OkHttp dependency) |
| Build | Gradle 8.10.2 · AGP 8.8.2 · Kotlin 2.2.0 · KSP 2.3.6 · NDK 27.x |
App code: Apache 2.0. Models each carry their own license — Apache 2.0 (Qwen, SmolLM, TinyLlama), MIT (Phi-4, DeepSeek-R1 distill), Gemma terms (Gemma 2/3), Llama 3 Community (Llama 3.2), CC-BY-NC-4.0 (xLAM-2 — non-commercial only). LiteRT-LM: Apache 2.0 (Google). llama.cpp: MIT (Georgi Gerganov). sherpa-onnx: Apache 2.0 (k2-fsa). AppAuth: Apache 2.0.