Apps ask for a use, not a model: inside the AI Hub of our self-hosted app store A developer built an AI Hub for a self-hosted app store that centralizes model access behind a single front door, so no app holds an API key or picks a model. Apps request abstract "uses" (smart, fast, local, coder, hear, transcribe, listen, speak, music) that the owner maps to models once, with callers arriving through four doors: apps, agents via MCP, OpenAI-style endpoints, and people. The hub runs Ollama, cloud APIs, and on-device speech engines under one memory budget on a 24 GB Mac, and the developer notes Ollama's default 4,096-token context silently truncates chats, so the hub now requests 16k context per request. Every app wants AI now, and each one arrives with its own model, its own API key and its own settings. In our self-hosted app store, three apps a video editor, an English-practice chat and a music studio had each loaded their own copy of Whisper, and every new AI feature started with the same question: which key goes where? So we went the other way: no app holds an AI key, and no app picks a model. Every app and every agent goes through one front door, the AI Hub , and the owner decides there which model answers, what an AI may do, and what is kept on record. This post walks through how it's built: the doors, the "use" abstraction, the tool layer with a human in the loop, the engines that run on the Mac's GPU and Neural Engine, and the single memory budget that keeps it all on one 24 GB Mac. There's an 8-minute video too, recorded live on the real apps: smart , fast , local , coder , hear , transcribe , listen , speak , music , never a model. The owner maps each use to a model once, for every app. read , write or danger . A A few numbers from the research behind the video: And the hopeful one: when a company offers a managed way in, people take it. The share of AI users on personal accounts fell from 78% to 47% in a year same Netskope report . Banning AI doesn't work. Giving it one governed door does. Four kinds of callers come in through four doors: | Door | Who uses it | Endpoint | |---|---|---| | Apps | every app in the store, through the shared library reflex ddns auth.ai | /api/ai/ | | Agents | Claude Code, Codex, Cursor, your own MCP client | /api/mcp Streamable HTTP | | OpenAI-style | anything you can point at a base URL | /api/v1/ | | People | the assistant inside any app, and a talking AI | pages of the hub | Behind the doors the hub keeps four things: the uses and the models they map to, the tools of every installed app, the records , and the memory budget . Below it are the places answers are actually made: Ollama on the same machine, cloud APIs with your own key, the hub's own speech models, and engines on the Mac itself. This is the idea everything else hangs on. An app never says "Claude Opus" or "qwen2.5:7b". It says what kind of help it needs: python from reflex ddns auth import ai once, next to app = rx.App ... : what this app asks each use for, in plain words ai.uses app, smart="The assistant panel's answers", coder="Writing or fixing a cell ⌘I ", fast="The grey suggestions while typing" later, anywhere in the app's backend reply = ai.stream "coder", system="You edit one cell of a notebook...", messages= {"role": "user", "content": "..."} , user="someone@example.com" async for piece in reply: the answer as it is written ... reply.model e.g. "Claude claude-opus-5-5 ", for the app's badge On the hub's Uses page the owner decides, once for every app, which model answers each use, plus a backup for chat uses and an override for a single app if needed: A few things fall out of this almost for free: ai.uses show up on the hub's page, so the owner sees "Captions from what is said in a project's videos" instead of an opaque API key. reply.model names it. An answer that fails halfway fails; it isn't silently stitched together from two models. The hub reaches models through Anthropic's SDK, Ollama's own chat API, or any OpenAI-style source OpenAI, OpenRouter, Gemini, Groq, DeepSeek, LM Studio, llama.cpp . Adding a source is a form on a page: a name, an address and a key. One gotcha worth sharing: Ollama's default context is 4,096 tokens, and it silently drops the start of the chat when you go over. With an app's guide and tool schemas in the prompt, that left almost no room. The hub now asks Ollama for a 16k context on every request. Apps don't only use AI; they also lend their abilities to it. A tool is one decorator on a function in the app: python from reflex ddns auth.tools import tool from reflex ddns auth import rooms @tool app, "cad.run preview", kind="write", params={"room": "The room."} async def run preview ctx, room: str = "default" - dict: """Builds the room's model and shows it in every tab of the room.""" async with rooms.change CadState, room as cad: everyone in the room sees the change ... return {"ok": True} The app serves / ddns tool/manifest and / ddns tool/call/