diff --git a/docs/features/ai-knowledge/skills.md b/docs/features/ai-knowledge/skills.md index c69c43632..f8a3d5663 100644 --- a/docs/features/ai-knowledge/skills.md +++ b/docs/features/ai-knowledge/skills.md @@ -8,12 +8,20 @@ Skills are reusable, markdown-based instruction sets that you can attach to mode ## How Skills Work -Skills use a **lazy-loading** architecture to keep the model's context window efficient: +Skills behave differently depending on how they are activated: -1. **Manifest injection** — When a skill is active (either bound to a model or mentioned in chat), only a lightweight manifest containing the skill's **name** and **description** is injected into the system prompt. +### User-Selected Skills ($ Mention) + +When you mention a skill in chat with `$`, its **full content is injected directly** into the system prompt. The model has immediate access to the complete instructions without needing any extra tool calls. + +### Model-Attached Skills + +Skills bound to a model use a **lazy-loading** architecture to keep the context window efficient: + +1. **Manifest injection** — Only a lightweight manifest containing the skill's **name** and **description** is injected into the system prompt. 2. **On-demand loading** — The model receives a `view_skill` builtin tool. When it determines it needs a skill's full instructions, it calls `view_skill` with the skill name to load the complete content. -This design means that even if dozens of skills are available, only the ones the model actually needs are loaded into context. +This design means that even if many skills are attached to a model, only the ones the model actually needs are loaded into context. ## Creating a Skill @@ -23,8 +31,8 @@ Navigate to **Workspace → Skills** and click **+ New Skill**. | :--- | :--- | | **Name** | A human-readable display name (e.g., "Code Review Guidelines"). | | **Skill ID** | A unique slug identifier, auto-generated from the name (e.g., `code-review-guidelines`). Editable during creation, read-only afterwards. | -| **Description** | A short summary shown in the manifest. The model uses this to decide whether to load the full instructions. | -| **Content** | The full skill instructions in **Markdown**. This is the content loaded by `view_skill`. | +| **Description** | A short summary shown in the manifest. For model-attached skills, the model uses this to decide whether to load the full instructions. | +| **Content** | The full skill instructions in **Markdown**. For user-selected skills this is injected directly; for model-attached skills it is loaded on-demand via `view_skill`. | Click **Save & Create** to finalize. @@ -32,7 +40,7 @@ Click **Save & Create** to finalize. ### In Chat ($ Mention) -Type `$` in the chat input to open the skill picker. Select a skill, and it will be attached to the message as a **skill mention** (similar to `@` for models or `#` for knowledge). The skill manifest is injected for that conversation, and the model can call `view_skill` to load the full instructions when needed. +Type `$` in the chat input to open the skill picker. Select a skill, and it will be attached to the message as a **skill mention** (similar to `@` for models or `#` for knowledge). The skill's **full content** is injected directly into the conversation, giving the model immediate access to the complete instructions. ### Bound to a Model @@ -43,7 +51,7 @@ You can permanently attach skills to a model so they are always available: 3. Check the skills you want this model to always have access to. 4. Click **Save**. -When a user chats with that model, the selected skills' manifests are automatically injected. +When a user chats with that model, the selected skills' manifests (name and description) are automatically injected, and the model can load the full content on-demand via `view_skill`. ## Import and Export diff --git a/docs/features/extensibility/plugin/tools/index.mdx b/docs/features/extensibility/plugin/tools/index.mdx index a5aca6d5d..c2eec3275 100644 --- a/docs/features/extensibility/plugin/tools/index.mdx +++ b/docs/features/extensibility/plugin/tools/index.mdx @@ -176,7 +176,7 @@ These models excel at multi-step reasoning, proper JSON formatting, and autonomo | Tool | Purpose | |------|---------| -| **Search & Web** | *Requires `ENABLE_WEB_SEARCH` enabled.* | +| **Search & Web** | *Requires `ENABLE_WEB_SEARCH` enabled AND per-chat "Web Search" toggle enabled.* | | `search_web` | Search the public web for information. Best for current events, external references, or topics not covered in internal documents. | | `fetch_url` | Visits a URL and extracts text content via the Web Loader. | | **Knowledge Base** | *Requires per-model "Knowledge Base" category enabled (default: on).* | @@ -186,9 +186,11 @@ These models excel at multi-step reasoning, proper JSON formatting, and autonomo | `query_knowledge_files` | Search *file contents* inside KBs using vector search. **This is your main tool for finding information.** When a KB is attached to the model, searches are automatically scoped to that KB. | | `search_knowledge_files` | Search files across accessible knowledge bases by filename (not content). | | `view_knowledge_file` | Get the full content of a file from a knowledge base. | -| **Image Gen** | *Requires image generation enabled (per-tool).* | +| **Image Gen** | *Requires image generation enabled (per-tool) AND per-chat "Image Generation" toggle enabled.* | | `generate_image` | Generates a new image based on a prompt. Requires `ENABLE_IMAGE_GENERATION`. | | `edit_image` | Edits existing images based on a prompt and image URLs. Requires `ENABLE_IMAGE_EDIT`. | +| **Code Interpreter** | *Requires `ENABLE_CODE_INTERPRETER` enabled (default: on) AND per-chat "Code Interpreter" toggle enabled.* | +| `execute_code` | Executes code in a sandboxed environment and returns the output. | | **Memory** | *Requires Memory feature enabled AND per-model "Memory" category enabled (default: on).* | | `search_memories` | Searches the user's personal memory/personalization bank. | | `add_memory` | Stores a new fact in the user's personalization memory. | @@ -229,6 +231,8 @@ These models excel at multi-step reasoning, proper JSON formatting, and autonomo | **Image Gen** | | | | `generate_image` | `prompt` (required) | `{status, message, images}` — auto-displayed | | `edit_image` | `prompt` (required), `image_urls` (required) | `{status, message, images}` — auto-displayed | +| **Code Interpreter** | | | +| `execute_code` | `language` (required), `code` (required) | `{output, status}` | | **Memory** | | | | `search_memories` | `query` (required), `count` (default: 5) | Array of `{id, date, content}` | | `add_memory` | `content` (required) | `{status: "success", id}` | @@ -317,6 +321,9 @@ When the **Builtin Tools** capability is enabled, you can further control which | **Chat History** | `search_chats`, `view_chat` | Search and view user chat history | | **Notes** | `search_notes`, `view_note`, `write_note`, `replace_note_content` | Search, view, and manage user notes | | **Knowledge Base** | `list_knowledge_bases`, `search_knowledge_bases`, `query_knowledge_bases`, `search_knowledge_files`, `query_knowledge_files`, `view_knowledge_file` | Browse and query knowledge bases | +| **Web Search** | `search_web`, `fetch_url` | Search the web and fetch URL content | +| **Image Generation** | `generate_image`, `edit_image` | Generate and edit images | +| **Code Interpreter** | `execute_code` | Execute code in a sandboxed environment | | **Channels** | `search_channels`, `search_channel_messages`, `view_channel_message`, `view_channel_thread` | Search channels and channel messages | | **Skills** | `view_skill` | Load skill instructions on-demand from the manifest | @@ -339,6 +346,16 @@ These per-category toggles only appear when the main **Builtin Tools** capabilit Enabling a per-model category toggle does **not** override global feature flags. For example, if `ENABLE_NOTES` is disabled globally (Admin Panel), Notes tools will not be available even if the "Notes" category is enabled for the model. The per-model toggles only allow you to *further restrict* what's already available—they cannot enable features that are disabled at the global level. ::: +:::tip Per-Chat Feature Toggles (Web Search, Image Generation, Code Interpreter) +**Web Search**, **Image Generation**, and **Code Interpreter** built-in tools have an additional layer of control: the **per-chat feature toggle** in the chat input bar. For these tools to be injected in Native Mode, **all three conditions** must be met: + +1. **Global config enabled** — the feature is turned on in Admin Panel (e.g., `ENABLE_WEB_SEARCH`) +2. **Model capability enabled** — the model has the capability checked in Workspace > Models (e.g., "Web Search") +3. **Per-chat toggle enabled** — the user has activated the feature for this specific chat via the chat input bar toggles + +This means users can disable web search (or image generation, or code interpreter) on a per-conversation basis, even if it's enabled globally and on the model. This is useful for chats where information must stay offline or where you want to prevent unintended tool usage. +::: + :::tip Builtin Tools vs File Context **Builtin Tools** controls whether the model gets *tools* for autonomous retrieval. It does **not** control whether file content is injected via RAG—that's controlled by the separate **File Context** capability.