A remote AI coding agent you can control via API. Supports multiple AI engines (Claude Code, OpenCode) and models (Anthropic, OpenAI, Gemini, and more) through a single HTTP API and web UI.
What it does: You send coding tasks via API or the browser UI, and the agent reads, writes, and edits files in isolated workspaces. Sessions persist — you can send follow-up messages to continue where you left off.
# Clone and configure
git clone https://github.com/billiax/remote-coder.git
cd remote-coder
cp .env.example .envEdit .env — you need at least one engine configured:
# For Claude engine (pick one):
CLAUDE_CODE_OAUTH_TOKEN=your-token # from Claude Code CLI login
# or
ANTHROPIC_API_KEY=sk-ant-... # from console.anthropic.com
# Optional: protect the API
API_KEY=your-secret-keyThen run:
docker compose up -dOpen http://localhost:3333 — that's it.
All configuration is via environment variables in .env:
| Variable | Description | Default |
|---|---|---|
PORT |
Server port | 3333 |
API_KEY |
Require X-API-Key header on API routes |
(none, open) |
DEFAULT_ENGINE |
Default engine when not specified | claude |
BASE_DIR |
Where workspace directories are created | ./workspaces |
ALLOWED_WORKSPACES |
Comma-separated whitelist of workspace names | (any) |
MCP_CONFIG |
Path to MCP config JSON (for Context7 etc.) | (none) |
| Variable | Description |
|---|---|
ANTHROPIC_API_KEY |
Anthropic API key — uses Claude Agent SDK |
CLAUDE_CODE_OAUTH_TOKEN |
OAuth token — uses Claude Code CLI |
ANTHROPIC_BASE_URL |
Route API calls through a proxy |
Set one of ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN. If both are set, the API key takes priority (SDK mode).
| Variable | Description |
|---|---|
OPENCODE_PROVIDER_API_KEY |
API key for your OpenAI-compatible proxy |
OpenCode requires a provider config file at config/opencode.json (see below).
Models: sonnet, opus, haiku (aliases), or any full model ID.
curl -X POST http://localhost:3333/chat \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{
"message": "create a hello.ts file",
"workspace": "my-project",
"engine": "claude",
"model": "sonnet"
}'Works with any OpenAI-compatible proxy. Configure your provider in config/opencode.json:
cp config/opencode.json.example config/opencode.jsonEdit config/opencode.json:
{
"provider": {
"custom": {
"api": "https://your-proxy.example.com/v1",
"env": ["OPENCODE_PROVIDER_API_KEY"],
"models": {
"gpt-5": { "name": "GPT-5" },
"gpt-5-mini": { "name": "GPT-5 Mini" }
}
}
}
}Then use it:
curl -X POST http://localhost:3333/chat \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_KEY" \
-d '{
"message": "build a REST API",
"workspace": "my-project",
"engine": "opencode",
"model": "custom/gpt-5"
}'OpenCode also has free built-in models (no API key needed):
opencode/big-pickleopencode/gpt-5-nano
All endpoints return JSON. Set X-API-Key header if API_KEY is configured.
Send a message to a coding agent. Creates a new session or continues an existing one.
{
"message": "your task",
"workspace": "project-name",
"engine": "claude",
"model": "sonnet",
"sessionId": "optional-resume-id"
}Response:
{
"sessionId": "abc-123",
"response": "Created the file...",
"isError": false,
"durationMs": 5000,
"costUsd": 0.05,
"workspace": "project-name",
"model": "sonnet",
"engine": "claude"
}List all active sessions.
Get message history for a session.
Compact session context (Claude only).
Delete a session.
Health check (no auth required). Returns {"status":"ok","engine":"claude"}.
Open http://localhost:3333 in your browser. If API_KEY is set, pass it via URL on first visit:
http://localhost:3333/?apiKey=your-secret-key
The key is saved in localStorage — you only need to do this once.
- Azure Container Registry (ACR) attached to your AKS cluster
kubectlaccess to the cluster- GitHub repo with these variables (Settings > Variables):
ACR_NAME— your ACR nameAKS_CLUSTER— AKS cluster nameAKS_RG— resource group
- GitHub repo secrets:
AZURE_CREDENTIALS— service principal JSONREMOTE_CODER_API_KEY— API key for the serviceCLAUDE_CODE_OAUTH_TOKENorANTHROPIC_API_KEYOPENCODE_PROVIDER_API_KEY(optional)
Push to main triggers the CI/CD pipeline automatically. Or deploy manually:
# First time
./k8s/install.sh install
# Update after changes
./k8s/install.sh update
# Check status
./k8s/install.sh statusnpm install
cp .env.example .env
# Edit .env with your keys
npm run devHTTP API / Web UI
│
Express server (src/server.ts)
│
Agent Factory (src/agent-factory.ts)
├── Claude Code (src/claude-session.ts)
│ ├── SDK mode (ANTHROPIC_API_KEY)
│ └── CLI mode (CLAUDE_CODE_OAUTH_TOKEN)
└── OpenCode (src/opencode-session.ts)
└── CLI mode (opencode run --format json)
Each session gets an isolated workspace directory. Files created by the agent live in workspaces/<name>/.
ISC