RCoder - AI-Powered Development Platform
RCoder is a modern AI-powered development platform built with Rust. It provides unified interaction with multiple AI agents through the SACP (Symposium ACP) protocol, featuring a microservice architecture with Docker containerized deployment and high-performance gRPC communication.
中文文档
Features
- Reverse Proxy - Cloudflare Pingora integration with high-performance port routing
/proxy/{port}/{path}
- HTTP API - Modern REST API built on Axum with unified SSE progress streaming
- Multi-Agent Support - Unified access to Claude Code, Codex, and other AI agents
- Containerized Architecture - Per-project Docker containers for isolation and resource management
- gRPC Communication - High-performance internal communication via Tonic with Server Streaming
- Configuration System - Multi-layered priority: CLI args > Environment variables > Config file
- API Documentation - Auto-generated API docs (utoipa + Swagger UI)
- Observability - Tracing + OpenTelemetry distributed tracing + Pyroscope profiling
- Computer Agent - Containerized AI agent environment with VNC remote desktop, audio streaming, and IME input
Architecture
Overview
Core Components
- RCoder Main Service - Axum HTTP server + container management + gRPC client
- Agent Runner - Isolated AI agent runtime environment (inside Docker), provides gRPC service
- Pingora Proxy - High-performance reverse proxy with port-based routing
- Docker Manager - Global container lifecycle management
Tech Stack
| Category |
Technology |
Description |
| Language |
Rust 2024 Edition |
Modern systems programming language |
| HTTP Framework |
Axum + Tower |
High-performance async web framework |
| RPC Framework |
Tonic (gRPC) |
High-performance RPC communication |
| AI Protocol |
SACP + MCP |
Multi-agent protocol support |
| Containerization |
Docker + Bollard |
Container management and orchestration |
| Database |
DuckDB + SQLx |
Embedded analytical database |
| Logging |
Tracing + OpenTelemetry |
Structured logging and distributed tracing |
| Profiling |
Pyroscope |
Continuous performance profiling |
| CLI |
clap |
Modern command-line argument parsing |
Getting Started
Prerequisites
- Rust 1.75+ (2024 Edition)
- Docker (for containerized deployment)
- Optional: Claude Code CLI (for Claude agent)
Installation & Running
Local Development
Docker Development Mode (Recommended)
Enable Reverse Proxy
CLI Arguments
| Argument |
Short |
Description |
Example |
--port |
-p |
Set main service port |
--port 8087 |
--projects-dir |
-d |
Set project workspace directory |
--projects-dir ./projects |
--enable-proxy |
- |
Enable Pingora reverse proxy |
--enable-proxy |
--proxy-port |
- |
Set Pingora listen port |
--proxy-port 8080 |
--backend-port |
- |
Default backend port |
--backend-port 3000 |
API Reference
Pingora Reverse Proxy
Pingora is the built-in high-performance reverse proxy.
Core Endpoints
| Endpoint |
Method |
Description |
/health |
GET |
Health check |
/chat |
POST |
Send chat message to AI agent |
/agent/progress/{session_id} |
GET (SSE) |
Real-time progress stream |
/agent/session/cancel |
POST |
Cancel an active task |
/agent/stop |
POST |
Stop the Agent |
/agent/status/{project_id} |
GET |
Query Agent status |
/api/docs |
GET |
Swagger UI API documentation |
gRPC Services (Agent Runner)
| Method |
Type |
Description |
Chat |
Unary |
Send chat request |
SubscribeProgress |
Server Streaming |
Subscribe to progress event stream |
CancelSession |
Unary |
Cancel a session task |
GetStatus |
Unary |
Query Agent status |
StopAgent |
Unary |
Stop the Agent |
GetContainerStatus |
Unary |
Query container status |
GetVncStatus |
Unary |
Query VNC service status |
Computer Agent Endpoints
Computer Agent provides a containerized AI agent environment with VNC remote desktop, audio streaming, and IME input support. Each user gets an isolated Docker container, and multiple projects can share the same container.
Core Interfaces
| Endpoint |
Method |
Description |
/computer/chat |
POST |
Send chat message to Computer Agent |
/computer/progress/{session_id} |
GET (SSE) |
Real-time progress stream |
/computer/agent/stop |
POST |
Stop Agent for a specific project (container stays alive) |
/computer/agent/status |
POST |
Query Agent status (alive/idle/busy) |
/computer/agent/session/cancel |
POST |
Cancel an active session |
Desktop & Media Proxy (via Pingora)
| Endpoint |
Method |
Description |
/computer/desktop/{user_id}/{project_id} |
GET |
Get VNC desktop access URLs |
/computer/vnc/{user_id}/{project_id}/{*path} |
GET |
VNC/noVNC proxy (port 6080) |
/computer/audio/{user_id}/{project_id}/{*path} |
GET |
Audio stream proxy (port 6089/6090) |
/computer/ime/{user_id}/{project_id}/{*path} |
GET |
IME input method proxy (port 6091) |
Pod/Container Management
| Endpoint |
Method |
Description |
/computer/pod/count |
GET |
Container count statistics (grouped by service type) |
/computer/pod/list |
GET |
List all container details (pagination: ?limit=100) |
/computer/pod/ensure |
POST |
Ensure container exists (idempotent, does not start Agent) |
/computer/pod/keepalive |
POST |
Refresh container activity timestamp (prevents auto-cleanup) |
/computer/pod/restart |
POST |
Restart container (destroy and recreate) |
/computer/pod/status |
GET |
Query container status (?user_id=xxx) |
/computer/pod/vnc-status |
GET |
Query VNC service readiness |
Usage Examples
Health Check
Response:
Chat
Computer Agent Chat
Real-time Progress Stream
Project Structure
Configuration
Priority Order
- CLI arguments - Highest priority
- Environment variables - Medium priority
- Config file - Lower priority
- Defaults - Lowest priority
Config File (config.yml)
Environment Variables
| Variable |
Description |
Default |
RCODER_PORT |
Service port |
8087 |
RCODER_PROJECTS_DIR |
Projects directory |
./project_workspace |
RCODER_NETWORK_MODE |
Docker network mode |
bridge |
RCODER_NETWORK_BASE_NAME |
Network base name |
agent-network |
RCODER_API_TIMEOUT_SECONDS |
Docker API timeout |
10 |
RCODER_API_KEY_ENABLED |
Enable API Key auth |
false |
RCODER_API_KEY |
API Key secret |
- |
RUST_LOG |
Log level |
info |
Examples
Development Guide
Running Tests
Code Quality
Local Development
Deployment
Docker
Docker Compose
Pyroscope Profiling
Troubleshooting
Common Issues
- Port already in use - Use
--port to specify a different port
- Container startup failure - Check Docker service status and network configuration
- gRPC connection failure - Verify container network and port configuration
- API Key error - Check
api_key_auth configuration
Debug Mode
Changelog
v0.1.0 (Current)
New Features
- SACP protocol-based unified AI agent management
- gRPC high-performance communication architecture
- Docker containerized deployment (project-level isolation)
- VNC/noVNC remote desktop support
- API Key authentication middleware
- Automatic container cleanup
- Multi-image configuration support
- Pyroscope profiling integration
Technical Highlights
- Rust 2024 Edition
- Tonic gRPC (v0.14.2)
- SACP Protocol (v10.1.0)
- MCP Protocol support (rmcp v0.12.0)
- DuckDB database
- OpenTelemetry tracing
- eBPF debugging tool support
Links
License
This project is dual-licensed under MIT or Apache-2.0. See LICENSE for details.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md to learn how to get involved.
- Fork the project
- Create your feature branch (
git checkout -b feature/amazing-feature)
- Commit your changes (
git commit -m 'Add amazing feature')
- Push to the branch (
git push origin feature/amazing-feature)
- Open a Pull Request
Built by the RCoder team, dedicated to advancing AI-powered modern development experiences.