For Agent Development:
For GUI Development:
For Web Development:
For CI/CD:
Obtain API keys from the following providers:
git clone https://github.com/nexorasim/nexorasim.github.io.git
cd nexorasim.github.io
cd agent
# Create virtual environment
python -m venv venv
# Activate virtual environment
# On Linux/macOS:
source venv/bin/activate
# On Windows:
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Configure environment
cp .env.example .env
# Edit .env with your API keys
nano .env # or use your preferred editor
# Test CLI
python -m nexora_agent.cli status
# Run a test prompt
python -m nexora_agent.cli run "Hello, test the agent" --provider openai
# Test specific provider
python -m nexora_agent.cli test-provider --provider google_gemini
cd ../gui
# Use same virtual environment or create new one
python -m venv venv
source venv/bin/activate # or venv\Scripts\activate on Windows
# Install dependencies
pip install -r requirements.txt
pip install -r ../agent/requirements.txt
# Run GUI
python main.py
cd ../web
# Install dependencies
npm install
# Run development server
npm run dev
# Open http://localhost:3000 in browser
.env Structure:
# OpenAI Configuration
OPENAI_API_KEY=sk-...
OPENAI_MODEL=gpt-4
OPENAI_ENABLED=true
# Google Gemini Configuration
GOOGLE_API_KEY=AIza...
GEMINI_MODEL=gemini-pro
GEMINI_ENABLED=true
# xAI Grok Configuration
XAI_API_KEY=xai-...
XAI_ENDPOINT=https://api.x.ai/v1
XAI_MODEL=grok-1
XAI_ENABLED=false
# Generic HTTP Provider Configuration
GENERIC_API_KEY=...
GENERIC_ENDPOINT=https://your-api.com/v1/completions
GENERIC_ENABLED=false
# Agent Configuration
DEFAULT_PROVIDER=openai
FALLBACK_PROVIDERS=google_gemini,xai_grok
MAX_RETRIES=3
REQUEST_TIMEOUT=30
# Logging
LOG_LEVEL=INFO
Create separate configuration files for different environments:
cd agent
cp .env.example .env.dev
cp .env.example .env.staging
cp .env.example .env.prod
Edit each file with environment-specific settings:
.env.dev: Local development, verbose logging, mock providers.env.staging: Pre-production, test API keys, monitoring enabled.env.prod: Production, real API keys, rate limiting, comprehensive loggingpython -m nexora_agent.mcp_cli.mcp_cli deploy --env dev
python -m nexora_agent.mcp_cli.mcp_cli deploy --env staging
python -m nexora_agent.mcp_cli.mcp_cli deploy --env prod
cd gui
# Ensure virtual environment is activated
venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
pip install -r ..\agent\requirements.txt
# Build with PyInstaller
pyinstaller nexora_agent.spec
# Binary location: dist\NexoraAgent\NexoraAgent.exe
cd gui
# Activate virtual environment
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install -r ../agent/requirements.txt
# Build with PyInstaller
pyinstaller nexora_agent.spec
# App bundle location: dist/NexoraAgent.app
cd gui
# Activate virtual environment
source venv/bin/activate
# Install dependencies
pip install -r requirements.txt
pip install -r ../agent/requirements.txt
# Build with PyInstaller
pyinstaller nexora_agent.spec
# Binary location: dist/NexoraAgent/NexoraAgent
# Optional: Create AppImage or .deb package
Before distributing:
cd web
# Install dependencies
npm install
# Build for production
npm run build
# Static files in: out/
# Build the site
cd web
npm run build
# Deploy to GitHub Pages (example using gh-pages package)
npm install -g gh-pages
gh-pages -d out
The repository includes automated deployment workflows.
Trigger Deployment:
git add .
git commit -m "Update web front-end"
git push origin main
# Using MCP CLI
python -m nexora_agent.mcp_cli.mcp_cli health https://nexorasim.github.io
# Manual verification
curl -I https://nexorasim.github.io
The repository includes three main workflows:
.github/workflows/deploy-web.yml)Triggers:
main branch (changes in web/)Steps:
.github/workflows/build-agent.yml)Triggers:
main branch (changes in agent/ or gui/)Steps:
.github/workflows/ci.yml)Triggers:
main or dev branchesSteps:
For CI/CD to work properly, configure these secrets:
OPENAI_API_KEY (for testing)GOOGLE_API_KEY (for testing)Via GitHub UI:
Via GitHub CLI:
gh workflow run deploy-web.yml
gh workflow run build-agent.yml
Via MCP CLI:
python -m nexora_agent.mcp_cli.mcp_cli workflow deploy-web.yml
# Update version numbers
# - agent/nexora_agent/__init__.py
# - web/package.json
# - gui/main.py
# Commit changes
git add .
git commit -m "Release v1.0.0"
git push origin main
# Tag the release
git tag -a v1.0.0 -m "Release version 1.0.0"
git push origin v1.0.0
# Or use GitHub UI to create release
# Check GitHub Actions
# - Verify all workflows complete successfully
# - Download artifacts if needed
# Verify web deployment
curl https://nexorasim.github.io
# Test desktop binaries
# - Download from GitHub Releases
# - Test on target platforms
# Run health checks
python -m nexora_agent.mcp_cli.mcp_cli health https://nexorasim.github.io
# Test all providers
python -m nexora_agent.cli test-provider --provider openai
python -m nexora_agent.cli test-provider --provider google_gemini
# Monitor logs for errors
Method 1: Revert Commit
git revert <commit-hash>
git push origin main
# Wait for automatic redeployment
Method 2: Manual Redeploy Previous Version
git checkout <previous-tag>
cd web
npm run build
gh-pages -d out
# Revert to previous version
git checkout <previous-tag>
# Reinstall dependencies
cd agent
pip install -r requirements.txt
# Apply previous environment config
python -m nexora_agent.mcp_cli.mcp_cli deploy --env prod
Agent Logs:
# View logs in real-time
tail -f agent.log
# Search for errors
grep ERROR agent.log
# Analyze provider performance
grep "execution_time" agent.log | awk '{sum+=$NF; count++} END {print sum/count}'
Key Metrics:
Implement Monitoring (Future):
# Example: Send metrics to monitoring service
import sentry_sdk
sentry_sdk.init(
dsn="your-sentry-dsn",
traces_sample_rate=1.0,
)
Weekly:
Monthly:
Quarterly:
Solution:
# Verify .env file exists and has correct keys
cat agent/.env
# Ensure .env is loaded
export $(cat agent/.env | xargs)
# Test configuration
python -m nexora_agent.cli status
Solution:
# Clear previous builds
rm -rf gui/build gui/dist
# Reinstall dependencies
pip install --force-reinstall -r gui/requirements.txt
# Rebuild
cd gui
pyinstaller nexora_agent.spec
Solution:
# Check Node version in workflow
# Ensure it matches local development
# Clear npm cache
npm cache clean --force
# Rebuild locally
cd web
rm -rf node_modules .next
npm install
npm run build
Solution:
/docs/ directoryThis deployment guide covers local development, CI/CD setup, production deployment, and maintenance for the Nexora AI Agent Mode platform. Follow these procedures to ensure reproducible, auditable, and reliable deployments.
For architecture details, see /docs/architecture.md.
For agent usage, see /docs/agent-mode.md.
For provider configuration, see /docs/providers.md.