Skip to main content

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.

note

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.

AgentAuthentication method
Gemini CLIGoogle OAuth or GEMINI_API_KEY
Claude CodeAnthropic API key or Claude Pro/Max subscription (sign in with npx @anthropic-ai/claude-code /login)
QwenOAuth login or Alibaba Cloud API key
VibeOAuth 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
tip

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

AgentACP supportsession/listsession/loadCapabilities
Gemini CLI✅ VerifiedContext, Image, Audio
Claude Code✅ VerifiedContext, Image
Qwen✅ VerifiedContext, Audio
Vibe (Mistral)✅ VerifiedContext only
  • ✅ Supported and tested
  • ❌ Not supported
  • ❓ Unknown
note

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
warning

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

ipconfig getifaddr en0

Or: System Settings → Network → Wi-Fi → Details → IP Address

Use the IP in Agmente as IP_ADDRESS:8765.