stdio Bus Workers Registry is a collection of worker implementations for stdio Bus kernel. Workers are processes that handle various agent protocols (ACP, MCP) and communicate with stdio Bus via stdin/stdout using NDJSON protocol.
stdio Bus kernel is a high-performance message routing daemon that manages worker processes and routes messages between clients and workers. It's available at https://github.com/stdiobus/stdiobus. For convenience, Docker images are also available on Docker Hub.
Separating workers from the core daemon provides:
- Better separation of concerns
- Easier to contribute and extend
- Independent versioning
- Clearer documentation
- Simpler deployment
- ACP (Agent Client Protocol) - Full protocol support via ACP Worker
- MCP (Model Context Protocol) - Via MCP Echo Server and MCP-to-ACP Proxy
- NDJSON JSON-RPC - Base protocol for all workers
- Get stdio Bus kernel: Build from source or use Docker image
- Clone this repository
- Build workers:
npm install && cd workers-registry/acp-worker && npm install && npm run build - Run: See Quick Start for detailed instructions
- stdio Bus kernel (build from source or use Docker)
- Node.js 20.0.0 or later (for building workers)
- Linux, macOS, or Windows (WSL for binary, Docker for containers)
- 100MB+ free disk space
- 512MB+ RAM (depends on workers)
No! You can use the official Docker image from Docker Hub for quick start. Building from source is only needed if you want to modify the kernel itself or prefer running the binary directly.
A worker is a process that:
- Reads NDJSON messages from stdin
- Processes messages according to a protocol (ACP, MCP, etc.)
- Writes NDJSON responses to stdout
- Logs to stderr
- Echo Worker - Testing and learning the protocol
- ACP Worker - Full ACP protocol support with MCP integration
- Registry Launcher - Connect to any agent in the ACP Registry
- MCP-to-ACP Proxy - Bridge MCP clients (like Kiro) to ACP agents
- MCP Echo Server - Testing MCP integration
Yes! See Creating Custom Workers for guidelines. The Echo Worker is a good starting point.
- Development: 1 instance is usually enough
- Production: 2-8 instances depending on load
- High-throughput: 8+ instances with appropriate hardware
Use session affinity for stateful conversations.
- stdio Bus config:
config.json(defines worker pools, mounted into Docker container) - Worker config: Worker-specific configuration files
- API keys:
api-keys.json(for Registry Launcher, mounted into Docker container)
Create a configuration file with multiple pools:
{
"pools": [
{
"id": "echo-worker",
"command": "node",
"args": ["./workers-registry/echo-worker/echo-worker.js"],
"instances": 2
},
{
"id": "acp-worker",
"command": "node",
"args": ["./workers-registry/acp-worker/dist/index.js"],
"instances": 1
}
]
}Create api-keys.json:
{
"ANTHROPIC_API_KEY": "sk-ant-...",
"OPENAI_API_KEY": "sk-...",
"GITHUB_TOKEN": "ghp_..."
}Reference it in registry-launcher-worker-config.json:
{
"apiKeysPath": "./api-keys.json"
}NDJSON (Newline-Delimited JSON) is a format where each line is a complete JSON object:
{"jsonrpc":"2.0","id":"1","method":"test","params":{}}\n
{"jsonrpc":"2.0","id":"2","method":"echo","params":{}}\n
Session affinity ensures that all messages with the same sessionId are routed to the same worker instance. This is essential for stateful conversations.
{
"jsonrpc": "2.0",
"id": "1",
"method": "test",
"sessionId": "sess-123",
"params": {}
}Via TCP (when running in Docker), Unix socket, or stdio:
# TCP (Docker)
echo '{"jsonrpc":"2.0","id":"1","method":"echo","params":{}}' | nc localhost 9000
# Unix socket (requires volume mount)
echo '{"jsonrpc":"2.0","id":"1","method":"echo","params":{}}' | nc -U /tmp/stdio_bus.sock
# Stdio (interactive mode)
docker run -i \
-v $(pwd)/config.json:/config.json:ro \
-v $(pwd)/workers-registry:/workers-registry:ro \
stdiobus/stdiobus:latest \
--config /config.json --stdio- Request: Has
idandmethod, requires a response - Notification: Has
methodbut noid, no response expected
The ACP Registry is a centralized list of available ACP agents (Claude, Goose, Cline, etc.) with their metadata and launch commands.
Include agentId in your message:
{
"jsonrpc": "2.0",
"id": "1",
"method": "initialize",
"params": {
"agentId": "claude-acp",
"clientInfo": {"name": "test"}
}
}See the ACP Registry for the full list. Popular agents:
claude-acp- Claude Agentgoose- Goosecline- Clinegithub-copilot- GitHub Copilot
The ACP Registry is maintained by the ACP team. Contact them to add new agents. For local testing, you can modify the registry URL in the configuration.
Yes! The ACP Worker includes MCP Manager that connects to MCP servers for tool execution.
Configure in the ACP Worker's MCP servers config:
{
"mcpServers": {
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"],
"env": {}
}
}
}Yes! Use the MCP-to-ACP Proxy to bridge IDE (MCP client) to stdio Bus (ACP agents). See MCP-to-ACP Proxy documentation.
Check:
- Node.js version (20.0.0+)
- Dependencies installed (
npm install) - Worker built (
npm run build) - Configuration paths are correct (mounted into Docker container)
- Worker files are accessible from Docker container
- Docker volumes are mounted correctly
Check:
- stdio Bus Docker container is running (
docker ps) - Port mapping is correct (
-p 9000:9000) - Firewall allows connections
- No other process using the port
- Using
localhostor127.0.0.1to connect
Check:
- Message format is valid JSON
- Each message ends with newline
jsonrpcfield is "2.0"- Worker logs for errors (stderr)
Check:
- Session was created first
sessionIdmatches exactly (case-sensitive)- Worker hasn't restarted (sessions are in-memory)
Check:
- Agent ID is correct (case-sensitive)
- Agent exists in the registry
- Registry URL is accessible
- Check cached registry in
/tmp/acp-registry-cache.json
Check:
- API keys are configured in
api-keys.json - API key names match agent requirements
- API keys are valid and not expired
- File permissions allow reading
api-keys.json
- Echo Worker: ~50,000 messages/second
- ACP Worker: ~10,000 messages/second
- Registry Launcher: ~5,000 messages/second (depends on agent)
Actual throughput depends on hardware, message size, and worker complexity.
- Increase worker instances
- Use session affinity for stateful conversations
- Configure larger buffer sizes
- Use multiple stdio Bus instances (load balancing)
- Monitor and optimize worker code
- Echo Worker: ~10MB per instance
- ACP Worker: ~50MB per instance
- Registry Launcher: ~100MB + ~50-200MB per agent
Monitor with ps aux | grep worker or top.
See Contributing Guidelines for detailed instructions.
# Run all tests
npm test
# Run specific test suites
npm run test:unit
npm run test:integration
npm run test:property
# Run tests for specific worker
cd workers-registry/acp-worker
npm test# View Docker container logs
docker logs -f stdiobus-container-name
# Enable debug logging (via environment variable)
docker run -d \
-e LOG_LEVEL=debug \
-p 9000:9000 \
-v $(pwd)/config.json:/config.json:ro \
-v $(pwd)/workers-registry:/workers-registry:ro \
stdiobus/stdiobus:latest
# Check worker logs (stderr) from container
docker exec stdiobus-container-name ps aux | grep worker- GitHub Issues - Bug reports and feature requests
- GitHub Discussions - Questions and discussions
- Documentation - Project documentation
- Examples - Practical examples
stdio Bus is designed for production use, but:
- Protect API keys (file permissions, environment variables)
- Validate all input
- Use secure connections (TLS for TCP)
- Monitor for suspicious activity
- Keep dependencies updated
API keys are stored in configuration files and injected as environment variables. Use file permissions to protect configuration files:
chmod 600 api-keys.jsonNo. Each worker runs in a separate process with isolated memory. Workers cannot access each other's data.
- Build workers:
npm run build - Configure production settings (instances, limits)
- Set up monitoring and logging
- Use process manager (systemd, PM2, Docker)
- Configure firewall and security
- Test thoroughly before deploying
Yes! Docker is the recommended way to run stdio Bus. See the Docker Hub README for detailed instructions.
Quick example:
docker run -d \
--name stdiobus \
-p 8080:8080 \
-v $(pwd)/config.json:/config.json:ro \
-v $(pwd)/workers-registry:/workers-registry:ro \
stdiobus/stdiobus:latest- Monitor Docker container health (
docker ps,docker stats) - Monitor worker process count inside container
- Monitor memory usage per worker
- Monitor message throughput
- Monitor error rates in logs (
docker logs) - Monitor session count
- Use logging and metrics tools (Prometheus, Grafana)
Apache License 2.0. See LICENSE file for details.
Yes! The Apache License 2.0 allows commercial use.
No, but contributions are welcome! See Contributing Guidelines.
- Main README - Project overview
- stdio Bus kernel - Core protocol and daemon
- stdio Bus on Docker Hub - Docker images (optional)