AI Assistant
The AI assistant operates within the browser interface and also provides a Command Line Interface (CLI) that can be accessed either from the host or within a space.
Enabling the Chat Interface
To enable the chat interface, add the following configuration to the knot.toml file:
[server.chat]
enabled = true
provider = "ollama" # openai, claude, gemini, ollama, mistral, zai or grok
model = "qwen3:4b"
max_tokens = 4096
temperature = 0.7
reasoning_effort = "low"
ui_style = "avatar"
openai_endpoints = trueFor any other OpenAI-compatible server, such as a local LM Studio or llama.cpp, set type and base_url instead of provider:
[server.chat]
enabled = true
type = "openai"
base_url = "http://localhost:8085/v1/"
model = "Qwen3-4B-Thinking-2507-GGUF:Q4_0"Configuration Options
enabled: Must be set totrueto activate the web assistant.provider: The AI provider —openai,claude,gemini,ollama,mistral,zai, orgrok. On its own it’s all that’s needed:base_urldefaults to the provider’s API (e.g.http://127.0.0.1:11434/v1for Ollama).type: The API protocol of the server atbase_url—openai,anthropic,google,ollama, orxai— for servers that aren’t a provider’s own API. Takes precedence overprovider. Without abase_url,openaiandollamaassume a server athttp://127.0.0.1:11434/v1(also the default when neitherprovidernortypeis set), whileanthropic,googleandxaiuse that provider’s own API address.base_url: The address of the server hosting the LLM; overrides the provider’s default. (openai_base_urlis a deprecated alias.)api_key: The API key required to authenticate with the LLM server. (openai_api_keyis a deprecated alias.)model: The model to be used (defaultqwen2.5-coder:14b). The assistant’s performance depends on the selected model.max_tokens: The maximum number of tokens the model may generate per response.0(the default) sends no limit, so the provider’s own applies.temperature: Sampling temperature. Left unset (the default), none is sent and the provider’s default applies; leave it unset for reasoning models, which reject a temperature.system_prompt_file: Path to a file whose contents are used as the system prompt (see System Prompt).reasoning_effort: Controls the level of effort applied by the model for reasoning, there’s no default. Options are:nonelowmediumhigh
ui_style: Defines the style of the assistant’s chat icon. Options are:icon(default)avatar
openai_endpoints: If set totrue, the Knot server will expose an OpenAI-compatible endpoint at the/v1/path. This allows any client to connect to the Knot server, chat with the assistant, and use tools.
Each option can also be set with a knot server flag or an environment variable:
| Option | Flag | Environment variable |
|---|---|---|
enabled |
--chat-enabled |
KNOT_CHAT_ENABLED |
provider |
--chat-provider |
KNOT_CHAT_PROVIDER |
type |
--chat-type |
KNOT_CHAT_TYPE |
base_url |
--chat-base-url |
KNOT_CHAT_BASE_URL |
api_key |
--chat-api-key |
KNOT_CHAT_API_KEY |
model |
--chat-model |
KNOT_CHAT_MODEL |
max_tokens |
--chat-max-tokens |
KNOT_CHAT_MAX_TOKENS |
temperature |
--chat-temperature |
KNOT_CHAT_TEMPERATURE |
system_prompt_file |
--chat-system-prompt-file |
KNOT_CHAT_SYSTEM_PROMPT_FILE |
reasoning_effort |
--chat-reasoning-effort |
KNOT_CHAT_REASONING_EFFORT |
ui_style |
--chat-ui-style |
KNOT_CHAT_UI_STYLE |
openai_endpoints |
--chat-openai-endpoints |
KNOT_CHAT_OPENAI_ENDPOINTS |
If you are using a non-thinking model then do not set reasoning_effort in the configuration as usually this will stop the model from working.
Tool Approvals
When the web assistant wants to run a write-capable tool, Knot pauses the tool call and shows a confirmation box at the bottom of the current chat message stream. The user can approve or deny the tool call before it executes.
Approvals are only used by the web chat flow. External MCP clients that connect to /mcp continue to use the normal MCP protocol and are not prompted by the browser approval UI.
Pending approvals are stored in memory on the Knot instance that started the tool call. In clustered deployments behind a load balancer, the approval request includes the originating instance ID. If the approval response reaches a different Knot instance, Knot forwards it to the origin over cluster gossip.
Supported Models
The assistant is confirmed to work with the following models:
gpt-oss 20B(via LM Studio)Gemini 2.5 Flash