Assistant
The ⌘J sidebar that runs on each member's own API key for Claude, OpenAI, Gemini and other providers.
The assistant is a chat sidebar. Open it from any workspace page with ⌘J (Ctrl+J on Windows and Linux), or with Assistant in the navigation. Each member adds their own API key for a model provider, and the assistant uses a model through that key. It works in Knotworking through the MCP server, with that member's permissions.
The agent loop runs on the API server with the Vercel AI SDK, so you bring your own API key from any supported provider, and usage is billed to that key's account.
Who gets it
The assistant is the assistant module. Owners and admins have it, and give it to others under Settings, Members, Module access.
If you would rather use an agent platform you already have, such as Claude, ChatGPT, Claude Code or Codex, connect it to the MCP server instead, as described in Agents and MCP. The sidebar is for people who want a chat inside Knotworking without that setup.
Providers
A member can add a key for Claude, OpenAI, Google Gemini, Mistral, xAI Grok, Groq or DeepSeek.
The model must support tool calling. A model that rejects tools fails the turn with the provider's own error. Providers that need more than one credential, such as Azure OpenAI and Amazon Bedrock, and generic OpenAI-compatible endpoints are not offered yet.
Setup
- In the app, open the user menu and choose Assistant. You need the assistant module in at least one workspace.
- Under Your API keys, choose a provider and paste a key from that provider's console. The server checks it by listing the provider's models, and only then stores it. The first key you save becomes your default provider.
- Optionally choose a model for new chats, from the provider's list or by typing any model id. Choose what the assistant may do, Read and change things, as you or Only look things up, and which modules' tools it gets under Tools it can use. The default modules are tasks, docs and time.
Usage is billed to your account with the provider. Knotworking adds no spend limit beyond the step cap and timeout under How a turn runs. The tool choice only narrows what the assistant is offered, and your own permissions still decide what works.
Keys and privacy
- A key is sealed at rest with AES-256-GCM under a key derived from
BETTER_AUTH_SECRET, bound to its owner and provider so a copied ciphertext won't open. Rotating that secret makes stored keys unreadable, and members add them again. - Nothing returns a key. The API shows the provider, the last four characters, the model and when it was saved.
- A key is decrypted only inside a turn and passed to the provider. Provider errors are shown with the key removed.
- Key routes refuse API tokens, so nothing holding a token can read, replace or spend a member's key. The same goes for chats.
- Chats are personal. They are never synced to teammates, and another member's chat doesn't exist as far as you are concerned.
- What you ask, and what the assistant reads to answer, is sent to the provider whose key you added. Choose the provider accordingly.
How a turn runs
- The browser sends the prompt along with the page the person has open. If a reply is already running in that chat it is refused, and so is a chat with no key or model.
- The server decrypts the member's key and makes a token for them: their permissions at the scope they chose, valid for 15 minutes, hidden from their token list and with no person-only actions, so no sign-offs or approvals.
- It runs the model with the Knotworking MCP tools only: no files, shell or web. The model starts with a small core of tools and loads a module's tools when it needs them. A turn stops after 12 rounds of tool calls or 10 minutes.
- Text and tool calls stream back to the browser as they happen. However the turn ends, by finishing, an error, Stop or a timeout, the temporary token is revoked.
Page titles are written by members, so they reach the model only as a quoted note marked as data, never in the system prompt. A chat can switch provider or model between messages, because only text is replayed, not tool calls.
Limits
- Replies run in the server process that took the prompt. If it stops, the reply ends with an error and the member sends it again.
- There are no tool approvals in the browser yet. The assistant can use the tools its token allows and nothing else, and sign-offs and approvals stay refused.
- There are no spend controls. Cost is whatever the member's own account with the provider allows, and a member can have 3 replies running at once.
The server reaches the MCP server at MCP_INTERNAL_URL, which the Compose file sets for you.