Running a Local Agent
Most AI coding agents run as command-line tools over stdio. Bridge them to WebSocket with @rebornix/stdio-to-ws so Agmente can connect.
Use @rebornix/stdio-to-ws --persist 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 (sign in with npx @anthropic-ai/claude-code /login) |
| Qwen | OAuth login or Alibaba Cloud API key |
| Vibe | OAuth login or MISTRAL_API_KEY |
Example (Claude Code):
# Authenticate Claude Code first (Claude Pro/Max or API key)
npx -y @anthropic-ai/claude-code /login
# Then start the WebSocket bridge
npx -y @rebornix/stdio-to-ws --persist --grace-period 604800 "npx @zed-industries/claude-code-acp" --port 8765
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 (Claude Code)
npx -y @rebornix/stdio-to-ws --persist --grace-period 604800 "npx @zed-industries/claude-code-acp" --port 8765
This downloads @rebornix/stdio-to-ws, launches Claude Code with ACP enabled, and exposes ws://localhost:8765.
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 @rebornix/stdio-to-ws --persist keeps the same agent process alive across reconnects.
Gemini CLI (Google)
npx -y @rebornix/stdio-to-ws --persist --grace-period 604800 "npx @google/gemini-cli --experimental-acp" --port 8765
In Agmente:
- Protocol:
ws - Host:
your-mac-ip:8765
Qwen (Alibaba)
npm install -g qwen-cli
npx -y @rebornix/stdio-to-ws --persist --grace-period 604800 "qwen --experimental-acp" --port 8765
In Agmente:
- Protocol:
ws - Host:
your-mac-ip:8765
Qwen is recommended for full session persistence (session/list + session/load).
Vibe (Mistral)
npx -y @rebornix/stdio-to-ws --persist --grace-period 604800 "vibe-acp" --port 8765
In Agmente:
- Protocol:
ws - Host:
your-mac-ip:8765
Claude Code (Anthropic)
npx -y @rebornix/stdio-to-ws --persist --grace-period 604800 "npx @zed-industries/claude-code-acp" --port 8765
In Agmente:
- Protocol:
ws - Host:
your-mac-ip:8765
Use @rebornix/stdio-to-ws --persist 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.