This commit is contained in:
+50
-48
@@ -1,44 +1,46 @@
|
||||
English | [日本語](getting-started.ja.md)
|
||||
|
||||
# Getting Started
|
||||
|
||||
MAESTRO を起動して最初のタスクを動かすまでのガイド。設定項目の詳細は
|
||||
[configuration.md](configuration.md)、全体構造は [architecture.md](architecture.md) を参照。
|
||||
A guide that takes you from launching MAESTRO to running your first task. For setting details see
|
||||
[configuration.md](configuration.md), and for the overall structure see [architecture.md](architecture.md).
|
||||
|
||||
## 1. 前提
|
||||
## 1. Prerequisites
|
||||
|
||||
- **Node.js 22 以上**
|
||||
- **OpenAI 互換の LLM エンドポイント** — 例: [Ollama](https://ollama.com/)(`http://localhost:11434/v1`)、vLLM など。MAESTRO 自体のビルド/テストには不要だが、タスク実行には必要。
|
||||
- **任意(Bash サンドボックス用)**: `bwrap`(bubblewrap, 非特権 user namespace が有効なこと)と `python3`/`pip`。マルチユーザー運用では有効化を推奨([operations/bash-sandbox-provisioning.md](operations/bash-sandbox-provisioning.md))。
|
||||
- **Node.js 22 or later**
|
||||
- **An OpenAI-compatible LLM endpoint** — e.g. [Ollama](https://ollama.com/) (`http://localhost:11434/v1`), vLLM, etc. Not needed to build/test MAESTRO itself, but required to run tasks.
|
||||
- **Optional (for the Bash sandbox)**: `bwrap` (bubblewrap, with unprivileged user namespaces enabled) and `python3`/`pip`. Enabling it is recommended for multi-user operation ([operations/bash-sandbox-provisioning.md](operations/bash-sandbox-provisioning.md)).
|
||||
|
||||
## 2. インストール(ソースから)
|
||||
## 2. Install (from source)
|
||||
|
||||
```bash
|
||||
git clone https://gitea.example.com/your-org/maestro.git
|
||||
cd maestro
|
||||
npm ci # バックエンド依存
|
||||
npm --prefix ui ci # UI 依存
|
||||
npm ci # backend dependencies
|
||||
npm --prefix ui ci # UI dependencies
|
||||
```
|
||||
|
||||
## 3. 最小設定(対話ウィザード)
|
||||
## 3. Minimal configuration (interactive wizard)
|
||||
|
||||
`npm run setup` で LLM 接続先を対話的に設定し、最小の `config.yaml` を生成する。
|
||||
`npm run setup` interactively configures the LLM connection target and generates a minimal `config.yaml`.
|
||||
|
||||
```bash
|
||||
npm run setup
|
||||
```
|
||||
|
||||
- 接続タイプ(`direct` = Ollama/vLLM 等 / `aao_gateway` = 別 MAESTRO Gateway 経由)を選ぶ。
|
||||
- LLM endpoint URL(例 `http://localhost:11434/v1`)を入力。接続を確認し、見つかったモデルから選択できる(接続できなくてもモデル名を手入力して続行可能)。
|
||||
- `aao_gateway` の場合は API キー(`sk-aao-...`)も入力する(`config.yaml` に保存され、権限は 0600)。
|
||||
- 最後に MAESTRO サーバーの listen port(既定 9876)を設定する。
|
||||
- Choose the connection type (`direct` = Ollama/vLLM, etc. / `aao_gateway` = via a separate MAESTRO Gateway).
|
||||
- Enter the LLM endpoint URL (e.g. `http://localhost:11434/v1`). It checks the connection and lets you select from the discovered models (you can continue by entering a model name manually even if the connection fails).
|
||||
- For `aao_gateway`, also enter the API key (`sk-aao-...`) (it is saved in `config.yaml` with permission 0600).
|
||||
- Finally, set the listen port of the MAESTRO server (default 9876).
|
||||
|
||||
非対話(Docker / CI):
|
||||
Non-interactive (Docker / CI):
|
||||
|
||||
```bash
|
||||
SETUP_LLM_ENDPOINT=http://localhost:11434/v1 SETUP_MODEL=qwen3:14b npm run setup -- --yes
|
||||
```
|
||||
|
||||
```bash
|
||||
# 別 MAESTRO Gateway 経由の場合
|
||||
# Via a separate MAESTRO Gateway
|
||||
SETUP_CONNECTION_TYPE=aao_gateway \
|
||||
SETUP_LLM_ENDPOINT=http://gateway-host:9876/v1 \
|
||||
SETUP_LLM_API_KEY=sk-aao-... \
|
||||
@@ -46,62 +48,62 @@ SETUP_CONNECTION_TYPE=aao_gateway \
|
||||
npm run setup -- --yes
|
||||
```
|
||||
|
||||
詳細設定(複数ワーカー・tools・auth など)は生成後に `config.yaml` を直接編集するか、起動後の Settings UI で行う。`config.yaml.example` に全項目の説明がある。
|
||||
For advanced settings (multiple workers, tools, auth, etc.), edit `config.yaml` directly after generation, or use the Settings UI after launch. `config.yaml.example` documents every option.
|
||||
|
||||
## 4. ビルドと起動
|
||||
## 4. Build and launch
|
||||
|
||||
```bash
|
||||
scripts/build-all.sh # バックエンド(dist/) と UI(ui/dist/) をビルド
|
||||
scripts/server.sh start # ビルド + 起動(PID 管理付き)
|
||||
scripts/build-all.sh # build the backend (dist/) and the UI (ui/dist/)
|
||||
scripts/server.sh start # build + launch (with PID management)
|
||||
```
|
||||
|
||||
ブラウザで **http://localhost:9876** を開く。
|
||||
Open **http://localhost:9876** in your browser.
|
||||
|
||||
サーバー管理:
|
||||
Server management:
|
||||
|
||||
```bash
|
||||
scripts/server.sh status # 状態確認
|
||||
scripts/server.sh logs # ログを tail -f
|
||||
scripts/server.sh status # check status
|
||||
scripts/server.sh logs # tail -f the logs
|
||||
scripts/server.sh restart
|
||||
scripts/server.sh stop
|
||||
```
|
||||
|
||||
> `scripts/build-all.sh` は最後に Bash サンドボックス用 Python パッケージ
|
||||
> (`runtime/python-requirements.txt`)を自動でプリベイクする。スキップするには
|
||||
> `--skip-python`。システム Python への書き込みに権限が要る環境では
|
||||
> `sudo bash scripts/prebake-python.sh` を別途実行する。
|
||||
> At the end, `scripts/build-all.sh` automatically pre-bakes the Python packages for the Bash sandbox
|
||||
> (`runtime/python-requirements.txt`). To skip this, use
|
||||
> `--skip-python`. In environments where writing to the system Python requires permissions, run
|
||||
> `sudo bash scripts/prebake-python.sh` separately.
|
||||
|
||||
## 5. Docker で起動
|
||||
## 5. Launch with Docker
|
||||
|
||||
```bash
|
||||
cp .env.example .env # OLLAMA_BASE_URL / OLLAMA_MODEL を設定
|
||||
cp .env.example .env # set OLLAMA_BASE_URL / OLLAMA_MODEL
|
||||
docker compose up -d
|
||||
# http://localhost:9876
|
||||
```
|
||||
|
||||
DB とワークスペースは named volume(`maestro-data` / `maestro-workspaces`)に永続化される。Compose は既定で `127.0.0.1:9876` のみに公開する。`config.yaml` をホストからマウントする場合は `docker-compose.yml` のコメントを参照。
|
||||
The DB and workspaces are persisted in named volumes (`maestro-data` / `maestro-workspaces`). By default Compose exposes only `127.0.0.1:9876`. If you want to mount `config.yaml` from the host, see the comments in `docker-compose.yml`.
|
||||
|
||||
## 6. 最初のタスク
|
||||
## 6. Your first task
|
||||
|
||||
1. UI を開き、新規タスクを作成(タイトル + 依頼内容を入力)。
|
||||
2. LLM がタスクを分類し、適切な Piece(ワークフロー)へ自動ルーティングする。
|
||||
3. 進捗タブで Movement の進行とツール呼び出しを確認、成果物は Output/Files タブでプレビューできる。
|
||||
1. Open the UI and create a new task (enter a title + the request body).
|
||||
2. The LLM classifies the task and automatically routes it to the appropriate Piece (workflow).
|
||||
3. Check the Movement progress and tool calls in the Progress tab; preview deliverables in the Output/Files tabs.
|
||||
|
||||
## 7. 認証を有効にする(任意)
|
||||
## 7. Enable authentication (optional)
|
||||
|
||||
既定では認証なしで動作する。Google / Gitea の OAuth を使う場合は `config.yaml` の
|
||||
`auth` セクションを設定する(クライアント ID/シークレット/コールバック URL)。詳細は
|
||||
[configuration.md の auth セクション](configuration.md#auth) を参照。
|
||||
By default it runs without authentication. To use Google / Gitea OAuth, configure the
|
||||
`auth` section of `config.yaml` (client ID/secret/callback URL). For details, see the
|
||||
[auth section of configuration.md](configuration.md#auth).
|
||||
|
||||
認証を有効にするまでは信頼できないネットワークへ公開しないこと。外部公開時は TLS
|
||||
対応のリバースプロキシも使用する。運用上の注意は [../SECURITY.md](../SECURITY.md) を参照。
|
||||
Do not expose it to an untrusted network until authentication is enabled. When exposing it externally, also use a TLS-enabled
|
||||
reverse proxy. For operational caveats, see [../SECURITY.md](../SECURITY.md).
|
||||
|
||||
## 8. Bash サンドボックスを有効にする(任意・マルチユーザー推奨)
|
||||
## 8. Enable the Bash sandbox (optional, recommended for multi-user)
|
||||
|
||||
エージェントの Bash 実行をタスク単位で隔離する。本番では:
|
||||
Isolates the agent's Bash execution per task. In production:
|
||||
|
||||
1. ホストに Python パッケージをプリベイク: `sudo bash scripts/prebake-python.sh`
|
||||
2. `config.yaml` で `safety.bash_sandbox: always`
|
||||
3. サーバー再起動
|
||||
1. Pre-bake the Python packages on the host: `sudo bash scripts/prebake-python.sh`
|
||||
2. Set `safety.bash_sandbox: always` in `config.yaml`
|
||||
3. Restart the server
|
||||
|
||||
手順とトラブルシュートは [operations/bash-sandbox-provisioning.md](operations/bash-sandbox-provisioning.md) を参照。
|
||||
For the procedure and troubleshooting, see [operations/bash-sandbox-provisioning.md](operations/bash-sandbox-provisioning.md).
|
||||
|
||||
Reference in New Issue
Block a user