Merge pull request #1078 from Classic298/dev

Dev
This commit is contained in:
Classic298
2026-02-16 00:41:59 +01:00
committed by GitHub
5 changed files with 100 additions and 10 deletions

View File

@@ -7,7 +7,7 @@ title: "Open Terminal"
:::info
This page is up-to-date with Open Terminal release version [v0.2.1](https://github.com/open-webui/open-terminal).
This page is up-to-date with Open Terminal release version [v0.2.3](https://github.com/open-webui/open-terminal).
:::
@@ -72,6 +72,32 @@ open-terminal run --host 0.0.0.0 --port 8000 --api-key your-secret-key
Running bare metal gives the model shell access to your actual machine. Only use this for local development or testing.
:::
### MCP Server Mode
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:
```bash
pip install open-terminal[mcp]
```
Then start the MCP server:
```bash
# stdio transport (default — for local MCP clients)
open-terminal mcp
# streamable-http transport (for remote/networked MCP clients)
open-terminal mcp --transport streamable-http --host 0.0.0.0 --port 8000
```
| Option | Default | Description |
| :--- | :--- | :--- |
| `--transport` | `stdio` | Transport mode: `stdio` or `streamable-http` |
| `--host` | `0.0.0.0` | Bind address (streamable-http only) |
| `--port` | `8000` | Bind port (streamable-http only) |
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.
### Docker Compose (with Open WebUI)
```yaml title="docker-compose.yml"
@@ -154,8 +180,10 @@ The `/execute` endpoint description in the OpenAPI spec automatically includes l
**Query parameters:**
| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| Parameter | Default | Description |
| :--- | :--- | :--- |
| `stream` | `false` | If `true`, stream output as JSONL instead of waiting for completion |
| `tail` | (all) | Return only the last N output entries. Useful to limit response size for AI agents. |
| `wait` | number | `null` | Seconds to wait for the command to finish before returning (0300). If the command completes in time, output is included inline. `null` to return immediately. |
| `tail` | integer | `null` | Return only the last N output entries. Useful to keep responses bounded. |
@@ -205,6 +233,31 @@ curl -X POST "http://localhost:8000/execute?wait=5" \
}
```
:::info File-Backed Process Output
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.
:::
### Search File Contents
**`GET /files/search`**
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.
**Query parameters:**
| Parameter | Type | Default | Description |
| :--- | :--- | :--- | :--- |
| `query` | string | (required) | Text or regex pattern to search for |
| `path` | string | `.` | Directory or file to search in |
| `regex` | boolean | `false` | Treat query as a regex pattern |
| `case_insensitive` | boolean | `false` | Perform case-insensitive matching |
| `include` | string[] | (all files) | Glob patterns to filter files (e.g. `*.py`). Files must match at least one pattern. |
| `match_per_line` | boolean | `true` | If true, return each matching line with line numbers. If false, return only matching filenames. |
| `max_results` | integer | `50` | Maximum number of matches to return (1500) |
```bash
curl "http://localhost:8000/files/search?query=TODO&include=*.py&case_insensitive=true" \
#### Get Command Status
**`GET /execute/{process_id}/status`**
@@ -427,9 +480,10 @@ curl "http://localhost:8000/files/search?query=TODO&path=/home/user/project&incl
```json
{
"query": "TODO",
"path": "/home/user/project",
"path": "/root",
"matches": [
{"file": "/home/user/project/main.py", "line": 42, "content": "# TODO: refactor this"}
{"file": "/root/app.py", "line": 42, "content": "# TODO: refactor this"},
{"file": "/root/utils.py", "line": 7, "content": "# TODO: add tests"}
],
"truncated": false
}
@@ -492,6 +546,38 @@ curl "http://localhost:8000/files/download/link?path=/home/user/output.csv" \
{"url": "http://localhost:8000/files/download/a1b2c3d4..."}
```
### Process Status (Background)
**`GET /processes/{process_id}/status`**
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.
**Query parameters:**
| Parameter | Default | Description |
| :--- | :--- | :--- |
| `wait` | `0` | Seconds to wait for the process to finish before returning. |
| `offset` | `0` | Number of output entries to skip. Use `next_offset` from the previous response. |
| `tail` | (all) | Return only the last N output entries. Useful to limit response size. |
```bash
curl "http://localhost:8000/processes/a1b2c3d4/status?offset=0&tail=20" \
-H "Authorization: Bearer <api-key>"
```
```json
{
"id": "a1b2c3d4",
"command": "make build",
"status": "running",
"exit_code": null,
"output": [{"type": "stdout", "data": "Building...\n"}],
"truncated": false,
"next_offset": 1,
"log_path": "/root/.open-terminal/logs/processes/a1b2c3d4.jsonl"
}
```
### Health Check
**`GET /health`**

View File

@@ -356,6 +356,10 @@ Enabling a per-model category toggle does **not** override global feature flags.
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 Full Agentic Experience
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.
:::
:::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.

View File

@@ -23,7 +23,7 @@ docker pull ghcr.io/open-webui/open-webui:main-slim
You can also pull a specific Open WebUI release version directly by using a versioned image tag. This is recommended for production environments to ensure stable and reproducible deployments.
```bash
docker pull ghcr.io/open-webui/open-webui:v0.8.0
docker pull ghcr.io/open-webui/open-webui:v0.8.2
```
## Step 2: Run the Container

View File

@@ -99,9 +99,9 @@ ghcr.io/open-webui/open-webui:<RELEASE_VERSION>-<TYPE>
Examples (pinned versions for illustration purposes only):
```
ghcr.io/open-webui/open-webui:v0.8.0
ghcr.io/open-webui/open-webui:v0.8.0-ollama
ghcr.io/open-webui/open-webui:v0.8.0-cuda
ghcr.io/open-webui/open-webui:v0.8.2
ghcr.io/open-webui/open-webui:v0.8.2-ollama
ghcr.io/open-webui/open-webui:v0.8.2-cuda
```
### Using the Dev Branch 🌙

View File

@@ -12,7 +12,7 @@ As new variables are introduced, this page will be updated to reflect the growin
:::info
This page is up-to-date with Open WebUI release version [v0.8.0](https://github.com/open-webui/open-webui/releases/tag/v0.8.0), but is still a work in progress to later include more accurate descriptions, listing out options available for environment variables, defaults, and improving descriptions.
This page is up-to-date with Open WebUI release version [v0.8.2](https://github.com/open-webui/open-webui/releases/tag/v0.8.2), but is still a work in progress to later include more accurate descriptions, listing out options available for environment variables, defaults, and improving descriptions.
:::