A distributed system of AI agents running in isolated Docker containers with web-based terminals and real-time monitoring
Quick Start β’ Documentation β’ Contributing β’ Architecture
Volta is a group of containerized AI agents.
- π€ Multiple AI Agents: 3 isolated agents with Gemini CLI integration
- π₯οΈ Web-Based Terminals: Full terminal access to each agent via browser
- π‘ NATS Messaging: Distributed communication between agents
- π Real-Time Monitoring: Live logs, metrics, and container statistics
- π Security Hardened: Container isolation with resource limits
- π Shared Storage: Collaborative workspace between agents
Perfect for AI research, distributed computing experiments, and multi-agent workflows.
- Full terminal access in browser using xterm.js
- Interactive shells with TTY support
- Direct Gemini CLI integration (
gcfor chat,gpfor quick prompts) - Real-time terminal emulation with colors and keyboard support
- Tabbed interface (Logs + Terminal views)
- Real-time container statistics (CPU, memory, network)
- Socket.IO live updates
- Container management (restart, scale)
- Mount external repositories for AI-assisted coding
- Hot-reload development mode
- TypeScript throughout
- Comprehensive logging and debugging tools
- 3 AI Agents: Each with Gemini CLI, bash shell, and persistent storage
- NATS Message Bus: Lightweight pub/sub for agent coordination
- Monitor Dashboard: Next.js web app with real-time monitoring and terminals
- Shared Storage: Per-agent directories with controlled access
- VM Level: Docker Desktop's Linux VM or traditional VM (Vagrant) provides the base isolation layer
- Container Level: Each agent runs in Docker with security hardening:
- Non-root user execution with writable workspace
- Resource limits (CPU, memory, PIDs)
- Isolated network (agents can only reach NATS)
- TTY support for interactive terminal sessions
- NATS Messaging: Agent coordination and task distribution
- WebSocket: Real-time browser-to-agent terminal connections
- Shared Storage: Per-agent directories (
/shared/agents/<id>/) - Agent Home: Writable file system at
/home - Collaborative Repository: Optional mount at
/shared/workspacefor multi-agent collaborative editing
- Docker Desktop (required)
- Node.js 18+ (for development)
- Gemini API Key (Get one here)
git clone https://github.com/your-username/volta-shell.git
cd volta-shell
# Copy environment template
cp .env.example .env
# Edit .env and add your Gemini API key
GEMINI_API_KEY="your_api_key_here"# Start all services (NATS + 3 agents + monitor)
npm run volta:up
# Or use Docker Compose directly
docker-compose -f docker-compose.local.yml up --buildOpen http://localhost:4000 in your browser
- Logs Tab: View real-time container logs
- Terminal Tab: Interactive shell access to each agent
- Stats: Live CPU, memory, and network metrics
# Start with hot-reload for monitor
npm run volta:monitor:dev
# Build agents in watch mode
cd agents && npm run devCustom Repository Mounting
Mount external codebases for AI-assisted development:
# In .env file
CUSTOM_REPO_PATH=~/my-project
# Repository will be available at /shared/workspace in all agentsAuth0 Authentication (Optional)
For production deployments with user authentication:
# In .env file
AUTH0_DOMAIN="your-domain.auth0.com"
AUTH0_CLIENT_ID="your_client_id"
AUTH0_CALLBACK_URL="http://localhost:4000"Electron App (Experimental)
Run the dashboard as a desktop application:
npm run electron:dev # Development
npm run electron:build # Build distributablevolta-shell/
βββ π monitor/ # Web monitoring dashboard
β βββ src/
β β βββ app/ # Next.js 14 app router
β β β βββ page.tsx # Main dashboard
β β β βββ layout.tsx # App layout
β β βββ components/ # React components
β β β βββ ContainerWindow.tsx # Agent log/terminal tabs
β β β βββ Terminal.tsx # xterm.js terminal component
β β βββ types/ # TypeScript interfaces
β βββ server.ts # Custom server (Socket.IO + node-pty)
β βββ Dockerfile # Production-ready container
β βββ package.json # Dependencies & scripts
β
βββ π€ agents/ # AI agent implementation
β βββ src/
β β βββ index.ts # Main agent logic + NATS
β β βββ gemini.ts # Gemini API integration
β β βββ types.ts # Shared type definitions
β β βββ utils.ts # Helper functions
β βββ scripts/ # Shell helper scripts
β β βββ setup-env.sh # Environment setup
β β βββ setup-permissions.sh # Security configuration
β βββ Dockerfile # Multi-stage build (Alpine + Node.js)
β βββ package.json # Agent dependencies
β βββ tsconfig.json # TypeScript configuration
β
βββ π shared/ # Persistent storage (auto-created)
β βββ agents/ # Per-agent directories
β β βββ agent-1/ # Agent 1 workspace
β β βββ agent-2/ # Agent 2 workspace
β β βββ agent-3/ # Agent 3 workspace
β βββ common/ # Shared files between agents
β βββ logs/ # Centralized logging
β
βββ π³ docker-compose.local.yml # Full system orchestration
βββ π³ docker-compose.yml # Monitor-only deployment
βββ π scripts/ # Management utilities
β βββ clear-shared.sh # Clean shared directories
βββ π§ .env.example # Environment template
βββ π¦ package.json # Root project scripts
βββ π README.md # This file
| File | Purpose |
|---|---|
package.json |
Root npm scripts (volta:* commands) |
docker-compose.local.yml |
Complete system definition |
agents/src/index.ts |
Main agent logic and NATS integration |
monitor/src/app/page.tsx |
Web dashboard UI |
monitor/server.ts |
WebSocket server for terminals |
.env.example |
Configuration template |
Each agent has a dedicated window showing:
- Real-time logs with timestamps and color coding
- Container statistics (CPU, memory, network I/O)
- Tab interface switching between Logs and Terminal
- Restart button for container management
- Command execution with results inline
- Full xterm.js terminal with professional appearance
- Real PTY allocation using node-pty for proper terminal emulation
- Interactive programs work correctly (vim, nano, gemini)
- Window resizing with automatic fit
- Copy/paste support and keyboard shortcuts
- Color themes with syntax highlighting
Each agent container includes:
- Gemini CLI pre-installed and configured
- API key management via persistent
.envfiles - Interactive chat - just type
gcin any terminal - Quick prompts - use
gp "your question"for one-off queries - Persistent configuration stored in shared volumes
# π Start everything (monitor + agents + NATS)
npm run volta:up
# π Stop all services
npm run volta:down
# π Restart with clean state
npm run volta:restart
# π View logs for all containers
npm run volta:logs
# π Check container status
npm run volta:status
# π§Ή Clean shared storage
npm run volta:clear-shared# π View individual agent logs
npm run volta:logs:agent1
npm run volta:logs:agent2
npm run volta:logs:agent3
# π₯οΈ Open terminal sessions
npm run volta:shell:agent1
npm run volta:shell:agent2
npm run volta:shell:agent3
# π Open all terminals at once
npm run volta:bash:all# π§ Monitor development (hot reload)
npm run volta:monitor:dev
# π± Open monitor dashboard
npm run volta:monitor
# π Live CLI monitoring
npm run volta:cli-monitor
# π Container statistics
npm run volta:stats# π Scale agents
npm run volta:scale
# π Reset everything (nuclear option)
npm run volta:reset
# π View shared directories
npm run volta:sharedEach agent provides a full interactive environment:
- π₯οΈ Full bash shell with command history and completion
- π File system access - create and edit files in
/homeand/shared - π€ Gemini AI integration - interactive chat (
gc) and quick prompts (gp) - πΊ Screen sessions for background processes
- π‘ NATS messaging for inter-agent communication
# Interactive chat session
gc
# Quick one-off prompt
gp "Explain quantum computing"
# Check available models
gemini models list
# Direct Gemini command
gemini -p "Write a Python function to sort a list"Volta Shell implements multiple layers of security:
- Non-root execution: Agents run as unprivileged user
agent - Resource limits: CPU, memory, and PID constraints
- Network isolation: Agents can only communicate with NATS
- Filesystem restrictions: Limited write access to designated areas
/home: Full read-write access for agent workspace/shared: Read-write access for inter-agent communication/app: No access (application code protected)/tmp,/run: No access (system directories protected)
- Environment variables for secure key storage
- Per-agent configuration isolation
- No hardcoded credentials in containers
We welcome contributions! Here's how to get started:
-
Fork & Clone
git clone https://github.com/your-username/volta-shell.git cd volta-shell -
Install Dependencies
# Root dependencies npm install # Agent dependencies cd agents && npm install # Monitor dependencies cd ../monitor && npm install
-
Start Development Environment
# Terminal 1: Start agents and NATS npm run volta:up # Terminal 2: Start monitor in dev mode npm run volta:monitor:dev
- Agents: Edit TypeScript files in
agents/src/ - Monitor: Edit React components in
monitor/src/ - Documentation: Update README.md or add to
docs/
# Type checking
cd agents && npm run type-check
cd monitor && npm run type-check
# Build everything
npm run agents:build
cd monitor && npm run build- Create a feature branch:
git checkout -b feature/amazing-feature - Make your changes and test thoroughly
- Update documentation if needed
- Submit a pull request with a clear description
- π Bug fixes - Check Issues
- π Documentation - Improve guides and examples
- π§ͺ Testing - Add unit and integration tests
- π¨ UI/UX - Enhance the web dashboard
- π Security - Review and improve container security
- π Performance - Optimize agent communication and resource usage
- Architecture Overview - Deep dive into NATS messaging
- Agent Development - Building and customizing agents
- Security Model - Container isolation details
- API Reference - NATS topics and message formats
π§ Container won't start
# Check container logs
npm run volta:logs
# Restart specific container
docker-compose -f docker-compose.local.yml restart agent-1
# Nuclear option - rebuild everything
npm run volta:resetπ₯οΈ Terminal not working
This is usually a node-pty native module issue:
# Force rebuild containers
docker-compose -f docker-compose.local.yml down
docker system prune -f
npm run volta:upπ Gemini API errors
# Check API key is set
echo $GEMINI_API_KEY
# Test API key in agent
npm run volta:shell:agent1
# Then in agent terminal:
gemini models list- π¬ AI Research: Multi-agent experiments and coordination
- π» Development: AI-assisted coding with multiple agents
- π Education: Learning distributed systems and containerization
- π§ͺ Prototyping: Testing multi-agent workflows
- π Monitoring: Real-time system observation and debugging
- Claude Integration - Add Claude API support alongside Gemini
- Agent Templates - Pre-configured agent types for specific tasks
- Plugin System - Extensible agent capabilities
- Kubernetes Support - Deploy to K8s clusters
- Web IDE - Built-in code editor in the dashboard
- Agent Marketplace - Share and discover agent configurations
This project is licensed under the ISC License - see the LICENSE file for details.
- NATS - Fantastic messaging system
- xterm.js - Web-based terminal emulation
- Next.js - React framework for the dashboard
- Docker - Containerization platform
β Star this repo if you find it useful! β
Report Bug β’ Request Feature β’ Discussions