Skip to main content

Nexus — Enterprise Intelligence Framework

CI PyPI Python License

Nexus is an open-source enterprise intelligence framework for building secure, governed AI applications, retrieval systems, agents, and intelligent workflows.

It sits upstream and around large language models: turning fragmented enterprise data into normalized vectors, contextual knowledge graphs, and grounded, policy-checked answers — without locking you into a particular model provider, vector database, or runtime.

Data Connectivity → Processing & Enrichment → Knowledge & Retrieval → Intelligent RAG
                                     → AI Orchestration → Governance → Observability

Contents


What Nexus gives you

Nexus provides seven composable capabilities. Each is an independently installable package that talks to the others through typed configs, JSONL contracts, CLI, and HTTP — never by importing another layer's code. That is what makes any layer swappable for your own systems.

Capability Package What it does
Data Connectivity nexus.pipeline REST connectors with pagination and SSRF defense, batch file drops, streaming events, CDC (Debezium format)
Processing & Enrichment nexus.processing Format-aware chunking for CSV, JSON, Markdown and text; metadata extraction; FF1 format-preserving tokenization for sensitive fields
Knowledge & Retrieval nexus.retrieval Vector, lexical (BM25-style), hybrid RRF, and knowledge-graph retrieval with pluggable stores
Intelligent RAG nexus.guardrails Grounded answers with citations, PII masking, prompt-injection defense, fail-closed policy checks
AI Orchestration nexus.experience REST API, SDK, CLI, assistant sessions, channel adapters, API-key auth
Governance nexus.security RBAC, multi-tenant isolation, authenticated encryption, immutable audit log
Observability nexus.observability Metrics, structured logs, distributed trace spans, AI interaction events, alerting

Design properties worth knowing about:

  • Runs offline. The default embedding provider is a local hashing projection — no model downloads, no API calls, no network egress. Good for air-gapped evaluation and deterministic tests.
  • Thread-safe and serverless-friendly. In-memory stores are guarded by threading.Lock; in_memory_only=True (the default) skips disk I/O entirely.
  • Typed configuration end to end. Every layer's config is a Pydantic model, so a control plane can introspect the schema and render forms automatically.
  • Multi-tenant by construction. Encryption and tokenization derive a tenant-bound salt (HKDF-SHA256), so two tenants processing identical data produce cryptographically distinct ciphertext.

On the embedding provider: the built-in projection is a deterministic multi-gram hashing embedder, not a trained semantic model. It is excellent for reproducible local development, lexical-adjacent matching, and offline demos. For production semantic search, plug in your own embedding provider — the interface is designed for it. See docs/USING_NEXUS.md.


Installation

Requires Python 3.11 or 3.12.

pip install veloxs-nexus

Optional extras:

pip install "veloxs-nexus[postgres]"   # pgvector + SQLAlchemy persistence
pip install "veloxs-nexus[yaml]"       # YAML configuration files

To work on Nexus itself, see CONTRIBUTING.md.


Quick start

Process a document through the full pipeline and inspect the execution trace:

import nexus

client = nexus.NexusClient(tenant_id="org-finance", in_memory_only=True)

csv_data = """employee_id,department,salary_usd,contact_email
101,Engineering,145000,john.doe@example.com
102,Security,160000,jane.smith@example.com"""

doc = client.process_document(
    document_id="doc-ledger-01",
    name="salaries.csv",
    text=csv_data,
    file_type="csv",
    enable_guardrails=True,
)

print(f"{doc.name}: {len(doc.chunks)} chunks")
print(doc.chunks[0].text)
# [Row ID: 1] employee_id: 101 | department: Engineering | salary_usd: 145000 | contact_email: [EMAIL]

for step in doc.execution_trace:
    print(f"[{step.step_number}/5] {step.stage_name} ({step.duration_ms}ms)")

Each chunk carries a 3072-dimensional embedding normalized to exact L2 unit length:

import math

vector = doc.chunks[0].embedding
print(len(vector), round(math.sqrt(sum(v * v for v in vector)), 6))
# 3072 1.0

Raw fidelity mode

When you need verbatim text — audit logs, code, account identifiers — bypass redaction:

raw = client.process_document(
    document_id="doc-audit-02",
    name="audit.txt",
    text="Transaction 9842 authorized by admin@example.com",
    file_type="txt",
    enable_guardrails=False,
)
print(raw.chunks[0].text)  # preserved verbatim

Build a RAG workflow

Index documents and ask grounded questions. Answers are checked against retrieved context and refused when they cannot be grounded:

import nexus

client = nexus.NexusClient(in_memory_only=True)

doc = client.process_document(
    document_id="arch-01",
    name="architecture.md",
    text=(
        "# Infrastructure\n"
        "All database connections require TLS 1.3 encryption "
        "and mutual certificate authentication."
    ),
    file_type="md",
)
client.index_document(doc)

response = client.ask("What encryption is required for database connections?")
print(response.decision)  # allowed
print(response.answer)  # grounded in the indexed chunk

Using layers individually

Every capability works standalone:

# Vector projection
from nexus.retrieval.engine import RetrievalEngine

vector = RetrievalEngine().embed("Enterprise cloud infrastructure")

# PII masking
from nexus.guardrails.pii import mask_pii
from nexus.guardrails.config import PiiConfig

clean = mask_pii("Contact user@example.com", PiiConfig())

# Tenant-bound encryption
from nexus.security.encryption import encrypt_text, decrypt_text
from nexus.security.config import EncryptionConfig

cfg = EncryptionConfig(secret_key="replace-me", tenant_id="org-acme")
plain = decrypt_text(encrypt_text("Confidential Record", cfg), cfg)

# Format-aware chunking
from nexus.processing.engine import ProcessingEngine

chunks = ProcessingEngine().chunk_document("id,val\n1,Alpha\n2,Beta", file_type="csv")

# Batch ingestion
from nexus.pipeline.batch import run_batch

Command line

Every command takes the path to a platform config:

nexus validate-config configs/nexus.json    # load and validate the config
nexus layers configs/nexus.json             # list configured layers
nexus validate-platform configs/nexus.json  # check every layer is ready
nexus ask configs/nexus.json "What is the MFA policy?" --channel assistant

Architecture

                        ┌──────────────────────────────┐
   your application ──▶ │  nexus.experience            │  REST · SDK · CLI · channels
                        └──────────────┬───────────────┘
                                       │
                        ┌──────────────▼───────────────┐
                        │  nexus.guardrails            │  grounded RAG · PII · policy
                        └──────────────┬───────────────┘
                                       │
                        ┌──────────────▼───────────────┐
                        │  nexus.retrieval             │  vector · lexical · hybrid · graph
                        └──────────────┬───────────────┘
                                       │
                        ┌──────────────▼───────────────┐
                        │  nexus.processing            │  chunking · enrichment · tokenization
                        └──────────────┬───────────────┘
                                       │
                        ┌──────────────▼───────────────┐
                        │  nexus.pipeline              │  REST · batch · streaming · CDC
                        └──────────────────────────────┘

   cross-cutting:  nexus.security (RBAC · tenancy · encryption · audit)
                   nexus.observability (metrics · logs · traces · alerts)

Layers integrate only through configs, JSONL contracts, CLI, and HTTP. Replacing nexus.retrieval with your own vector database, or nexus.guardrails with your own policy engine, requires no changes to the layers around it.

Full detail: docs/architecture.md · docs/USING_NEXUS.md

PostgreSQL + pgvector

For durable persistence, nexus.database ships a reference schema:

from nexus.database import PGVECTOR_DDL_SCHEMA

print(PGVECTOR_DDL_SCHEMA)

Index dimension limit. pgvector's HNSW and IVFFlat indexes support up to 2000 dimensions for the vector type, below the 3072 Nexus emits by default. For an indexed column, either reduce embedding.dimensions to 2000 or below, or use halfvec with pgvector 0.7+. Without an index, 3072-dimension columns still store and scan correctly.


Configuration

Every layer reads a JSON (or, with the [yaml] extra, YAML) config validated by a Pydantic model. The root config at configs/nexus.json wires the layers together.

nexus validate-config configs/nexus.json

Because configs are typed models, you can introspect any layer's schema programmatically:

from nexus.retrieval.config import RetrievalConfig

print(RetrievalConfig.model_json_schema())

Secrets are never read implicitly from the environment by library code. Pass them explicitly, or use the documented env:VAR_NAME indirection. See SECURITY.md.


Running tests

The suite is deterministic and fully offline — no network, no cloud services, no model downloads.

git clone https://github.com/Veloxs-ai/nexus.git
cd nexus
python3 -m venv .venv && source .venv/bin/activate
python -m pip install -e ".[dev]"
python -m pytest -q

Each layer has its own suite:

for layer in enterprise-data-pipeline data-processing-enrichment \
             embedding-retrieval-intelligence orchestration-guardrails \
             experience-api-engagement security-governance \
             observability-monitoring; do
  (cd "$layer" && python -m pip install -e ".[dev]" -q && python -m pytest -q)
done

Lint and format with Ruff:

ruff check .
ruff format --check .

Nexus and Nexora

Nexus — this project — is the open-source Enterprise Intelligence Framework, licensed under Apache-2.0. It is free to use, modify, and distribute, including commercially.

Nexora is a separate, proprietary commercial SaaS platform from Veloxs AI Inc., built on top of Nexus. It adds enterprise administration, visual configuration, multi-tenancy management, governance workflows, operations tooling, managed infrastructure, and enterprise support experiences. Nexora's source code is not part of this repository and is not covered by this license.

Nexus Nexora
License Apache-2.0, open source Proprietary, commercial
Delivery Library, CLI, self-hosted service Managed SaaS
You operate it Yes No — managed for you
Configuration Typed config files and code Visual, no-code control plane
Multi-tenancy Primitives (isolation, key derivation) Full tenant administration
Support Community, best-effort Contracted SLA

Nexus is complete and useful on its own. Nexora exists for teams who want the framework operated for them. Commercial inquiries: hello@veloxs.ai.


Contributing

Contributions are welcome. Start with CONTRIBUTING.md for the development setup, project conventions, and pull-request process.

Everyone participating is expected to follow our Code of Conduct.


License

Copyright © 2026 Veloxs AI Inc.

Licensed under the Apache License, Version 2.0. See NOTICE for attribution and third-party dependency information.

Trademarks. "Nexus", "Nexora", "Veloxs", and "Veloxs AI", together with associated logos and branding, are trademarks of Veloxs AI Inc. As set out in Section 6 of the Apache License, this license grants no rights to use these marks. You may state truthfully that your software is built on Nexus; you may not imply endorsement by or affiliation with Veloxs AI Inc. See NOTICE for details.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

veloxs_nexus-3.0.0.tar.gz (72.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

veloxs_nexus-3.0.0-py3-none-any.whl (122.5 kB view details)

Uploaded Python 3

File details

Details for the file veloxs_nexus-3.0.0.tar.gz.

File metadata

  • Download URL: veloxs_nexus-3.0.0.tar.gz
  • Upload date:
  • Size: 72.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for veloxs_nexus-3.0.0.tar.gz
Algorithm Hash digest
SHA256 3f2492d2418c391652a16019757f423463d9d6272c5ddaf59ca87a95a6e49c2d
MD5 4a703214937f79a4a6a86b60e27f5f8a
BLAKE2b-256 5f43d60f2597e8b259446c18e5f2f2f43fb245c8694fdf3516afc0d99477c3f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for veloxs_nexus-3.0.0.tar.gz:

Publisher: publish.yml on Veloxs-ai/nexus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file veloxs_nexus-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: veloxs_nexus-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 122.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for veloxs_nexus-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b976a8cb3b45f55a328af8e8f787f1be408db9d7f5002cda14e7c41e983779c0
MD5 48a65efaead515aad98d5a1b3748f68f
BLAKE2b-256 eb50a7aef4f63e5e162b00a2bd6a5bb5787b32cd6fbcaa0239dc0755faa3ecc9

See more details on using hashes here.

Provenance

The following attestation bundles were made for veloxs_nexus-3.0.0-py3-none-any.whl:

Publisher: publish.yml on Veloxs-ai/nexus

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

3.0.0 This release

2 files

2.4.0

2 files

2.3.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page