Nexora AI Agent Mode is an enterprise-grade AI deployment and orchestration platform designed for multi-provider AI integration with audit-first, reproducible deployments.
The core orchestration layer that manages multi-provider AI interactions.
Location: /agent/nexora_agent/
Key Modules:
core/agent.py: Main agent orchestration logicproviders/: Provider adapters for different AI backends
openai_provider.py: OpenAI GPT integrationgoogle_gemini.py: Google Gemini integrationxai_grok.py: xAI Grok integrationgeneric_http.py: Generic HTTP API adapterconfig/: Configuration managementmcp_cli/: MCP-style deployment automationArchitecture Pattern:
┌─────────────────────────────────────────┐
│ Nexora Agent Core │
├─────────────────────────────────────────┤
│ Agent Orchestrator │
│ - Request routing │
│ - Fallback logic │
│ - Retry mechanisms │
└──────────────┬──────────────────────────┘
│
┌──────────┴───────────┐
│ Provider Factory │
└──────────┬───────────┘
│
┌──────────┴────────────────────┐
│ │
┌───▼────┐ ┌──────┐ ┌──────┐ ┌────────┐
│ OpenAI │ │Gemini│ │ Grok │ │Generic │
│Provider│ │Provid│ │Provid│ │ HTTP │
└────────┘ └──────┘ └──────┘ └────────┘
Provider Abstraction:
All providers implement the BaseProvider interface:
class BaseProvider(ABC):
@abstractmethod
def execute(self, prompt: str, **kwargs) -> AgentResponse:
pass
This ensures:
Location: /gui/
Framework: PySide6 (Qt for Python)
Justification for PySide6:
Architecture:
┌─────────────────────────────────────┐
│ GUI Layer (PySide6) │
│ - Main Window │
│ - Provider Selector │
│ - Prompt Input │
│ - Response Display │
└──────────────┬──────────────────────┘
│
│ imports
│
┌──────────────▼──────────────────────┐
│ Nexora Agent Core │
│ (No GUI-specific logic) │
└─────────────────────────────────────┘
Separation of Concerns:
Location: /web/
Framework: Next.js 14 with App Router
Justification for App Router:
Package Manager: npm (default, most stable for Next.js)
Architecture:
┌─────────────────────────────────────┐
│ Next.js Frontend │
│ Pages: │
│ - Home (/) │
│ - Console (/console) │
└──────────────┬──────────────────────┘
│
│ HTTP API calls
│
┌──────────────▼──────────────────────┐
│ Backend API (Future) │
│ - Agent proxy endpoint │
│ - Authentication │
│ - Rate limiting │
└─────────────────────────────────────┘
Static Export Configuration:
Location: /agent/nexora_agent/mcp_cli/
Purpose: Deployment automation and operations
Commands:
# Environment management
nexora-mcp deploy --env prod
# Workflow automation
nexora-mcp workflow build-agent
# Testing
nexora-mcp test --component agent
# Health checks
nexora-mcp health https://nexorasim.github.io
Integration with CI/CD:
User Input
↓
Agent.execute(prompt, provider)
↓
Provider Factory
↓
Specific Provider
↓
AI Backend API
↓
AgentResponse
↓
User Output
Browser (React)
↓ HTTP POST
Backend API Endpoint
↓
Agent.execute(prompt, provider)
↓
Provider Chain (same as above)
↓
JSON Response
↓
Browser Display
API Keys:
.env files (never committed).env.dev, .env.staging, .env.prodpython-dotenvos.environ.get()Best Practices:
Adding New Providers:
nexora_agent/providers/BaseProviderexecute() methodProviderFactory.PROVIDER_MAP.env.exampleExample:
class NewProvider(BaseProvider):
def execute(self, prompt: str, **kwargs) -> AgentResponse:
# Implementation
pass
# In provider_factory.py
PROVIDER_MAP = {
"new_provider": NewProvider,
# ...
}
| Component | Technology | Version | Justification |
|---|---|---|---|
| Agent Core | Python | 3.11+ | Modern features, type hints, performance |
| Dependency Mgmt | pip + requirements.txt | - | Standard, reproducible, CI/CD friendly |
| GUI Framework | PySide6 | 6.6.0+ | Cross-platform, LGPL, Qt6 features |
| GUI Packaging | PyInstaller | 6.3.0+ | Industry standard, platform-specific binaries |
| Web Framework | Next.js | 14.1.0 | App Router, static export, TypeScript |
| Web Language | TypeScript | 5.3.3+ | Type safety, better DX |
| CSS Framework | Tailwind CSS | 3.4.1 | Utility-first, rapid development |
| HTTP Client | Axios | 1.6.5 | Promise-based, interceptors |
| CI/CD | GitHub Actions | - | Native GitHub integration |
| Hosting | GitHub Pages | - | Free, automatic deployment |
dev)
staging)
prod)
Code Push (main branch)
↓
GitHub Actions Triggered
↓
┌─────────────────┬────────────────┐
│ │ │
│ Web Build │ Agent Tests │
│ - npm install │ - pip install │
│ - npm build │ - pytest │
│ - Static export│ │
│ ↓ │ │
│ GitHub Pages │ │
└─────────────────┴────────────────┘
↓
Deployment Complete
↓
Post-deploy Checks
(via MCP CLI)
Web Front-End:
out/ artifactDesktop Binaries:
Agent Core:
Logging:
logging module%(asctime)s - %(name)s - %(levelname)s - %(message)sMetrics to Track:
Future Enhancements:
Current Architecture:
Future Scaling:
The Nexora AI Agent Mode architecture is designed for: