Skip to content

Commit 500526a

Browse files
authored
Merge pull request #1077 from open-webui/dev
0.8.2
2 parents 9ae1ad8 + 3237822 commit 500526a

7 files changed

Lines changed: 175 additions & 31 deletions

File tree

docs/features/ai-knowledge/skills.md

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ Skills are reusable, markdown-based instruction sets that you can attach to mode
88

99
## How Skills Work
1010

11-
Skills use a **lazy-loading** architecture to keep the model's context window efficient:
11+
Skills behave differently depending on how they are activated:
1212

13-
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.
13+
### User-Selected Skills ($ Mention)
14+
15+
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.
16+
17+
### Model-Attached Skills
18+
19+
Skills bound to a model use a **lazy-loading** architecture to keep the context window efficient:
20+
21+
1. **Manifest injection** — Only a lightweight manifest containing the skill's **name** and **description** is injected into the system prompt.
1422
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.
1523

16-
This design means that even if dozens of skills are available, only the ones the model actually needs are loaded into context.
24+
This design means that even if many skills are attached to a model, only the ones the model actually needs are loaded into context.
1725

1826
## Creating a Skill
1927

@@ -23,16 +31,16 @@ Navigate to **Workspace → Skills** and click **+ New Skill**.
2331
| :--- | :--- |
2432
| **Name** | A human-readable display name (e.g., "Code Review Guidelines"). |
2533
| **Skill ID** | A unique slug identifier, auto-generated from the name (e.g., `code-review-guidelines`). Editable during creation, read-only afterwards. |
26-
| **Description** | A short summary shown in the manifest. The model uses this to decide whether to load the full instructions. |
27-
| **Content** | The full skill instructions in **Markdown**. This is the content loaded by `view_skill`. |
34+
| **Description** | A short summary shown in the manifest. For model-attached skills, the model uses this to decide whether to load the full instructions. |
35+
| **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`. |
2836

2937
Click **Save & Create** to finalize.
3038

3139
## Using Skills
3240

3341
### In Chat ($ Mention)
3442

35-
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.
43+
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.
3644

3745
### Bound to a Model
3846

@@ -43,7 +51,7 @@ You can permanently attach skills to a model so they are always available:
4351
3. Check the skills you want this model to always have access to.
4452
4. Click **Save**.
4553

46-
When a user chats with that model, the selected skills' manifests are automatically injected.
54+
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`.
4755

4856
## Import and Export
4957

docs/features/extensibility/open-terminal/index.md

Lines changed: 91 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ title: "Open Terminal"
77

88
:::info
99

10-
This page is up-to-date with Open Terminal release version [v0.2.1](https://github.com/open-webui/open-terminal).
10+
This page is up-to-date with Open Terminal release version [v0.2.3](https://github.com/open-webui/open-terminal).
1111

1212
:::
1313

@@ -72,6 +72,32 @@ open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key
7272
Running bare metal gives the model shell access to your actual machine. Only use this for local development or testing.
7373
:::
7474

75+
### MCP Server Mode
76+
77+
Open Terminal can also run as an [MCP (Model Context Protocol)](/features/extensibility/plugin/tools/openapi-servers/mcp) server, exposing all its endpoints as MCP tools. This requires an additional dependency:
78+
79+
```bash
80+
pip install open-terminal[mcp]
81+
```
82+
83+
Then start the MCP server:
84+
85+
```bash
86+
# stdio transport (default — for local MCP clients)
87+
open-terminal mcp
88+
89+
# streamable-http transport (for remote/networked MCP clients)
90+
open-terminal mcp --transport streamable-http --host 0.0.0.0 --port 8000
91+
```
92+
93+
| Option | Default | Description |
94+
| :--- | :--- | :--- |
95+
| `--transport` | `stdio` | Transport mode: `stdio` or `streamable-http` |
96+
| `--host` | `0.0.0.0` | Bind address (streamable-http only) |
97+
| `--port` | `8000` | Bind port (streamable-http only) |
98+
99+
Under the hood, this uses [FastMCP](https://github.com/jlowin/fastmcp) to automatically convert every FastAPI endpoint into an MCP tool — no manual tool definitions needed.
100+
75101
### Docker Compose (with Open WebUI)
76102

77103
```yaml title="docker-compose.yml"
@@ -154,8 +180,10 @@ The `/execute` endpoint description in the OpenAPI spec automatically includes l
154180

155181
**Query parameters:**
156182

157-
| Parameter | Type | Default | Description |
158-
| :--- | :--- | :--- | :--- |
183+
| Parameter | Default | Description |
184+
| :--- | :--- | :--- |
185+
| `stream` | `false` | If `true`, stream output as JSONL instead of waiting for completion |
186+
| `tail` | (all) | Return only the last N output entries. Useful to limit response size for AI agents. |
159187
| `wait` | number | `null` | Seconds to wait for the command to finish before returning (0–300). If the command completes in time, output is included inline. `null` to return immediately. |
160188
| `tail` | integer | `null` | Return only the last N output entries. Useful to keep responses bounded. |
161189

@@ -205,6 +233,31 @@ curl -X POST "http://localhost:8000/execute?wait=5" \
205233
}
206234
```
207235

236+
:::info File-Backed Process Output
237+
All background process output (stdout/stderr) is persisted to JSONL log files under `~/.open-terminal/logs/processes/`. This means output is never lost, even if the server restarts. The response includes `next_offset` for stateless incremental polling — pass it as the `offset` query parameter on subsequent status requests to get only new output. The `log_path` field shows the path to the raw JSONL log file.
238+
:::
239+
240+
### Search File Contents
241+
242+
**`GET /files/search`**
243+
244+
Search for a text pattern across files in a directory. Returns structured matches with file paths, line numbers, and matching lines. Skips binary files automatically.
245+
246+
**Query parameters:**
247+
248+
| Parameter | Type | Default | Description |
249+
| :--- | :--- | :--- | :--- |
250+
| `query` | string | (required) | Text or regex pattern to search for |
251+
| `path` | string | `.` | Directory or file to search in |
252+
| `regex` | boolean | `false` | Treat query as a regex pattern |
253+
| `case_insensitive` | boolean | `false` | Perform case-insensitive matching |
254+
| `include` | string[] | (all files) | Glob patterns to filter files (e.g. `*.py`). Files must match at least one pattern. |
255+
| `match_per_line` | boolean | `true` | If true, return each matching line with line numbers. If false, return only matching filenames. |
256+
| `max_results` | integer | `50` | Maximum number of matches to return (1–500) |
257+
258+
```bash
259+
curl "http://localhost:8000/files/search?query=TODO&include=*.py&case_insensitive=true" \
260+
208261
#### Get Command Status
209262
210263
**`GET /execute/{process_id}/status`**
@@ -427,9 +480,10 @@ curl "http://localhost:8000/files/search?query=TODO&path=/home/user/project&incl
427480
```json
428481
{
429482
"query": "TODO",
430-
"path": "/home/user/project",
483+
"path": "/root",
431484
"matches": [
432-
{"file": "/home/user/project/main.py", "line": 42, "content": "# TODO: refactor this"}
485+
{"file": "/root/app.py", "line": 42, "content": "# TODO: refactor this"},
486+
{"file": "/root/utils.py", "line": 7, "content": "# TODO: add tests"}
433487
],
434488
"truncated": false
435489
}
@@ -492,6 +546,38 @@ curl "http://localhost:8000/files/download/link?path=/home/user/output.csv" \
492546
{"url": "http://localhost:8000/files/download/a1b2c3d4..."}
493547
```
494548

549+
### Process Status (Background)
550+
551+
**`GET /processes/{process_id}/status`**
552+
553+
Poll the output of a running or finished background process. Uses offset-based pagination so agents can retrieve only new output since the last poll.
554+
555+
**Query parameters:**
556+
557+
| Parameter | Default | Description |
558+
| :--- | :--- | :--- |
559+
| `wait` | `0` | Seconds to wait for the process to finish before returning. |
560+
| `offset` | `0` | Number of output entries to skip. Use `next_offset` from the previous response. |
561+
| `tail` | (all) | Return only the last N output entries. Useful to limit response size. |
562+
563+
```bash
564+
curl "http://localhost:8000/processes/a1b2c3d4/status?offset=0&tail=20" \
565+
-H "Authorization: Bearer <api-key>"
566+
```
567+
568+
```json
569+
{
570+
"id": "a1b2c3d4",
571+
"command": "make build",
572+
"status": "running",
573+
"exit_code": null,
574+
"output": [{"type": "stdout", "data": "Building...\n"}],
575+
"truncated": false,
576+
"next_offset": 1,
577+
"log_path": "/root/.open-terminal/logs/processes/a1b2c3d4.jsonl"
578+
}
579+
```
580+
495581
### Health Check
496582

497583
**`GET /health`**

docs/features/extensibility/plugin/tools/index.mdx

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ These models excel at multi-step reasoning, proper JSON formatting, and autonomo
176176

177177
| Tool | Purpose |
178178
|------|---------|
179-
| **Search & Web** | *Requires `ENABLE_WEB_SEARCH` enabled.* |
179+
| **Search & Web** | *Requires `ENABLE_WEB_SEARCH` enabled AND per-chat "Web Search" toggle enabled.* |
180180
| `search_web` | Search the public web for information. Best for current events, external references, or topics not covered in internal documents. |
181181
| `fetch_url` | Visits a URL and extracts text content via the Web Loader. |
182182
| **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
186186
| `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. |
187187
| `search_knowledge_files` | Search files across accessible knowledge bases by filename (not content). |
188188
| `view_knowledge_file` | Get the full content of a file from a knowledge base. |
189-
| **Image Gen** | *Requires image generation enabled (per-tool).* |
189+
| **Image Gen** | *Requires image generation enabled (per-tool) AND per-chat "Image Generation" toggle enabled.* |
190190
| `generate_image` | Generates a new image based on a prompt. Requires `ENABLE_IMAGE_GENERATION`. |
191191
| `edit_image` | Edits existing images based on a prompt and image URLs. Requires `ENABLE_IMAGE_EDIT`. |
192+
| **Code Interpreter** | *Requires `ENABLE_CODE_INTERPRETER` enabled (default: on) AND per-chat "Code Interpreter" toggle enabled.* |
193+
| `execute_code` | Executes code in a sandboxed environment and returns the output. |
192194
| **Memory** | *Requires Memory feature enabled AND per-model "Memory" category enabled (default: on).* |
193195
| `search_memories` | Searches the user's personal memory/personalization bank. |
194196
| `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
229231
| **Image Gen** | | |
230232
| `generate_image` | `prompt` (required) | `{status, message, images}` — auto-displayed |
231233
| `edit_image` | `prompt` (required), `image_urls` (required) | `{status, message, images}` — auto-displayed |
234+
| **Code Interpreter** | | |
235+
| `execute_code` | `language` (required), `code` (required) | `{output, status}` |
232236
| **Memory** | | |
233237
| `search_memories` | `query` (required), `count` (default: 5) | Array of `{id, date, content}` |
234238
| `add_memory` | `content` (required) | `{status: "success", id}` |
@@ -317,6 +321,9 @@ When the **Builtin Tools** capability is enabled, you can further control which
317321
| **Chat History** | `search_chats`, `view_chat` | Search and view user chat history |
318322
| **Notes** | `search_notes`, `view_note`, `write_note`, `replace_note_content` | Search, view, and manage user notes |
319323
| **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 |
324+
| **Web Search** | `search_web`, `fetch_url` | Search the web and fetch URL content |
325+
| **Image Generation** | `generate_image`, `edit_image` | Generate and edit images |
326+
| **Code Interpreter** | `execute_code` | Execute code in a sandboxed environment |
320327
| **Channels** | `search_channels`, `search_channel_messages`, `view_channel_message`, `view_channel_thread` | Search channels and channel messages |
321328
| **Skills** | `view_skill` | Load skill instructions on-demand from the manifest |
322329

@@ -339,6 +346,20 @@ These per-category toggles only appear when the main **Builtin Tools** capabilit
339346
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.
340347
:::
341348

349+
:::tip Per-Chat Feature Toggles (Web Search, Image Generation, Code Interpreter)
350+
**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:
351+
352+
1. **Global config enabled** — the feature is turned on in Admin Panel (e.g., `ENABLE_WEB_SEARCH`)
353+
2. **Model capability enabled** — the model has the capability checked in Workspace > Models (e.g., "Web Search")
354+
3. **Per-chat toggle enabled** — the user has activated the feature for this specific chat via the chat input bar toggles
355+
356+
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.
357+
:::
358+
359+
:::tip Full Agentic Experience
360+
For the best out-of-the-box agentic experience, administrators can enable **Web Search**, **Image Generation**, and **Code Interpreter** as default features for a model. In the **Admin Panel > Settings > Models**, find the **Model Specific Settings** for your target model and toggle these three on under **Default Features**. This ensures they are active in every new chat by default, so users get the full tool-calling experience without manually enabling each toggle. Users can still turn them off per-chat if needed.
361+
:::
362+
342363
:::tip Builtin Tools vs File Context
343364
**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.
344365

0 commit comments

Comments
 (0)