Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ VITE_DEFAULT_LANGUAGE=en
# ── LLM(模型接入) ──────────────────────────────────────────────────────────
# 模型配置存数据库(不走 env):启动后在 Web「设置 → 系统管理 → 模型服务」
# 填 OpenAI 兼容端点(base_url / api_key / 模型名),或本地单机模式跑
# `hugagent onboard` 交互引导。
# `hugagent-server onboard` 交互引导。

# ── 互联网搜索(可选;也可在「设置 → 系统管理 → 服务配置」里配,DB 优先) ──
# INTERNET_SEARCH_ENGINE=tavily # tavily / baidu / langsearch
# INTERNET_SEARCH_ENGINE=tavily # tavily / baidu / langsearch / deepseek
# TAVILY_API_KEY=
# BAIDU_API_KEY=
# LANGSEARCH_API_KEY=
# DEEPSEEK_SEARCH_API_KEY=

# ── 存储(社区版:本地文件) ─────────────────────────────────────────────────
STORAGE_TYPE=s3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -252,11 +252,11 @@ curl -fsSL https://raw.githubusercontent.com/ZJU-REAL/HugAgentOS/main/install.sh
The installer clones the source into `~/.hugagent/source`, creates an isolated
Python environment, builds the web app and runs the first-time setup wizard, then
opens [http://127.0.0.1:3001](http://127.0.0.1:3001). Start it again later with
`~/.hugagent/venv/bin/hugagent`.
`~/.hugagent/venv/bin/hugagent-server`.

> [!WARNING]
> It listens on `127.0.0.1` only by default. If you really need remote access, use
> `hugagent serve --host 0.0.0.0 --port 3001 --no-browser`, and set up a strong
> `hugagent-server serve --host 0.0.0.0 --port 3001 --no-browser`, and set up a strong
> password, a firewall and HTTPS first. Don't expose it directly on an untrusted network.

The one-command install uses SQLite, in-process state and a local subprocess
Expand Down
4 changes: 2 additions & 2 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -220,11 +220,11 @@ curl -fsSL https://raw.githubusercontent.com/ZJU-REAL/HugAgentOS/main/install.sh

安装器会把源码拉到 `~/.hugagent/source`,创建隔离 Python 环境、构建 Web 应用并进入
首次配置向导,完成后打开 [http://127.0.0.1:3001](http://127.0.0.1:3001)。之后用
`~/.hugagent/venv/bin/hugagent` 再次启动。
`~/.hugagent/venv/bin/hugagent-server` 再次启动。

> [!WARNING]
> 默认仅监听 `127.0.0.1`。确需远程访问时用
> `hugagent serve --host 0.0.0.0 --port 3001 --no-browser`,并先配置强密码、防火墙
> `hugagent-server serve --host 0.0.0.0 --port 3001 --no-browser`,并先配置强密码、防火墙
> 与 HTTPS,不要直接暴露在不受信任的网络中。

一键安装使用 SQLite、进程内状态与本地子进程沙箱,适合试用与开发;选项与故障
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ services:
TAVILY_API_KEY: ${TAVILY_API_KEY:-}
BAIDU_API_KEY: ${BAIDU_API_KEY:-}
LANGSEARCH_API_KEY: ${LANGSEARCH_API_KEY:-}
DEEPSEEK_SEARCH_API_KEY: ${DEEPSEEK_SEARCH_API_KEY:-}
MEM0_ENABLED: ${MEM0_ENABLED:-false}
MEM0_GRAPH_ENABLED: ${MEM0_GRAPH_ENABLED:-false}
MEMORY_MODEL_URL: ${MEMORY_MODEL_URL:-}
Expand Down Expand Up @@ -291,6 +292,7 @@ services:
TAVILY_API_KEY: ${TAVILY_API_KEY:-}
BAIDU_API_KEY: ${BAIDU_API_KEY:-}
LANGSEARCH_API_KEY: ${LANGSEARCH_API_KEY:-}
DEEPSEEK_SEARCH_API_KEY: ${DEEPSEEK_SEARCH_API_KEY:-}
QUERY_DATABASE_URL: ${QUERY_DATABASE_URL:-}
QUERY_DATABASE_TIMEOUT_SECONDS: ${QUERY_DATABASE_TIMEOUT_SECONDS:-}
QUERY_DATABASE_RETRY_TIMES: ${QUERY_DATABASE_RETRY_TIMES:-}
Expand Down
6 changes: 5 additions & 1 deletion docker/object-storage/compose.object-storage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ services:
MINIO_ROOT_PASSWORD: ${S3_SECRET_KEY:?Set a random S3_SECRET_KEY}
volumes:
- object_storage_data:/data
networks: [hugagent-network]
# Personal Agent object mounts run s3fs in a helper on the compute network.
networks: [hugagent-network, personal-agent-compute]
healthcheck:
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:9000/minio/health/live', timeout=5).read()"]
interval: 10s
Expand Down Expand Up @@ -42,5 +43,8 @@ services:
mcp:
depends_on:
object-storage-init: {condition: service_completed_successfully}
networks:
personal-agent-compute:
name: ${COMPOSE_PROJECT_NAME:-hugagent}_personal-agent-compute
volumes:
object_storage_data:
3 changes: 2 additions & 1 deletion document/en/deployment/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -184,10 +184,11 @@ the database has no value.
| `MCP_HOST` | `mcp` (compose default) | MCP container hostname; set `127.0.0.1` for local debugging | CE |
| `MCP_MARKET_REVALIDATE_INTERVAL` | `21600` | Remote MCP marketplace snapshot revalidation interval in seconds (minimum `300`) | CE |
| `MCP_SELF_SERVICE_ALLOW_PRIVATE_NETWORK` | `false` | Allow users to add MCP endpoints on loopback, RFC1918, or IPv6 ULA addresses; enable only in trusted private deployments. Cloud-metadata/link-local ranges stay blocked, and users cannot submit private endpoints to the marketplace | CE |
| `INTERNET_SEARCH_ENGINE` | `tavily` (compose default) | Internet search engine: `tavily` / `baidu` / `langsearch` | CE |
| `INTERNET_SEARCH_ENGINE` | `tavily` (compose default) | Internet search engine: `tavily` / `baidu` / `langsearch` / `deepseek` | CE |
| `TAVILY_API_KEY` | (empty) | Tavily Search API key; required when Tavily is selected | CE |
| `BAIDU_API_KEY` | (empty) | Baidu search API key; required when Baidu is selected | CE |
| `LANGSEARCH_API_KEY` | (empty) | LangSearch Web Search API key; required when LangSearch is selected | CE |
| `DEEPSEEK_SEARCH_API_KEY` | (empty) | DeepSeek platform API key used for the Search API; required when DeepSeek is selected | CE |
| `INTERNET_SEARCH_COUNTRY` / `INTERNET_SEARCH_AUTO_PARAMETERS` | (empty) | Tavily country ranking preference (general only; omitted when unset) / automatic parameters | CE |
| `QUERY_DATABASE_URL` | `http://your-database-api-host:6200` | HTTP backend for the data-warehouse query tool | EE (industry tool) |
| `QUERY_DATABASE_TIMEOUT_SECONDS` / `QUERY_DATABASE_RETRY_TIMES` / `QUERY_DATABASE_MAX_OUTPUT_TOKENS` | (empty) | Data-warehouse call parameters | EE |
Expand Down
28 changes: 14 additions & 14 deletions document/en/deployment/quick-install.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ The installer will:
3. Detect and install `bubblewrap` on Linux, or verify the system `sandbox-exec` on macOS; installation fails when the sandbox backend is unavailable instead of falling back to raw execution;
4. Detect optional LibreOffice and, when it is missing, explain the unavailable features and ask whether to install it; skipping it or a failed install doesn't block the remaining features;
5. Create a virtual environment at `~/.hugagent/venv` (using [uv](https://github.com/astral-sh/uv) when available, or `python -m venv` otherwise), and rebuild an incomplete environment left by an interrupted run;
6. Install `requirements.txt`, the `hugagent` console command, the built-in Agent Skills Python and Node.js dependencies, and optional local knowledge-base dependencies;
6. Install `requirements.txt`, the `hugagent-server` console command, the built-in Agent Skills Python and Node.js dependencies, and optional local knowledge-base dependencies;
7. Build the frontend at `src/frontend/dist`;
8. Enter the interactive first-run wizard.

Expand Down Expand Up @@ -75,16 +75,16 @@ restore a plugin that a user deliberately removed.
**Step 4 (optional) · File parser** — parsing uploaded PDFs / scanned documents needs an external parser service (MinerU-compatible); enter its API URL to enable it (written to `file_parser.api_url`), or press Enter to skip. Excel / CSV / PPTX / text parse in-process and need none of this.

**Step 5 (optional) · Internet search** — agent web search needs a search
engine key. Select `tavily` (default), `baidu` (Qianfan AppBuilder), or
`langsearch`, and enter the API key for the selected engine. Press Enter to
engine key. Select `tavily` (default), `baidu` (Qianfan AppBuilder),
`langsearch`, or `deepseek`, and enter the API key for the selected engine. Press Enter to
skip this step. You can also configure it later under **Settings → System →
Service Config**.

At the end the wizard prints a **host-capability summary** (whether Node.js, pandoc, and LibreOffice are present, gating React site-building, Word conversion, and PPT/Word online previews), then starts the server and opens `http://127.0.0.1:3001/`.

> **Warning:** The server listens on `127.0.0.1` by default. If the server must
> accept remote connections, run
> `hugagent serve --host 0.0.0.0 --port 3001 --no-browser`, and configure a
> `hugagent-server serve --host 0.0.0.0 --port 3001 --no-browser`, and configure a
> strong administrator password, a firewall, and HTTPS first. Don't expose the
> service directly on an untrusted network.

Expand All @@ -93,7 +93,7 @@ At the end the wizard prints a **host-capability summary** (whether Node.js, pan
`onboard` accepts bypass flags for scripted installs:

```bash
hugagent onboard \
hugagent-server onboard \
--username admin --password '<strong-password>' \
--model-base-url https://api.deepseek.com/v1 \
--model-api-key '<your-key>' --model-name deepseek-chat \
Expand All @@ -109,10 +109,10 @@ hugagent onboard \
## Daily use

```bash
hugagent # initialized → start server and open browser; not initialized → enter the wizard
hugagent serve # start explicitly (--host to change bind address, --port to change port)
hugagent onboard # re-run the wizard / change configuration
hugagent doctor # environment self-check (Python version, port availability, data dir, frontend build, deps, …)
hugagent-server # initialized → start server and open browser; not initialized → enter the wizard
hugagent-server serve # start explicitly (--host to change bind address, --port to change port)
hugagent-server onboard # re-run the wizard / change configuration
hugagent-server doctor # environment self-check (Python version, port availability, data dir, frontend build, deps, …)
```

## Data directory
Expand Down Expand Up @@ -166,16 +166,16 @@ The no-Docker single-machine mode is built to be lightweight. Here is how it dif

| Symptom | Fix |
|---|---|
| Startup reports the port is in use | `hugagent serve --port <other-port>`; or run `hugagent doctor` first to check |
| Startup reports the port is in use | `hugagent-server serve --port <other-port>`; or run `hugagent-server doctor` first to check |
| The page shows JSON instead of the app | Frontend not built: `cd src/frontend && npm run build`, or set `FRONTEND_DIST_DIR` to a built `dist` |
| Login reports the model is unavailable | Re-run `hugagent onboard` to reconfigure the model (the wizard tests connectivity) |
| Login reports the model is unavailable | Re-run `hugagent-server onboard` to reconfigure the model (the wizard tests connectivity) |
| Startup logs repeatedly report `AllocTimestamp` / `Method not implemented` | Stop the service and rerun the public one-command installer. The installer reconciles PyMilvus and Milvus Lite to compatible versions without deleting `~/.hugagent/milvus.db`. |
| Want to switch model / change config | Re-run `hugagent onboard`, or log in and adjust under Settings → System → Model Services / Service Config |
| Want to switch model / change config | Re-run `hugagent-server onboard`, or log in and adjust under Settings → System → Model Services / Service Config |
| PPT/Word preview reports that LibreOffice isn't installed | Re-run the one-command installer and choose to install it when prompted. On Debian/Ubuntu, you can instead run `sudo apt-get update && sudo apt-get install -y libreoffice-impress libreoffice-writer libreoffice-calc`, then restart HugAgentOS. |
| bash reports a missing OS sandbox runner | Install `bubblewrap` on Linux (`sudo apt-get install bubblewrap` on Debian/Ubuntu), then restart. Until it is installed, every preset except *Full access* refuses host commands outright — by design, rather than running them unconfined. |
| bash reports that this system cannot enforce the policy | The preset asks for isolation beyond what this platform provides — the Windows low-integrity sandbox cannot narrow reads, and cannot cut the network without administrator rights. Relax the corresponding setting (for example move the *network* category from *block* back to *confirm*), or use a platform that offers the capability. |
| Skill execution repeatedly reports `fork: Resource temporarily unavailable` | Stop the current service, rerun the public installer to upgrade, and start `hugagent` again. If an older version left child processes behind, inspect processes owned by the current user and, when needed, sign out of the login session before retrying. |
| Is the environment ready | `hugagent doctor` runs a one-shot self-check |
| Skill execution repeatedly reports `fork: Resource temporarily unavailable` | Stop the current service, rerun the public installer to upgrade, and start `hugagent-server` again. If an older version left child processes behind, inspect processes owned by the current user and, when needed, sign out of the login session before retrying. |
| Is the environment ready | `hugagent-server doctor` runs a one-shot self-check |

## Related source

Expand Down
2 changes: 1 addition & 1 deletion document/en/getting-started/quick-start.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ After setup, HugAgentOS starts automatically and opens
Run the installed command whenever you want to start the application again:

```bash
~/.hugagent/venv/bin/hugagent
~/.hugagent/venv/bin/hugagent-server
```

You can add the command to your shell path:
Expand Down
2 changes: 1 addition & 1 deletion document/en/modules/auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ ontology validation.
`users_shadow.metadata`. Refreshing or signing in again doesn't repeat a
completed setup flow.

The terminal-based `hugagent onboard` command already configures the account
The terminal-based `hugagent-server onboard` command already configures the account
and model. After it finishes successfully, it writes the same completion
marker so the browser doesn't repeat the setup.

Expand Down
5 changes: 4 additions & 1 deletion document/en/modules/mcp-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ It is the only **per-request** server: for each chat request the backend injects
### internet_search — web search (CE)

`internet_search(query, queries, max_results, topic, search_depth, include_raw_content)`
selects Tavily, Baidu, or LangSearch through `INTERNET_SEARCH_ENGINE`, reading only the selected API key.
selects Tavily, Baidu, LangSearch, or DeepSeek through `INTERNET_SEARCH_ENGINE`, reading only the selected API key.
Supply either one `query` or up to four distinct `queries`. Queries run concurrently; results are interleaved
in input-query order and deduplicated by URL, with at most eight sources. The default is five;
set `max_results=8` for research. Sources are not filtered by language. Tavily receives a country preference
Expand All @@ -91,6 +91,9 @@ only when explicitly configured and `topic=general`; there is no implicit China
Public information and technical research can use search directly. Internal business questions prioritize
the relevant internal authority. When snippets cannot support a key claim, use `web_fetch` to verify the
original page. Tavily supports topic, depth and raw content; LangSearch maps summary to content.
DeepSeek maps summary to content and `include_raw_content` to page content, limits each query to 128 characters
(`query_too_long`), restricts `topic=news` to the last 30 days with `after:` (dropping undated pages), and drops
rows with `rerank_score` below 0.5.

The single source list is `result.results`, with title, URL, content, available publication date, retrieval
time and matched query indices. Baidu's original date is preserved as `date_raw`; retrieval time never
Expand Down
2 changes: 2 additions & 0 deletions document/en/modules/personal-agent.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,8 @@ Personal Agent manages the user's HugAgentOS projects, chats and runs with one t
The cloud computer includes the lightweight `hugagent` CLI. It manages existing backends.
Web clients and desktop cloud mode share `cloud`. Desktop local mode uses `device:<id>`.

Inside the cloud computer this client is called `hugagent`. Installed anywhere else (a `pip install` of the backend source, or the wheel built by `scripts/build-hugagent-cli.py`), the same client is the `hugagent-session` command with the same options. On a workstation, `hugagent` is the terminal client (`packages/cli`). The local server's `onboard`, `serve`, `doctor` and `engine` commands belong to `hugagent-server`; the session client only points you there when it receives one.

```bash
hugagent device list
hugagent --target cloud chat list
Expand Down
3 changes: 2 additions & 1 deletion document/zh-CN/deployment/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,10 +182,11 @@ Config 管理台会分别保存 Dify、FastGPT、WeKnora 的 URL、API Key 与
| `MCP_HOST` | `mcp`(compose 默认) | MCP 容器主机名;本地调试可设 `127.0.0.1` | CE |
| `MCP_MARKET_REVALIDATE_INTERVAL` | `21600` | MCP 市场远程工具快照复检周期(秒,最小 `300`) | CE |
| `MCP_SELF_SERVICE_ALLOW_PRIVATE_NETWORK` | `false` | 是否允许用户自助添加回环、RFC1918 或 IPv6 ULA 地址上的 MCP;仅应在用户可信的私有化环境开启,云元数据/链路本地等高风险地址仍会拦截,私有地址也不能由用户申请上架市场 | CE |
| `INTERNET_SEARCH_ENGINE` | `tavily`(compose 默认) | 联网搜索引擎:`tavily` / `baidu` / `langsearch` | CE |
| `INTERNET_SEARCH_ENGINE` | `tavily`(compose 默认) | 联网搜索引擎:`tavily` / `baidu` / `langsearch` / `deepseek` | CE |
| `TAVILY_API_KEY` | (空) | Tavily Search API Key;选择 Tavily 时必填 | CE |
| `BAIDU_API_KEY` | (空) | 百度搜索 API Key;选择百度时必填 | CE |
| `LANGSEARCH_API_KEY` | (空) | LangSearch Web Search API Key;选择 LangSearch 时必填 | CE |
| `DEEPSEEK_SEARCH_API_KEY` | (空) | 调用 Search API 的 DeepSeek 开放平台 API Key;选择 DeepSeek 时必填 | CE |
| `INTERNET_SEARCH_COUNTRY` / `INTERNET_SEARCH_AUTO_PARAMETERS` | (空) | Tavily 国家排名偏好(仅 general,未配置则不传)/ 自动参数 | CE |
| `QUERY_DATABASE_URL` | `http://your-database-api-host:6200` | 数仓查询工具的 HTTP 后端 | EE(行业工具) |
| `QUERY_DATABASE_TIMEOUT_SECONDS` / `QUERY_DATABASE_RETRY_TIMES` / `QUERY_DATABASE_MAX_OUTPUT_TOKENS` | (空) | 数仓查询调用参数 | EE |
Expand Down
Loading
Loading