Running a Local Agent
Most AI coding agents run as command-line tools over stdio. Bridge them to WebSocket with supergateway so Agmente can connect.
Prefer supergateway for local agents. It keeps the stdio child process alive across WebSocket reconnects so session IDs stay valid after app restarts.
Prerequisites
- Node.js 18+ installed
- An AI agent with ACP support (Gemini CLI, Qwen, Claude Code, etc.)
- iPhone/iPad on the same network as your computer
Authenticate the agent
Agmente does not handle agent authentication. Run the agent CLI first and complete its auth flow.
| Agent | Authentication method |
|---|---|
| Gemini CLI | Google OAuth or GEMINI_API_KEY |
| Claude Code | Anthropic API key or Claude Pro/Max subscription via /login |
| Qwen | OAuth login or Alibaba Cloud API key |
| Vibe | OAuth login or MISTRAL_API_KEY |
Example (Gemini CLI):
# Authenticate Gemini CLI first
npx @google/[email protected]
# Then start the WebSocket bridge
npx -y supergateway --stdio "npx @google/[email protected] --experimental-acp" --port 8765 --outputTransport ws
Authentication tokens live with the agent CLI (for example, in your keychain). Agmente only speaks ACP over WebSocket and never sees your OAuth tokens or API keys.
Quick start (Gemini CLI)
npx -y supergateway --stdio "npx @google/[email protected] --experimental-acp" --port 8765 --outputTransport ws
This downloads supergateway, launches Gemini CLI with ACP enabled, and exposes ws://localhost:8765/message.
Supported agents
| Agent | ACP support | session/list | session/load | Capabilities |
|---|---|---|---|---|
| Gemini CLI | ✅ Verified | ❌ | ❌ | Context, Image, Audio |
| Claude Code | ✅ Verified | ❌ | ❌ | Context, Image |
| Qwen | ✅ Verified | ✅ | ✅ | Context, Audio |
| Vibe (Mistral) | ✅ Verified | ❌ | ❌ | Context only |
- ✅ Supported and tested
- ❌ Not supported
- ❓ Unknown
If an agent lacks session/list, Agmente stores session IDs locally. Long-term persistence works best when the agent supports session/load or when supergateway keeps the same agent process alive across reconnects.
Gemini CLI (Google)
npx -y supergateway --stdio "npx @google/[email protected] --experimental-acp" --port 8765 --outputTransport ws
In Agmente:
- Protocol:
ws - Host:
your-mac-ip:8765/message
Qwen (Alibaba)
npm install -g qwen-cli
npx -y supergateway --stdio "qwen --experimental-acp" --port 8765 --outputTransport ws
In Agmente:
- Protocol:
ws - Host:
your-mac-ip:8765/message
Qwen is recommended for full session persistence (session/list + session/load).
Vibe (Mistral)
npx -y supergateway --stdio "vibe-acp" --port 8765 --outputTransport ws
In Agmente:
- Protocol:
ws - Host:
your-mac-ip:8765/message
Claude Code (Anthropic)
npx -y supergateway --stdio "npx @zed-industries/claude-code-acp" --port 8765 --outputTransport ws
In Agmente:
- Protocol:
ws - Host:
your-mac-ip:8765/message
Use supergateway for Claude Code so the agent process survives reconnects. Bridges that respawn the child process will invalidate session IDs after disconnects.
Find your computer's IP
- macOS
- Windows
- Linux
ipconfig getifaddr en0
Or: System Settings → Network → Wi-Fi → Details → IP Address
ipconfig
Look for the "IPv4 Address" under your Wi-Fi adapter.
hostname -I | awk '{print $1}'
Use the IP in Agmente as IP_ADDRESS:8765/message.