Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

History

1 Commit

Repository files navigation

Nexus

GozerAILicensePythonPro & Enterprise

Shared AI Infrastructure for Control Planes and Products

Shared providers, memory, RAG, discovery, and observability for higher-level AI systems and products


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

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://github.com/GozerAI/nexus.git
cd Nexus
# Install dependencies
pip install -r requirements.txt
# Install Nexus
pip install -e .

Configuration

# config/default.yamlensemble:
strategy: "adaptive"models:
- provider: "openai"model: "gpt-4"weight: 0.5
- provider: "anthropic"model: "claude-3-opus"weight: 0.5memory:
enabled: truebackend: "postgresql"rag:
enabled: truevector_store: "faiss"

Basic Usage

fromnexus.coreimportEnsembleCorefromnexus.core.strategiesimportAdaptiveStrategyfromnexus.memoryimportKnowledgeBasefromnexus.ragimportRAGVectorEngine# Initialize ensembleensemble=EnsembleCore(
strategy=AdaptiveStrategy(),
config_path="config/default.yaml"
)
# Initialize memory systemknowledge_base=KnowledgeBase()
# Initialize RAGrag_engine=RAGVectorEngine()
# Query with RAG augmentationquery="Explain quantum computing"context=awaitrag_engine.retrieve_context(query)
response=awaitensemble.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://github.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://github.com/GozerAI/nexus}
}

Community


Nexus - Advancing towards sentient AGI

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

About

Shared AI infrastructure — LLM providers, memory, RAG, discovery, and observability for building agents and AI products

Topics

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages