Get a Gemma-powered AI agent running in minutes. Three paths depending on your setup: cloud API (fastest), Google Cloud Vertex AI (enterprise), or local hardware (private, no data leaves your machine).
Install from npm. Requires Node 22+. Docker is recommended for sandboxed tool execution but not required.
npm install -g gemmaclaw
gemmaclaw setupShared files: When Docker sandbox is enabled, ~/.gemmaclaw/shared/ on your machine is automatically mounted at /shared inside the container. Drop files there for the agent to use, or find agent output there after a task completes. Created automatically on first run.
Contributors who need to modify the codebase use pnpm, which is required by this workspace:
git clone https://github.com/gemmaclaw/gemmaclaw.git
cd gemmaclaw
corepack enable
pnpm install
pnpm build
npm install -g .
gemmaclaw setupGemmaclaw releases use the Gemmaclaw npm Release GitHub Action. Trigger it manually to create or update the release PR. After that PR merges to main, the same workflow creates the GitHub release and publishes the tagged package to npm.
The workflow is powered by release-please. Version state lives in .release-please-manifest.json and release behavior lives in release-please-config.json. The config includes a root-level bootstrap-sha so the first release PR starts from the Gemmaclaw npm automation baseline instead of scanning the full upstream history. The workflow requires a RELEASE_PLEASE_TOKEN repository secret with contents and pull request write access because the organization blocks the default GITHUB_TOKEN from creating release PRs. npm publishing expects GitHub Actions trusted publishing to be configured for the gemmaclaw package.
Running gemmaclaw setup kicks off a six-question wizard. Press Enter at any prompt to keep the bracketed default. Every question is also exposed as a CLI flag so you can script the whole flow.
~/.gemmaclaw/agents/<name>/. Use main if you only run one. Flag: --agent-name <name>.--no-container.--setup-mode local|gemini|vertex.--model <id>.off is fastest, medium is the sweet spot, high is best for hard problems. Flag: --thinking off|low|medium|high.general is a friendly default, coding tunes the assistant for code tasks, minimal leaves the workspace empty. Flag: --bootstrap general|coding|minimal.Example transcript (Local + Docker + auto + medium + general):
$ gemmaclaw setup
Welcome to Gemmaclaw. We'll set up an AI agent in five quick questions.
1. Agent name
Agent name [main]: <Enter>
2. Where should the agent run its tools (shell, files, browser)?
Choose [1/2, default=1]: <Enter>
3. Where should the model run?
Choose [1/2/3, default=1]: <Enter>
4. Which model?
Choose [1-5, default=1]: <Enter>
5. How much should the agent think before answering?
Choose [1-4, default=3 (medium)]: <Enter>
6. What should the agent's starter persona look like?
Choose [1-3, default=1 (general)]: <Enter>
Your setup:
Agent name: main
Run mode: Container (Docker sandbox for tools)
Backend: Local (this machine)
Model: auto
Thinking: medium
Persona: General assistant (recommended)
Setup complete. Try it now:
gemmaclaw chat --agent mainWhere things get written:
~/.gemmaclaw/agents/<name>/ (manifest, sessions, auth profile)~/.gemmaclaw/workspace/AGENTS.md for the main agent, or ~/.gemmaclaw/workspaces/<name>/AGENTS.md for everyone else (the bootstrap profile drops AGENTS.md and, for the coding profile, TOOLS.md)~/.gemmaclaw/openclaw.json (model defaults, thinking level, sandbox toggle)Non-interactive / CI: combine --non-interactive with the per-question flags to script the whole wizard without prompts. Add --dry-run to skip backend provisioning, gateway start, and smoke tests — useful for CI smoke tests of the wizard itself. Example:
gemmaclaw setup --non-interactive --setup-mode local --agent-name dev-agent --no-container --thinking high --bootstrap coding --dry-runThe Docker E2E job under test/e2e/Dockerfile.onboard-gemma exercises every major path this way and is wired into CI as a required pass via .github/workflows/onboard-gemma-e2e.yml.
Run Gemma entirely on your machine. No data leaves your network. Gemmaclaw detects your GPU and RAM, picks the best model, downloads and provisions everything automatically.
# Auto-detect everything (recommended)
gemmaclaw setup
# Advanced: choose backend and model manually
gemmaclaw setup --advanced
# CI/scripted: non-interactive with defaults
gemmaclaw setup --non-interactive --accept-risk --no-containerWhat happens:
Supported backends:
| Backend | Best for | GPU |
|---|---|---|
| Ollama | Most users. Managed model server, easy model switching. | NVIDIA, Apple Silicon |
| llama.cpp | Advanced users. Raw GGUF, lower overhead, custom quants. | NVIDIA, CPU-only |
| gemma.cpp | Gemma 2/3 on CPU. Requires cmake + build tools. | CPU-only |
| Flag | Description |
|---|---|
--advanced | Interactive wizard for manual backend/model/port selection |
--no-container | Run gateway directly on the host (skip Docker sandbox) |
--non-interactive | Run without prompts (uses safe defaults) |
--accept-risk | Required with --non-interactive |
--workspace <dir> | Agent workspace directory |
--agent-name <name> | Pick the agent identity created by setup (default: main) |
--setup-mode local|gemini|vertex | Skip the backend prompt |
--model <id> | Pre-pick a model (e.g. gemma3:4b, google/gemini-2.5-pro) |
--thinking off|low|medium|high | Pre-pick reasoning depth |
--bootstrap general|coding|minimal | Pre-pick the starter persona |
--dry-run | Run wizard + write config but skip provisioning & gateway start (CI / e2e) |
Use Google's hosted Gemini API. No local GPU, no model downloads. Get a free API key from Google AI Studio.
# Set your API key, then run setup
export GEMINI_API_KEY=YOUR_KEY
gemmaclaw setup
# Or run setup interactively (prompts for provider and key)
gemmaclaw setupAvailable models: gemma-4-31b-it, gemma-3-27b-it, gemma-3-12b-it, gemma-3-4b-it, gemma-3-1b-it.
For GCP-integrated deployments. Uses gcloud credentials or a service account. Requires a GCP project with the Vertex AI API enabled. Auth tokens are resolved at runtime via gcloud, so they never go stale in your config.
# Authenticate with gcloud
gcloud auth application-default login
gcloud config set project YOUR_PROJECT_ID
# Interactive setup (prompts for project, region, API protocol, model)
gemmaclaw setup --vertex
# Non-interactive with flags
gemmaclaw setup --vertex \
--vertex-project my-gcp-project \
--vertex-region us-west1 \
--vertex-model gemma-4-31b-it
# With a service account key
export GOOGLE_APPLICATION_CREDENTIALS=/path/to/key.json
gemmaclaw setup --vertex --vertex-project my-projectAPI protocol: The wizard asks you to choose between the native Gemini API and the OpenAI-compatible API. Native is the default and recommended for most setups. OpenAI-compatible is available if your tooling requires that format.
Available models: gemma-4-31b-it, gemma-3-27b-it, gemma-3-12b-it, gemma-3-4b-it, gemma-3-1b-it.
For Docker, mount your gcloud credentials:
docker run -v ~/.config/gcloud:/root/.config/gcloud gemmaclaw setup --vertex| Flag | Description |
|---|---|
--vertex | Enable Vertex AI setup (required) |
--vertex-project <id> | GCP project ID (auto-detected from gcloud if not set) |
--vertex-region <region> | GCP region (default: us-west1) |
--vertex-model <model> | Gemma model (e.g. gemma-4-31b-it) |
# Create a named agent instance
gemmaclaw create work
# Open local TUI/chat for the "work" agent
gemmaclaw tui work
# Pick an agent interactively (TTY only)
gemmaclaw tui
# Docker-backed agents open browser chat on a persistent 127.0.0.1 port
gemmaclaw tui play --no-open
# Open browser chat UI directly
gemmaclaw chat
# One-shot message from the command line
gemmaclaw message --agent work "summarize today's news"Global options available on all commands:
| Option | Description |
|---|---|
--profile <name> | Use a named profile (isolates state under ~/.gemmaclaw-<name>) |
--dev | Dev profile: isolate state under ~/.gemmaclaw-dev, use port 19001 |
--log-level <level> | Log level: silent, fatal, error, warn, info, debug, trace |
--no-color | Disable ANSI colors |
-V, --version | Print version and commit hash |
gemmaclaw setupInitialize local config, auto-detect hardware, provision a Gemma backend, and start the assistant. Recommended first command for new installs.
| Option | Description |
|---|---|
--advanced | Interactive wizard for manual backend/model/port selection |
--no-container | Run gateway directly on the host (skip Docker sandbox) |
--non-interactive | Run without prompts (uses safe defaults) |
--accept-risk | Required with --non-interactive; acknowledges local agent system-access risk |
--wizard | Run interactive workspace config onboarding |
--workspace <dir> | Agent workspace directory (default: ~/.gemmaclaw/workspace) |
--workspace-only | Only initialize workspace config, skip Gemma provisioning |
# Auto-detect everything (recommended)
gemmaclaw setup
# Manual backend/model selection
gemmaclaw setup --advanced
# CI/scripted environments
gemmaclaw setup --non-interactive --accept-risk --no-containergemmaclaw createCreate a new named Gemmaclaw instance (agent). Each instance gets its own workspace, sessions, and configuration. Provision a backend with gemmaclaw setup first.
| Option | Description |
|---|---|
[name] | Agent name/id (positional or via --name) |
--workspace <dir> | Workspace directory for this instance |
--model <id> | Model id (e.g. ollama/gemma3:4b) |
--non-interactive | Disable prompts (requires name) |
--json | Output JSON summary |
# Interactive create
gemmaclaw create work
# Non-interactive with model
gemmaclaw create dev --model ollama/gemma3:4b --workspace ~/.gemmaclaw/workspace/dev
# Scripted/CI
gemmaclaw create play --non-interactivegemmaclaw listList all configured Gemmaclaw instances. Alias for gemmaclaw agents list. Shows container shell availability for each agent.
| Option | Description |
|---|---|
--json | Output JSON with shellAvailable and shellUnavailableReason fields |
--bindings | Include routing bindings |
gemmaclaw list
gemmaclaw list --jsongemmaclaw sshOpen an interactive shell inside a container-backed agent's sandbox. With no argument in a TTY, presents an interactive picker. Non-container agents appear in the picker but cannot be selected, with a clear reason. This opens a container shell via docker exec or podman exec, not a network SSH connection.
| Option | Description |
|---|---|
[agent] | Agent name/id (optional; prompts interactively if omitted in a TTY) |
--non-interactive | Fail with usage text if no agent is specified (useful for scripts) |
# Interactive picker (TTY required)
gemmaclaw ssh
# Direct shell into named agent
gemmaclaw ssh main
# Script-safe: fail immediately if no agent given
gemmaclaw ssh work --non-interactive
# Check which agents support container shell
gemmaclaw list --json | jq '.[] | {id, shellAvailable, shellUnavailableReason}'gemmaclaw backupCreate, verify, and restore portable archives for a Gemmaclaw instance. Backups include local state, config, credentials, sessions, shared files, and workspace files by default. The same commands work for Docker-backed container agents and --no-container host-local agents because both store durable state under the active Gemmaclaw state directory.
| Subcommand | Description |
|---|---|
backup create | Create a timestamped .tar.gz archive. Use --verify to validate immediately. |
backup verify <archive> | Validate the embedded manifest and payload layout without restoring. |
backup restore <archive> | Restore into the active state directory or a target directory. Alias: backup recover. |
# Create and verify a complete instance backup
gemmaclaw backup create --output ~/gemmaclaw-backups --verify
# Inspect a backup before using it
gemmaclaw backup verify ~/gemmaclaw-backups/2026-05-05T01-00-00.000Z-openclaw-backup.tar.gz
# Restore into a fresh directory for inspection
gemmaclaw backup restore ~/gemmaclaw-backups/backup.tar.gz --target ~/.gemmaclaw-restored
# Replace active state safely. Existing state is moved aside first.
gemmaclaw backup restore ~/gemmaclaw-backups/backup.tar.gz --forcegemmaclaw chatStart the gateway and open the web chat UI in your default browser. When multiple agents are configured, pass --agent or pick one interactively.
| Option | Description |
|---|---|
--agent <id> | Target agent id (skips interactive picker) |
--no-open | Start gateway but don't auto-open the browser |
--port <port> | Gateway port (default: auto-detected from config) |
gemmaclaw chat
gemmaclaw chat --agent work
gemmaclaw chat --no-open --port 3001gemmaclaw messageSend a one-shot message to a Gemmaclaw agent and print the response. Supports positional text, --text flag, or piped stdin. Useful for scripting and automation.
| Option | Description |
|---|---|
--agent <id> | Target agent id (required if multiple agents configured) |
--text <text> | Message body (alternative to positional or stdin) |
--json | Output result as JSON |
--thinking <level> | Thinking level: off, minimal, low, medium, high |
--timeout <seconds> | Override agent command timeout |
--local | Run the embedded agent locally |
# One-shot message
gemmaclaw message --agent dev "summarize today's news"
# Pipe from stdin
echo "what is 2+2?" | gemmaclaw message --agent dev
# JSON output
gemmaclaw message --agent dev --text "hi" --jsongemmaclaw tui [agent]Open a local TUI/chat for a named Gemmaclaw agent. Host-local agents open the terminal TUI directly. Docker-backed agents start or reuse browser chat on 127.0.0.1 using a persistent, collision-safe per-agent port recorded under ~/.gemmaclaw/state/tui-ports.json.
| Option | Description |
|---|---|
[agent] | Agent name (positional, or use --agent) |
--agent <id> | Agent id (alias for the positional argument) |
--port <port> | Host port override for container-backed agents |
--no-open | Print URL but do not open browser (container agents) |
# Direct named launch
gemmaclaw tui work
# Interactive agent picker (requires a TTY)
gemmaclaw tui
# Container-backed local access: print/open the per-agent localhost URL
gemmaclaw tui play --no-open
# Override the container-backed localhost port after cleanup
gemmaclaw tui play --port 9150
# Separate agents keep separate persisted ports
gemmaclaw tui work
gemmaclaw tui playgemmaclaw gatewayRun, manage, and inspect the WebSocket gateway that handles communication between the model, chat channels, and the web UI.
| Subcommand | Description |
|---|---|
run | Run the gateway in the foreground |
start / stop / restart | Manage the gateway system service |
status | Show service status and connectivity info |
health | Fetch health from the running gateway |
install / uninstall | Install or remove the system service |
discover | Find gateways on the local network |
diagnostics | Export support diagnostics bundle |
Key options for gateway run:
| Option | Description |
|---|---|
--port <port> | Port for the gateway WebSocket |
--bind <mode> | Bind mode: loopback, lan, tailnet, auto, custom |
--auth <mode> | Auth: none, token, password, trusted-proxy |
--verbose | Verbose logging to stdout/stderr |
--tailscale <mode> | Tailscale exposure: off, serve, funnel |
gemmaclaw gateway run --verbose
gemmaclaw gateway install && gemmaclaw gateway start
gemmaclaw gateway statusgemmaclaw modelsDiscover, scan, and configure models. Manage which model your assistant uses and set fallbacks.
| Subcommand | Description |
|---|---|
list | List configured models |
set <model> | Set the default model |
status | Show configured model state |
scan | Scan OpenRouter free models |
aliases | Manage model aliases |
fallbacks | Manage model fallback list |
gemmaclaw models status
gemmaclaw models list
gemmaclaw models set gemma3:12bgemmaclaw channelsManage connected chat channels (Telegram, Discord, WhatsApp, and more).
| Subcommand | Description |
|---|---|
list | List configured channels and auth profiles |
add | Add or update a channel account |
login | Link a channel account (interactive) |
status | Show gateway channel status |
capabilities | Show provider capabilities |
gemmaclaw channels list
gemmaclaw channels add --channel telegram --token <bot-token>
gemmaclaw channels login --channel whatsapp
gemmaclaw channels status --probegemmaclaw benchmarkRun the benchmark suite against your local Gemma model. Tests instruction following, reasoning, data extraction, safety, and coding across 15+ tasks.
| Option | Description |
|---|---|
--model <model> | Model name or Ollama tag |
--backend <backend> | Backend: ollama or llama-cpp |
--mock | Deterministic scoring (no LLM judge, fast CI mode) |
--filter <text> | Run only tasks matching this text |
--context-length <n> | Context window size |
--gpu-layers <n> | Number of GPU layers |
--pack <name> | Task pack: core, jake-agent, or custom path |
gemmaclaw benchmark --model gemma3:4b
gemmaclaw benchmark --mock --model gemma3:4b
gemmaclaw benchmark --filter "coding" --model gemma3:4bgemmaclaw benchmark submitAnonymize results and open a PR to share with the community.
| Option | Description |
|---|---|
--dry-run | Print payload without pushing |
-y, --yes | Skip confirmation prompts |
gemmaclaw benchmark submit --dry-run
gemmaclaw benchmark submitgemmaclaw doctorHealth checks on the gateway, channels, and configuration with auto-fix capabilities.
| Option | Description |
|---|---|
--fix | Apply recommended repairs automatically |
--deep | Scan system services for extra gateway installs |
--force | Aggressive repairs (overwrites custom config) |
--non-interactive | Run without prompts |
--generate-gateway-token | Generate a gateway auth token |
gemmaclaw doctor
gemmaclaw doctor --fix
gemmaclaw doctor --deep --fix --non-interactivegemmaclaw pluginsManage plugins and extensions. Install community plugins, enable/disable bundled ones, and diagnose issues.
| Subcommand | Description |
|---|---|
list | List discovered plugins |
install <spec> | Install a plugin (path, npm, or marketplace) |
uninstall / enable / disable | Manage installed plugins |
update | Update installed plugins |
doctor | Report plugin load issues |
marketplace | Browse plugin marketplaces |
gemmaclaw plugins list
gemmaclaw plugins install @example/my-plugin
gemmaclaw plugins doctorgemmaclaw provisionManually install and start a specific Gemma backend.
| Option | Description |
|---|---|
--backend <backend> | Backend: ollama, llama-cpp, or gemma-cpp |
--model <model> | Model to pull |
--port <port> | Port for the backend API server |
--no-verify | Skip post-provision verification |
gemmaclaw provision --backend ollama --model gemma3:12b
gemmaclaw provision --backend llama-cpp --port 8081
gemmaclaw provision --backend gemma-cpp| Command | Description |
|---|---|
gemmaclaw status | Show channel health and recent sessions |
gemmaclaw health | Fetch health from the running gateway |
gemmaclaw config get/set | Read or write config values |
gemmaclaw configure | Interactive config wizard |
gemmaclaw logs | Tail gateway logs |
gemmaclaw memory | Search and reindex the memory system |
gemmaclaw skills | List available skills |
gemmaclaw sessions | List stored sessions |
gemmaclaw reset | Reset local config and state |
gemmaclaw dashboard | Open the Control UI |
gemmaclaw completion | Generate shell completion script |
Config lives at ~/.gemmaclaw/openclaw.json. Edit directly or use the CLI:
gemmaclaw config get gateway.port
gemmaclaw config set gateway.port 3001
gemmaclaw config validate
gemmaclaw configureNamed profiles (--profile mytest) isolate all state under ~/.gemmaclaw-mytest/, useful for testing or running multiple instances.
~/.gemmaclaw/models/llama-cpp/. Re-run gemmaclaw provision --backend llama-cpp.gemmaclaw doctor.--port N or gemmaclaw setup --advanced.gemmaclaw doctor --fix.gemmaclaw plugins doctor.gemmaclaw channels status --probe and re-login.gemmaclaw gateway run --verbose, then gemmaclaw doctor --deep --fix.