{"slug": "lend-your-ai-without-giving-away-your-keys", "title": "Lend your AI wIthout giving away your keys.", "summary": "The open-source project tokenbud released a desktop app that lets a host share access to a local or API-backed AI model through a 9-digit ID and password, without handing over the underlying API key. Hosts set a cap on concurrent users and an hourly prompt limit, and can revoke access by changing the password; prompts route through a Cloudflare Worker relay that stores only a password hash and deletes finished prompts after 10 minutes. The app supports local models in Ollama or LM Studio and API keys for Anthropic, OpenAI, Google Gemini, Mistral, Groq, DeepSeek, xAI, OpenRouter, or any OpenAI-compatible API, and its builds are not yet code-signed.", "body_md": "**Lend your AI. Keep your keys.**\n\nYou pay for a great AI, or you run one on your own computer. Now a friend, a teammate or a whole class wants a turn. tokenbud lets them, with an ID and a password. No key changes hands, no account is shared, and you can end it with one click.\n\n[**Download**](https://github.com/EagleMind/tokenbud/releases/latest) · [How it works](#how-it-works) · [Run your own relay](#run-your-own-relay) · [Build from source](#build-from-source)\n\nMost of the time, the AI you pay for sits idle. Meanwhile someone you know is stuck without one, or paying twice for something you already have. Until now, helping meant one of two bad choices: hand over your API key, the secret that unlocks your account and your bill, or set up a server and hope you got the security right.\n\n**tokenbud is the third way.** Open it, press **Share my agent**, and you get a 9-digit ID and a password. Read them out, text them, write them on a sticky note. The other person types them into tokenbud, or into a web page with nothing to install, and starts chatting with *your* AI as if it were their own.\n\nYou stay in charge the whole time:\n\n- **You set the limits.** Choose how many people can chat at once and how many questions you'll lend each hour. When the hour's budget is spent, sharing pauses on its own and they can see when it comes back.\n- **Your key never leaves your computer.** They get answers, never the secret behind them. Their questions are answered on your computer, by your model or your account.\n- **One click ends it.** Kick one person, or change the password and everyone is out.\n- **You don't set anything up.** tokenbud connects through a ready-made go-between that the project runs for you around the clock, so it works behind any home router. Prefer your own? You can[run your own](#run-your-own-relay) in a few minutes.\n\nThink of it as a library card for your AI: people borrow time, you keep the book.\n\n- **Simple to share.** A 9-digit ID and a password. A new password disconnects everyone.\n- **Seats you control.** Choose how many people can prompt at the same time; everyone else waits for a free seat.\n- **A reserve that protects you.** Lend at most N prompts an hour. Sharing pauses on its own, and people see when it resumes.\n- **Your model, your choice.** A local model in Ollama or LM Studio, or your own key for Anthropic, OpenAI, Google Gemini, Mistral, Groq, DeepSeek, xAI, OpenRouter, or any OpenAI-compatible API.\n- **Nothing to install for guests.** The default relay also serves a web client, and the desktop app does the same job.\n- **Local-first memory.** Chats and the facts you want the agent to know stay on your device, and are sent along only while you're connected.\n- **Agent to agent.**`tokenbud mcp` lets your own agent (Claude Code or any MCP client) prompt a shared one.\n- **Light and dark,** with a calm, flat look.\n\n| <sub>Chat with someone's agent. It can suggest facts to remember, and nothing is saved until you say so.</sub> | <sub>Pick what answers: a local model, or a provider with your own key.</sub> | \n\n```\n guest (app or browser) ──HTTPS──▶  relay  ◀──WebSocket── tokenbud (host) ──▶ your model\n                         ◀─answer──  Cloudflare Worker      ──answer───────▶   local or API\n```\n\n1. **The host app connects out** to a small relay on Cloudflare and gets an ID. No open ports, no port forwarding, works behind any router.\n2. **A guest opens a session** with the ID and password. The relay checks the password (it only stores a hash) and gives them a seat if one is free.\n3. **Prompts travel through the relay** to the host, which answers with its model and sends the answer back. Finished prompts are deleted from the relay after 10 minutes.\n\nEach host has its own Durable Object on the relay. It holds the password hash, the seat count and the live sessions, and nothing else.\n\nGet the latest installer for Windows, macOS or Linux from [**Releases**](https://github.com/EagleMind/tokenbud/releases/latest).\n\nThe builds are not code-signed yet, so Windows SmartScreen and macOS Gatekeeper ask for confirmation the first time.\n\nOpen tokenbud and click **Share my agent**. Sharing starts right away and shows your ID and password.\n\n- **People at the same time:** set the number of seats (1–50, default 3). You see who's connected and who's prompting, and can disconnect anyone.\n- **Copy link** gives guests the web client with your ID filled in; they only type the password.\n- **↻** makes a new password and disconnects everyone. The switch at the top stops sharing.\n\nClick **Connect to an agent**, or open the relay's address in a browser. Enter the ID and password and start chatting. Start as many chats as you like; follow-ups keep their context. Closing the window or tab gives your seat back.\n\nThe ⚙ button opens Settings:\n\n- **Model.** Where answers come from (see below).\n- **Reserve.** Lend at most N prompts an hour (default 30, rolling). It also shows what you've lent.\n- **Relay.** The default relay (a Cloudflare Worker run by the project), or your own.\n- **Appearance.** Light, dark, or match the system.\n\nThe window opens at one size for both modes, remembers the size and position you leave it at, and the layout adapts to the width.\n\n| Choice | What it uses | Notes | \n|---|---|---|\n| **This computer** | [Ollama](https://ollama.com) ,[LM Studio](https://lmstudio.ai) , or any OpenAI-compatible server | Found automatically on their usual ports. Free and private. | \n| **A provider** | Anthropic, OpenAI, Google Gemini, Mistral, Groq, DeepSeek, xAI, OpenRouter, or Custom | Your own API key, one per provider, kept in the OS keychain. The model list comes from the provider. | \n| **Claude Code** | Your own Claude Code login | Development builds only, for testing on your own machine. See [Using it within the rules](#using-it-within-the-rules) . | \n\nAnswers from reasoning models arrive without their `<think>` sections.\n\nYour chats and a short list of facts about you (\"Writes Rust\", \"Prefers short answers\") are kept **only on your device**: in the app's config folder, or in the browser's IndexedDB.\n\n- **Facts travel with each prompt** to the agent you're connected to, so it answers knowing you.\n- **The agent can suggest a fact** , which appears as a**Remember / Not now** chip.\n- **Open Memory** in the sidebar to add, edit or delete facts, or to switch memory off.\n\nThe same executable is also an MCP server, so Claude Code or any MCP client can prompt a shared agent:\n\n```\nclaude mcp add tokenbud -e TOKENBUD_ID=418203977 -e TOKENBUD_PASSWORD=k7m2pqxa -- tokenbud mcp\n```\n\nIt adds one tool, `ask(prompt)`. Each call takes a seat only while it runs.\n\ntokenbud uses the project's relay by default, a Cloudflare Worker that is kept running for everyone. You can also run your own on Cloudflare's free plan in a few minutes, and then only the people you choose share it.\n\n**You need** a free [Cloudflare account](https://dash.cloudflare.com/sign-up) and [Node.js](https://nodejs.org) 20 or later.\n\n```\ngit clone <this repository> tokenbud\ncd tokenbud/desktop && npm install      # the web client is built from here\ncd ../relay && npm install\nnpx wrangler login                      # opens the browser once\nnpm run deploy                          # builds the web client, then deploys the Worker\n```\n\nThe deploy prints your relay's address, such as `https://tokenbud-relay.<you>.workers.dev`. Then:\n\n1. In tokenbud, open **Settings → Relay** , choose**My own relay** , paste the address, and click**Use this relay** . The app checks that it's a tokenbud relay before switching.\n2. Everyone you share with, and everyone you connect to, has to use the same relay. Guests can also simply open the relay's address in a browser.\n3. You get a separate ID on each relay. Your ID on the default relay is kept.\n\nGood to know:\n\n- **Free plan limits.** The Workers free plan allows about 100,000 requests a day. A connected guest checks in about every 15 seconds, so that's roughly 15 to 20 people connected all day. The $5 paid plan removes the worry.\n- **Custom domain.** Add one in the Cloudflare dashboard if you'd like a nicer address.\n- **Environment override.**`TOKENBUD_RELAY=https://…` overrides the setting, which is handy for scripts and testing.\n- **Updates.** Run`npm run deploy` again after updating tokenbud.\n\nTo make your relay the default in builds you hand out, change `DEFAULT_RELAY_URL` in `crates/tokenbud-core/src/lib.rs`.\n\nYou need Rust 1.90 or later and Node.js 20 or later. On Linux, also the [Tauri prerequisites](https://v2.tauri.app/start/prerequisites/).\n\n```\ncd desktop && npm install && npm run build && cd ..\ncargo build --release\n```\n\nThe app is `target/release/tokenbud`. To make installers, run `npm run bundle` in `desktop/`. For a release on GitHub, push a version tag: the [release workflow](https://github.com/EagleMind/tokenbud/blob/main/.github/workflows/release.yml) builds Windows, macOS and Linux installers and attaches them to a draft release.\n\n```\ngit tag v0.1.0 && git push origin v0.1.0\n```\n\ntokenbud never sees or moves a credential. But model providers decide what their accounts may be used for, so here's how each choice fits:\n\n- **Local models** involve no provider at all.\n- **Provider keys** are meant for building on, including for other people. You're responsible for how your key is used, and providers forbid reselling access, so share, don't sell.\n- **Claude subscriptions** (Free, Pro, Max) are for individual use. Anthropic's terms don't allow answering other people's prompts with them. That's why the Claude Code engine exists only in development builds. To share Claude, use an Anthropic API key.\n\n- The relay stores only hashes: salted PBKDF2 for passwords, SHA-256 for host secrets and session tokens. Ten wrong passwords in a minute from one address lock out that address only, so nobody can block a host's other guests.\n- An unknown ID and a wrong password get the same answer, so IDs can't be probed.\n- Web client tabs keep only their session token, never the password. A refresh resumes the same seat; closing the tab frees it within 45 seconds.\n- The desktop app and the web client have a Content Security Policy, so answers can't load outside images or scripts.\n- The relay sees prompts and answers in transit and deletes finished ones after 10 minutes. Run your own relay if that matters to you.\n- Keys and secrets live in the OS keychain (Windows Credential Manager, macOS Keychain, Linux keyring).\n- With a local model, prompts never leave the two computers and the relay.\n\n| Path | What it is | \n|---|---|\n| `apps/desktop` | **tokenbud** , the desktop app (Tauri 2): host and client modes, and`tokenbud mcp` | \n| `apps/tokenbud-host` | Sharing: the relay connection, seats, the reserve, and the model engines | \n| `apps/tokenbud-client` | Connecting by ID and password, and the MCP server | \n| `crates/tokenbud-core` | Wire types, relay client, settings and keychain storage | \n| `relay/` | The Cloudflare Worker: web client at `/` , API at`/v1` | \n| `desktop/` | All the UI: React, Tailwind and shadcn/ui. `src/app` is the desktop window,`src/web` the browser client | \n\n## **Development**\n\n```\ncd relay && npm run dev           # relay + web client on :8787\ncd desktop && npm run app         # the desktop app with hot reload\ncd desktop && npm run dev:web     # web client with hot reload on :1422 (proxies /v1 to :8787)\ncd desktop && npm run preview:ui  # the app's UI in a browser with sample data\n```\n\nRun the app against the local relay with `TOKENBUD_RELAY=http://127.0.0.1:8787`.\n\n- `TOKENBUD_HOME=/some/dir` keeps an instance's settings in that folder, so several can run on one machine.\n- `cargo run -p tokenbud-host --example share` shares from a terminal and prints the ID and password. It's useful for testing without the window.\n\nIn the UI preview, `?steps=host,settings:model` clicks through to a screen, `?theme=dark` forces dark mode, and `?connect=1` shows the connect screen. The README screenshots are taken that way.\n\n## **Relay API**\n\n| Method and path | Auth | Purpose | \n|---|---|---|\n| `POST /v1/hosts` | none | New host: returns `host_id` (9 digits) and`host_secret` . | \n| `GET /v1/hosts/:id/connect` (WebSocket) | host secret | The host's channel. | \n| `POST /v1/hosts/:id/sessions``{password, name}` | none | Take a seat. Returns `session_token` . 401 wrong ID or password, 409 no free seat, 429 too many tries, 503 not sharing. | \n| `DELETE /v1/hosts/:id/sessions` | session | Leave. | \n| `GET /v1/hosts/:id/ping` | session | Keep the seat (every 15 s; 45 s without one ends the session). Returns `online` and`paused` . | \n| `POST /v1/hosts/:id/ask``{prompt, history, context?}` | session | Send a prompt. `context` carries the guest's memory (at most 10 KB). 409 if one is already running, 503 while paused. | \n| `GET /v1/hosts/:id/jobs/:job?wait=25` | session | The answer, with long-polling. | \n| `GET /health` | none | `{\"service\": \"tokenbud-relay\"}` | \n\nErrors are JSON: `{\"error\": \"A sentence for people.\", \"code\": \"wrong_password\"}`. Decide on `code`, never on the sentence. The codes are `wrong_password`, `rate_limited`, `seats_full`, `busy`, `not_sharing`, `paused`, `session_ended`, `too_large`, `bad_request` and `not_found`. Request bodies are limited to 1.5 MB.\n\nOn the WebSocket:\n\n- **The host sends**`config {password, seats, name}` ,`pause {paused}` ,`kick {session_id}` and`result {job_id, status, text?, error?}` .\n- **The relay sends**`sessions` ,`job` and`cancel` .\n\ntokenbud is a hobby project, maintained when time allows. Issues and pull requests are welcome; small and focused ones are easiest to review. [CONTRIBUTING.md](https://github.com/EagleMind/tokenbud/blob/main/CONTRIBUTING.md) has the setup, the checks CI runs, and the code style. Changes are listed in the [changelog](https://github.com/EagleMind/tokenbud/blob/main/CHANGELOG.md).\n\n[MIT](https://github.com/EagleMind/tokenbud/blob/main/LICENSE). Model providers' own terms still apply to the keys and accounts you use with it.", "url": "https://wpnews.pro/news/lend-your-ai-without-giving-away-your-keys", "canonical_source": "https://github.com/EagleMind/tokenbud", "published_at": "2026-10-19 09:50:14+00:00", "updated_at": "2026-10-19 10:15:38.872447+00:00", "lang": "en", "topics": ["ai-tools", "ai-agents", "agent-protocols", "ai-products"], "entities": ["tokenbud", "Ollama", "LM Studio", "Anthropic", "OpenAI", "Google Gemini", "Mistral", "Cloudflare"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/lend-your-ai-without-giving-away-your-keys", "markdown": "https://wpnews.pro/news/lend-your-ai-without-giving-away-your-keys.md", "text": "https://wpnews.pro/news/lend-your-ai-without-giving-away-your-keys.txt", "jsonld": "https://wpnews.pro/news/lend-your-ai-without-giving-away-your-keys.jsonld"}}