No description
  • Python 99.5%
  • PowerShell 0.3%
  • Batchfile 0.1%
Find a file
Chris Arseno 3d65d8fe52
Some checks failed
CI / test (3.10) (push) Has been cancelled
CI / test (3.11) (push) Has been cancelled
CI / test (3.12) (push) Has been cancelled
Security / dependency-scan (push) Has been cancelled
Security / code-scan (push) Has been cancelled
fix(licensing): stub missing paid core engines, restore community ensemble
The community edition referenced three core engine modules that were omitted
from the release carve-out, leaving dangling lazy imports that raised a raw
ModuleNotFoundError (leaking the internal module path) instead of a clean
licensing error:

- nexus.core.strategic_ensemble  (Enterprise; flag nxs.strategic.analysis)
- nexus.core.ensemble_core_v2    (Pro; flag nxs.ensemble.multi_model)

Both are now raise-ImportError license stubs pointing at
https://gozerai.com/pricing, matching expert_router / pipeline_executor /
ensemble_consensus / providers.ensemble. Any access path (the enhanced_api
gated property, the platform.py ensemble fallback, or a direct import) now
fails with a clean, branded ImportError and no path leak.

Also restores the community reference ensemble nexus.core.ensemble_core
(offline ModelStub + heuristic scoring, no paid providers) which
nexus.core.__init__ and the community smoke tests import — keeping the free
tier importable.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-03 18:18:25 -04:00
.github chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
alembic chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
assets chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
config chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
docs chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
infrastructure/docker chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
legal chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
scripts feat(licensing): gate paid engines as license stubs for community edition 2026-07-03 17:57:18 -04:00
services chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
signatures/version1 chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
src fix(licensing): stub missing paid core engines, restore community ensemble 2026-07-03 18:18:25 -04:00
tests chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
tools chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
.env.example chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
.env.test.example chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
.gitignore chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
alembic.ini chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
CHANGELOG.md chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
CONTRIBUTING.md chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
docker-compose.test.yml chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
Dockerfile chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
LICENSE chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
LICENSING.md chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
nexus_cli.py chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
NOTICE chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
pyproject.toml chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
README.md chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
requirements.txt chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
run_service.sh chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
setup.py chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
status_check.py chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
test_all_modules.py chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
test_cog_eng_import.py chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
test_consolidation.py feat(licensing): gate paid engines as license stubs for community edition 2026-07-03 17:57:18 -04:00
test_functional.py chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
test_imports.py chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
test_platform.py chore(release): nexus community edition 2026-07-03 16:27:05 -04:00
test_providers_import.py chore(release): nexus community edition 2026-07-03 16:27:05 -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


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 your own 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.