- Python 99.4%
- PowerShell 0.3%
- Batchfile 0.1%
Public community-tier build of Nexus. Gated Pro/Enterprise modules are replaced with license-required stubs; internal control-plane integrations, private infrastructure, model-routing WIP, and internal ops docs are removed. Telemetry dependency is unpinned and all non-public references are scrubbed. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> |
||
|---|---|---|
| .github | ||
| alembic | ||
| assets | ||
| config | ||
| docs/architecture | ||
| infrastructure/docker | ||
| legal | ||
| scripts | ||
| services | ||
| signatures/version1 | ||
| src | ||
| tests | ||
| tools | ||
| .gitignore | ||
| alembic.ini | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| docker-compose.test.yml | ||
| Dockerfile | ||
| LICENSE | ||
| LICENSING.md | ||
| nexus_cli.py | ||
| NOTICE | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
| run_service.sh | ||
| setup.py | ||
| test_platform.py | ||
| test_providers_import.py | ||
Nexus
Shared AI Infrastructure for Control Planes and Products
Shared providers, memory, RAG, discovery, and observability for higher-level systems and control planes
Overview
Nexus is the shared infrastructure layer for products that need:
- Multi-model routing - Provider selection, orchestration, and ensemble execution
- Memory and RAG primitives - Shared context, retrieval, and storage services
- Discovery and observability - Resource discovery, monitoring, and health telemetry
- Execution primitives - Reusable APIs, pipelines, and interoperability bridges
Nexus does not own organizational strategy, executive decision-making, or company direction. Those concerns belong in an external control plane.
Architectural Role
Nexus should be read as infrastructure, not the boardroom:
- It owns reusable AI services.
- It can publish context, health, and execution primitives.
- It can interoperate with higher-level systems.
- It should not be the final authority on strategy or executive governance.
Key Features
Ensemble System
- Multiple ensemble strategies (voting, weighted, hybrid, adaptive, meta-learning)
- Multi-provider support (OpenAI, Anthropic, and extensible)
- Async execution with intelligent aggregation
- Quality scoring and cost optimization
Memory & Knowledge
- Factual and skill memory engines
- Pattern recognition and knowledge validation
- Knowledge expansion with gap detection
- Memory analytics and optimization
RAG & Context
- Large context window support via RAG
- Adaptive orchestration and context management
- Learning pathways and domain knowledge base
Reasoning Engines
- Meta-reasoning for self-improvement
- Chain-of-thought reasoning
- Pattern-based inference
- Dynamic adaptive learning
Discovery System
- GitHub, HuggingFace, ArXiv, PyPI integrations
- Local model management (Ollama)
- Web search (DuckDuckGo, Serper, Brave)
Production Features
- API key authentication with RBAC
- Memory + Redis caching with TTL
- Prometheus metrics and health checks
- Budget management and usage analytics
- Rate limiting and quota management
- Docker and Kubernetes deployment
Quick Start
Installation
# Clone the repository
git clone https://git.gozerai.com/GozerAI/nexus.git
cd Nexus
# Install dependencies
pip install -r requirements.txt
# Install Nexus
pip install -e .
Configuration
# config/default.yaml
ensemble:
strategy: "adaptive"
models:
- provider: "openai"
model: "gpt-4"
weight: 0.5
- provider: "anthropic"
model: "claude-3-opus"
weight: 0.5
memory:
enabled: true
backend: "postgresql"
rag:
enabled: true
vector_store: "faiss"
Basic Usage
from nexus.core import EnsembleCore
from nexus.core.strategies import AdaptiveStrategy
from nexus.memory import KnowledgeBase
from nexus.rag import RAGVectorEngine
# Initialize ensemble
ensemble = EnsembleCore(
strategy=AdaptiveStrategy(),
config_path="config/default.yaml"
)
# Initialize memory system
knowledge_base = KnowledgeBase()
# Initialize RAG
rag_engine = RAGVectorEngine()
# Query with RAG augmentation
query = "Explain quantum computing"
context = await rag_engine.retrieve_context(query)
response = await ensemble.query(query, context=context)
print(f"Answer: {response.answer}")
print(f"Confidence: {response.confidence}")
Run API Server
# Start the Nexus API
nexus-api --config config/default.yaml
# API available at http://localhost:5000
API Example
# Ensemble inference
curl -X POST http://localhost:5000/api/v1/ensemble/query \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{
"query": "What is consciousness?",
"strategy": "adaptive",
"use_rag": true
}'
# System health
curl http://localhost:5000/api/v1/health
Deployment
Docker
# Build image
docker build -t nexus:latest -f infrastructure/docker/Dockerfile .
# Run container
docker run -p 5000:5000 \
-e OPENAI_API_KEY=your-key \
-e ANTHROPIC_API_KEY=your-key \
nexus:latest
Kubernetes (Helm)
# Install Nexus with Helm
helm install nexus infrastructure/helm/nexus/ \
--set api.replicas=3 \
--set redis.enabled=true \
--set postgresql.enabled=true
# Check status
kubectl get pods -l app=nexus
Licensing
Nexus is dual-licensed:
-
Open Source: GNU Affero General Public License v3.0
- Free for non-commercial use
- Requires source disclosure for network services
-
Commercial License: For proprietary use without AGPL obligations
- Visit gozerai.com/pricing
- Contact: sales@gozerai.com
- See LICENSING.md for tier details
Some features require a commercial license. Unlicensed usage defaults to the Community tier.
Documentation
- Shared Infrastructure Role
- Getting Started Guide
- Architecture Overview
- API Reference
- Deployment Guide
- Configuration Reference
- Contributing Guide
Contributing
We welcome contributions! Please see our Contributing Guide for details.
Important: All contributions require signing our Contributor License Agreement (CLA). This is handled automatically when you submit your first pull request.
Development Setup
# Clone repo
git clone https://git.gozerai.com/GozerAI/nexus.git
cd Nexus
# Install dev dependencies
pip install -r requirements-dev.txt
# Run tests
pytest tests/ -v
# Run linters
black src/
flake8 src/
mypy src/
Citation
If you use Nexus in your research, please cite:
@software{nexus2025,
title = {Nexus: Advanced AI Ensemble, Orchestrator \& Consciousness Framework},
author = {Arsenault, Christopher R.},
year = {2025},
url = {https://git.gozerai.com/GozerAI/nexus}
}
Community
- Issues: https://git.gozerai.com/GozerAI/nexus/issues
- Email: support@gozerai.com
Nexus - Advancing towards sentient AGI
Copyright (c) 2025 Christopher R. Arsenault. All rights reserved.