This guide provides detailed instructions for setting up ROMA using either Docker or native installation (recommended for development).
- Docker and Docker Compose installed
- Git
- Ubuntu 20.04+ or Debian 11+
- sudo privileges
- Git
# Clone the repository
git clone https://github.com/yourusername/SentientResearchAgent.git
cd SentientResearchAgent
# Run the setup script
./setup.shThe setup script will prompt you to choose between:
- Docker setup - Containerized environment, best for production
- Native setup - Direct installation, best for development
./setup.sh --docker
# or
make setup-docker- Checks Docker and Docker Compose installation
- Creates
.envfile from template - Builds optimized Docker images using UV for fast dependency installation
- Starts all services (backend and frontend)
- Verifies health of services
# View logs
cd docker && docker compose logs -f
# Stop services
cd docker && docker compose down
# Restart services
cd docker && docker compose restart
# View status
cd docker && docker compose ps
# Rebuild after changes
cd docker && docker compose build- Backend: Python 3.12 with UV package manager
- Frontend: Node.js 23.11.0 with npm 10.9.2
- Volumes: Mounted for live development
- Ports: Backend (5000), Frontend (5173)
./setup.sh --native
# or
make setup-native- Installs Python 3.12 from deadsnakes PPA
- Installs PDM and UV package managers
- Installs NVM, Node.js 23.11.0, and npm 10.9.2
- Initializes PDM project with UV backend
- Creates virtual environment and installs dependencies
- Installs frontend dependencies
- Creates necessary directories
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.12 python3.12-venv python3.12-dev# Install PDM
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
# Install UV
curl -LsSf https://astral.sh/uv/install.sh | sh
# Add to PATH (add to ~/.bashrc)
export PATH="$HOME/.local/bin:$PATH"
source "$HOME/.cargo/env"# Install NVM
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc
# Install Node.js and npm
nvm install 23.11.0
nvm use 23.11.0
npm install -g npm@10.9.2# Initialize PDM
pdm init --non-interactive --python 3.12 --dist
pdm config use_uv true
# Install dependencies
eval "$(pdm venv activate)"
pdm install
# Install frontend
cd frontend && npm install- Copy
.env.exampleto.env - Add your LLM API keys
- Optional: Configure comprehensive S3 mounting:
# ===== S3 Mounting Configuration ===== # Enable S3 mounting (accepts: true/yes/1/on/enabled) S3_MOUNT_ENABLED=true # Universal mount directory (identical across all platforms) S3_MOUNT_DIR=/opt/sentient # AWS S3 Configuration S3_BUCKET_NAME=your-s3-bucket AWS_ACCESS_KEY_ID=your_aws_key AWS_SECRET_ACCESS_KEY=your_aws_secret AWS_REGION=us-east-1 # ===== E2B Integration (Optional) ===== E2B_API_KEY=your_e2b_api_key_here
- Customize
sentient.yamlas needed
🔒 Security Features in Configuration:
- Path validation: Mount directories are validated against injection attacks
- AWS verification: Credentials are tested before mounting attempts
- FUSE checking: System dependencies verified automatically
- Mount verification: Comprehensive functionality testing before proceeding
- Flexible booleans:
S3_MOUNT_ENABLEDaccepts multiple true/false formats
SentientResearchAgent includes a comprehensive S3 mounting solution for seamless data persistence across all environments:
# During setup, you'll be asked:
# "Setup S3 mounting for data persistence? (y/n)"
# Universal mount directory: /opt/sentient (identical across all platforms)🔒 Enterprise-Grade Security Features:
- 🛡️ Path Injection Protection - Validated mount directories prevent security vulnerabilities
- 🔐 AWS Credentials Validation - Pre-flight checks ensure S3 bucket access before mounting
- 📁 Safe Environment Parsing - Secure handling of configuration files and environment variables
- 🔍 Mount Verification - Comprehensive testing of mount functionality before proceeding
- ⚡ FUSE Dependency Checking - Automatic verification of macFUSE/FUSE requirements
🚀 Advanced Mounting Capabilities:
- 🔄 Exact Path Matching - Identical mount paths across local, Docker, and E2B environments
- ⚡ Zero-Sync Latency - Live filesystem access via high-performance goofys mounting
- 📁 Dynamic Project Isolation - Runtime project-based folders with configurable structures
- 🛠 Cross-Platform Support - Seamless operation on macOS and Linux with auto-installation
- 🔐 Persistent Services - Auto-mount on boot via systemd/launchd with proper configuration
- 🔧 Flexible Configuration - Boolean values accept multiple formats (true/yes/1/on/enabled)
🏗️ Architecture Benefits:
- Unified Data Layer: All environments access the exact same S3-mounted directory
- No Path Translation: Eliminates complexity with consistent
${S3_MOUNT_DIR}across all systems - Instant Availability: Files written by data toolkits appear immediately in E2B sandboxes
- Secure Docker Integration: Dynamic compose file selection with validated mount paths
- Production-Ready: Enterprise security validation with comprehensive error handling
How It Works:
# Local System: Data toolkit saves to
${S3_MOUNT_DIR}/project_123/binance/price_data_1642567890.parquet
# Docker Container: Exact same path
${S3_MOUNT_DIR}/project_123/binance/price_data_1642567890.parquet
# E2B Sandbox: Identical path structure
${S3_MOUNT_DIR}/project_123/binance/price_data_1642567890.parquetMake sure that S3_MOUNT_DIR is universal across all platform as absolute path so the path of the files would be consistent.
Perfect data consistency with zero configuration overhead!
When you run ./setup.sh and choose Docker, the script:
- Validates
S3_MOUNT_ENABLEDandS3_MOUNT_DIRfrom your.env. - If enabled and valid, starts Compose with
docker/docker-compose.ymlplus the S3 overridedocker/docker-compose.s3.yml. - The override grants FUSE permissions (
/dev/fuse,SYS_ADMIN, apparmor unconfined) required forgoofysinside the container. - The backend container entrypoint runs
/usr/local/bin/startup.sh, which mounts S3 usinggoofysbefore launching the app.
macOS note (Docker mode): Docker Desktop does not support FUSE mounts inside containers. Our setup mounts S3 on the host at the universal path (/opt/sentient) and bind-mounts it into the container. The container startup detects the existing mount and verifies it maps to the intended bucket, skipping in-container goofys. On Linux Docker engines, the container can mount directly.
Pass additional goofys flags via the environment variable GOOFYS_EXTRA_ARGS in your .env:
# .env
S3_MOUNT_ENABLED=true
S3_MOUNT_DIR=/opt/sentient
S3_BUCKET_NAME=your-s3-bucket
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_REGION=us-east-1
# Optional: extra goofys flags
GOOFYS_EXTRA_ARGS="--allow-other --stat-cache-ttl=10s --type-cache-ttl=10s"Notes:
- All variables from
.envare injected into the backend container by Compose and read bystartup.sh. - The command specified in the image (
uv run python -m sentientresearchagent) is forwarded unchanged bystartup.shviaexec "$@".
# Start backend
screen -S backend_server
eval "$(pdm venv activate)"
python -m sentientresearchagent
# Press Ctrl+A, then D to detach
# Start frontend
screen -S frontend_server
cd frontend && npm run dev
# Press Ctrl+A, then D to detach
# View screens
screen -ls
# Reattach to screen
screen -r backend_server# Terminal 1 - Backend
eval "$(pdm venv activate)"
python -m sentientresearchagent
# Terminal 2 - Frontend
cd frontend && npm run devBoth setup methods require API keys in the .env file:
# OpenRouter API Key (required)
OPENROUTER_API_KEY=your_openrouter_api_key_here
# Optional API Keys
EXA_API_KEY=your_exa_api_key_here
GOOGLE_GENAI_API_KEY=your_google_genai_api_key_here- Main config:
sentient.yaml - Environment:
.env(created from.env.example) - Agent profiles:
src/sentientresearchagent/hierarchical_agent_framework/agent_configs/profiles/
- Port conflicts: Ensure ports 5000 and 5173 are free
- Permission denied: Run Docker commands with sudo or add user to docker group
- Build failures: Clear Docker cache with
docker system prune
- Python version: Ensure Python 3.12 is active
- PDM not found: Add
~/.local/binto PATH - UV not found: Source
~/.cargo/env - Node version: Use
nvm use 23.11.0to switch versions
# Check backend
curl http://localhost:5000/api/health
# Check frontend
curl http://localhost:3000- Docker logs:
cd docker && docker compose logs -f - Native logs: Check
logs/directory in project root
- Backend: Changes in
src/are auto-reloaded - Frontend: Vite HMR provides instant updates
- Config: Restart services after changing
sentient.yaml
# With specific config
python -m sentientresearchagent --config sentient.yaml
# With different profile
python -m sentientresearchagent --profile deep_research_agent