No description
  • Python 99.4%
  • PowerShell 0.3%
  • Batchfile 0.1%
Find a file
GozerAI cb6747c5de
Some checks are pending
Security / dependency-scan (push) Waiting to run
Security / code-scan (push) Waiting to run
chore(community): rebuild leak-clean public community edition
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>
2026-07-03 03:48:26 -04:00
.github chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
alembic chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
assets chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
config chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
docs/architecture chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
infrastructure/docker chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
legal chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
scripts chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
services chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
signatures/version1 chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
src chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
tests chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
tools chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
.gitignore chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
alembic.ini chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
CHANGELOG.md chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
CONTRIBUTING.md chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
docker-compose.test.yml chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
Dockerfile chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
LICENSE chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
LICENSING.md chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
nexus_cli.py chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
NOTICE chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
pyproject.toml chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
README.md chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
requirements.txt chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
run_service.sh chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
setup.py chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
test_platform.py chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00
test_providers_import.py chore(community): rebuild leak-clean public community edition 2026-07-03 03:48:26 -04:00

Nexus

Shared AI Infrastructure for Control Planes and Products

License: AGPL v3 Python 3.8+ Code style: black

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:

  1. Open Source: GNU Affero General Public License v3.0

    • Free for non-commercial use
    • Requires source disclosure for network services
  2. Commercial License: For proprietary use without AGPL obligations

Some features require a commercial license. Unlicensed usage defaults to the Community tier.


Documentation


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


Nexus - Advancing towards sentient AGI

Copyright (c) 2025 Christopher R. Arsenault. All rights reserved.