Installation and startup

This page describes how to install and start Grape, including the hosted edition, self-hosted installation paths, and post-installation execution environment and plugin integration.

1. Hosted edition: no self-hosting required

The Grape team operates and maintains the hosted edition. Users do not need to provision servers, Docker, or databases, or maintain Grape processes and data.

Usage flow:

  1. Submit a beta application on the website. See Account activation and login.
  2. Wait for the operations team to review the application. After approval the email enters the allowlist and the account is activated.
  3. Sign in to the console.
  4. Connect a code repository.
  5. Create or apply a scene, then start using the pipeline.

The hosted edition is intended for teams evaluating Grape for the first time or using a ready-made service without deployment and operations responsibilities.

The beta application entry point, required materials, and activation process are defined by the official operations guidance. The self-hosted edition does not include the hosted beta activation flow.

2. Self-hosted installation paths

Self-hosted Grape supports two installation paths. They differ in dependencies, runtime topology, and intended use; their startup commands are not interchangeable.

1. Docker Compose

Item Description
Prerequisites Docker Engine, Docker Compose; port 80 available on the host
Runtime topology Four application containers and nginx defined in deploy/docker-compose.yml; nginx exposes port 80
Intended use First self-hosted deployment; no Python runtime maintenance
Documentation Docker deployment

2. Source deployment

Item Description
Prerequisites Python 3.10+, git; Agent CLI installed separately
Runtime topology Single-process entry point listening on port 3000; production mode adds a webhook process on port 8080, managed by a reverse proxy or systemd
Intended use Modify code, debug, or run offline
Documentation Source deployment

The two paths use different startup commands but present the same entry point once the service is up:

Login page shown in the console after a successful start

3. Execution environments and plugin integration

After installing the Grape server, you must also choose where tasks run or which client connects to the platform. These options address different needs and can be combined as required.

1. Worker and local engines

A Worker is a machine that runs tasks, and an engine is the CLI on the Worker that executes them. Configure at least one engine on a Worker that can reach Grape before the pipeline can run.

Engine Installation Verification
opencode npm install -g opencode-ai opencode --version, then run a real conversation
codearts pip install codearts-cli codearts --version, then run a real conversation
Other engines See Engine overview Follow the documentation for each engine

The engine's model and credentials are configured on the engine side, not in the Grape UI. Confirm that the engine can complete a conversation independently before connecting it to a Worker.

Configuration steps

  1. Install the Agent CLI on the machine that will act as the Worker, and confirm that the user running the service can execute it:

bash which opencode # Or which codearts

  1. Open Agent Runtime → Add device and click Generate credential.
  2. Enter a device name and select a scope:
    - Personal: only for your own use
    - Repository: bound to the specified owner/repo
    - Global: shared within the organization
  3. Copy the generated one-click installation command and run it on the target machine. Alternatively, start the Worker manually using the method shown on the page.
  4. On the Devices (Workers) tab, confirm that the target machine is online and that heartbeat and resource data are reported normally.
  5. Wait for automatic engine discovery. You do not need to restart the Worker after installing an engine; it usually appears on the Engines tab within 5 minutes.
  6. Bind an engine to the corresponding node in the project scene, or use default engine scheduling. The pipeline will not run if no available engine is bound.

Completion criteria

Check Expected result
Device Worker online and heartbeat continuously reported
Engine At least one engine online and passing health checks
Scene Target node bound to an engine, or matched by default scheduling
Task After creating a task, the engine executes it and writes logs back

It is normal for a Worker to have no engines when it registers. A RuntimeAgent registered: [] log entry does not indicate a failed connection; engines are discovered automatically after installation.

For complete Worker integration and the engine_runtime_ids and strict_scene_engines settings, see Runtime and Worker.

2. dsh plugin

The dsh plugin integrates Grape pipelines, events, and local Worker capabilities into the dsh host. It does not replace the Grape server or the Worker.

Install it into a specific dsh profile:

dsh plugin --profile <profile> add @grape-dev/grape-dsh
dsh plugin --profile <profile> list

The plugin configuration is written to cordis.patch.yml in the dsh profile and must include at least:

- id: grape-tools
  name: '@grape-dev/grape-dsh'
  config:
    baseUrl: 'https://<your-grape-domain>'
    token: 'grape_xxx'

The dsh plugin reads baseUrl and token only from the configuration; it does not read environment variables such as GRAPE_BASE_URL. The address in the local runtime.env must match config.baseUrl; otherwise, the UI displays Environment mismatch.

For complete installation, profile selection, and failure handling, see dsh plugin.

3. grape-kit plugin

grape-kit is an MCP plugin for coding agents. It supports hosts such as OpenCode, CodeArts, WorkBuddy, and dsh, and exposes pipelines, events, scenes, skills, and takeover capabilities to the host. It does not deploy the Grape service.

Installation:

# Auto-detect the host
npx -y @grape-dev/grape-kit install

# Specify the host
npx -y @grape-dev/grape-kit install --target opencode
npx -y @grape-dev/grape-kit install --target codearts
npx -y @grape-dev/grape-kit install --target workbuddy
npx -y @grape-dev/grape-kit install --target dsh
npx -y @grape-dev/grape-kit install --target all

Configure a user-level grape_ API key and verify the installation:

npx -y @grape-dev/grape-kit auth init \
  --token grape_xxx \
  --base-url https://<your-grape-domain>

npx -y @grape-dev/grape-kit doctor --target <host> --probe

grape-kit and the dsh plugin can coexist: grape-kit uses the minimal MCP path, while the dsh plugin is a native Cordis plugin for dsh. For the full host list, credential precedence, takeover, and uninstallation, see grape-kit plugin.

4. AI Shell (cloud development environment engine)

AI Shell is not an engine that can be installed locally. It is the execution engine built into the AI DevSpace cloud development environment. After you create a DevSpace and complete the integration, the environment registers as a Worker and the AI Shell engine appears in the Grape engine list.

Prerequisites

Item Requirement
Grape service Installed and reachable; for self-hosted deployments, server_base_url must be reachable from DevSpace
Grape account Signed in with permission to create an AI DevSpace
Huawei Cloud credentials Huawei Cloud AK/SK configured in account settings
AI DevSpace Available quota; first use requires accepting the CodeArts development environment service agreement
Network DevSpace can reach the Grape server; for dual-address self-hosted deployments, also verify worker_connect_url

Integration steps

  1. In Account settings → Credentials (cloud platform credentials), enter the Huawei Cloud AK/SK.
  2. Go to Runtime → AI DevSpace and click Create.
  3. After creation, click Start and wait for the status to become Running.
  4. Click Generate Worker credential and copy the installation command returned by the page.
  5. Run the command in the DevSpace terminal to register the environment as a personal Worker.
  6. Return to Runtime → Engines and confirm that AI Shell is online. The engine is discovered automatically; you do not need to install a CLI manually.
  7. Bind AI Shell to the scene node, or use default engine scheduling.

Verification

Check Expected result
DevSpace Status is Running
Worker Registered as a personal Worker with a normal heartbeat
Engine AI Shell online with a heartbeat within 15 seconds
Scene Target node bound to an available engine
Task A task can be created and executed, and logs are written back normally

Limitations

  • AI Shell is available only with AI DevSpace and cannot be installed on your own machine with npm or pip.
  • If DevSpace is stopped or deleted, the Worker and AI Shell go offline.
  • The number of AI DevSpace instances and billing are subject to the Huawei Cloud CodeArts development environment quota.
  • The AI DevSpace + AI Shell + DevBridge path validates deployment capabilities; it does not cover the full coding and review workflow.

For engine status and health checks, see Engine overview.

4. Selection guidance

Goal Recommended path Description
Evaluate Grape capabilities Hosted edition No service processes to maintain
Complete self-hosting quickly Docker Compose Fewer dependencies and a fixed runtime topology
Modify code, debug, or run offline Source deployment Direct access to source code for changes and debugging
Use Grape inside a coding agent dsh plugin or grape-kit Choose by host; the two can be combined
Use a cloud execution environment AI DevSpace + AI Shell No local engine installation; usage subject to quota

5. Post-installation checks (self-hosted)

A completed installation does not guarantee a working system. For self-hosted environments, verify the following six items:

Check Pass criterion If it fails
Service health External curl -s https://<your-domain>/api/health returns 200 with server=ok; for a four-process deployment, /health on the local 127.0.0.1:38080–38083 all return status:ok Return to the failure section in Docker deployment or Source deployment
Login A local account can enter the Workbench Check the initial admin password, database, and startup logs; see Account activation and login
Worker online Agent Runtime → Devices (Workers) shows online and the heartbeat is normal Regenerate credentials and reinstall following the Worker configuration steps above
Engine available The engine is online and can complete a conversation independently on the Worker Models are configured on the engine, not in Grape credentials; see Engine overview
Repository hosted The repository shows Hosted, and creating an Issue triggers an event See Create a project and open an Issue and the page for the relevant Git platform
Scene applied All five nodes are bound to engines and the scene status is Applied Clicking Save is not enough; the settings take effect only after you apply them. See Scenes and engine configuration

Service health is confirmed at two levels: the external entry point first, then each process.

# External entry point (Docker Compose and source deployments both reach it through nginx)
curl -s https://<your-domain>/api/health   # HTTP 200 with server=ok in the body

The process count and ports for process-level checks depend on the deployment form; do not mix them up:

Deployment form Processes and ports Process-level check
Docker Compose Four application containers, container ports 38080–38083; only 80 is published on the host docker compose --env-file ../.env ps shows all four application containers as healthy (compose ships a healthcheck for each process); to read one process response, run the command below inside the container
Source deployment (python -m src.api.run) Two processes: main API 3000, webhook 8080 curl -s http://127.0.0.1:3000/api/health, curl -s http://127.0.0.1:8080/health
Four-process deployment (four systemd units or scripts/dev_four_process.sh) Four processes: mgmt 38080, event 38081, worker 38082, insight 38083 Run the four curl commands below on the host

In Docker Compose, 38080–38083 exist only inside the compose network, so the host cannot reach them. To read a single process response, run the check inside the container:

docker compose --env-file ../.env exec grape-event-server \
  python -c "import urllib.request as u; print(u.urlopen('http://127.0.0.1:38081/health').read().decode())"

For a four-process deployment, check each process on the machine that runs it (port table: Architecture and deployment topologies). /health accepts loopback requests only and returns 403 forbidden for external IPs, so all four commands must run locally:

curl -s http://127.0.0.1:38080/health | jq -c '{service,status,version,pid}'   # mgmt
curl -s http://127.0.0.1:38081/health | jq -c '{service,status,version,pid}'   # event
curl -s http://127.0.0.1:38082/health | jq -c '{service,status,version,pid}'   # worker
curl -s http://127.0.0.1:38083/health | jq -c '{service,status,version,pid}'   # insight
# Without jq, drop the pipe and read the full response body

All four commands return status of ok with the same version, which means all four processes are running. The response bodies share the same structure and differ only in service, pid, started_at, and the database each process connects to. mgmt and insight also expose /api/health, which additionally covers configuration and runtime checks such as server_base_url and agent_runtime.

All four processes return status:ok from /health

Model keys are not configured in Grape Credentials. Credentials in personal settings are for third-party platforms. Models must be configured on the engine itself (on the Worker machine) or on the server via VLM_*. Incorrect configuration causes tasks to fail immediately after being claimed.

6. Acceptance criteria

  • [ ] The hosted edition or a self-hosted deployment has been selected.
  • [ ] For self-hosting, Docker Compose or source deployment has been selected.
  • [ ] The /api/health endpoint returns 200 and server=ok.
  • [ ] A local account can sign in.
  • [ ] The task execution method has been determined: a local Worker engine or AI Shell, with the Worker or engine online.
  • [ ] The repository is hosted, the scene is applied, and the nodes are bound to engines.
  • [ ] If dsh or grape-kit is used, it is installed and verified.
  • [ ] If third-party login is required, the corresponding channel is configured.

Account activation and login | Choosing a self-hosted installation path | Docker deployment | Source deployment | Runtime and Worker | dsh plugin | grape-kit plugin