Skip to main content

Trinity Nexus — sovereign adaptive intelligence (Omega Foundation)

Project description

Trinity Nexus

Sovereign, terminal-native, adaptive intelligence. Installed like Claude Code, runs entirely local via Ollama. Constitution: Omega Foundation 1.0 — a 33-section operating prompt that defines identity, memory, truth rules, and response behavior per every turn.

███    ██ ███████ ██   ██ ██    ██ ███████
████   ██ ██       ██ ██  ██    ██ ██
██ ██  ██ █████     ███   ██    ██ ███████
██  ██ ██ ██       ██ ██  ██    ██      ██
██   ████ ███████ ██   ██  ██████  ███████

T R I N I T Y   N E X U S
adaptive intelligence · local-first · truth before comfort

Install

Prereqs

  1. Python 3.12+
  2. Git
  3. Ollama — https://ollama.com/download
  4. ollama pull qwen3:4b bge-m3 (~2 GB total)

macOS / Linux / WSL

ORACLE_REPO_URL=https://github.com/celestialarchitect-ux/trinity-nexus \
  curl -sSL https://github.com/celestialarchitect-ux/trinity-nexus/raw/main/install.sh | bash

Windows (PowerShell)

$env:ORACLE_REPO_URL="https://github.com/celestialarchitect-ux/trinity-nexus"; `
  irm https://github.com/celestialarchitect-ux/trinity-nexus/raw/main/install.ps1 | iex

Open a new terminal, type nexus. (Legacy alias oracle also works.)

Usage

Just type nexus. You'll get the neon-purple banner and a prompt.

REPL slash commands

Command What it does
/help show all commands
/onboard §04/§23/§24 orientation → writes memory/user_map.md
/user-map print the active USER MAP
/mode [name|list|off] switch operating mode (§13) — 12 modes
/memory [tier] [read|write|append text] 9-tier memory (§06)
/skills list the skill library
/reflect review recent turns → themes + facts
/evolve <intent> propose + sandbox-test + promote a new skill
/spawn <task> sub-agent on its own thread (§19)
/dangerous [on|off] unlock destructive-op gate (§29)
/paste open $EDITOR / notepad for big multi-line prompts
/reset new thread (memory kept, chat context dropped)
/thread [id] show or switch thread
/clear clear screen, redraw banner
/exit leave (Ctrl-D also works)

Enter submits. Shift+Enter inserts a newline for multi-line input.

Non-REPL

nexus doctor                          # env check
nexus ask "one-shot question"
nexus ask -                           # read prompt from stdin (paste big input)
type file.txt | nexus ask             # pipe stdin
nexus ingest <dir>                    # load docs into retrieval
nexus memory {stats,core,remember <fact>,recall <q>}
nexus skill {list,route <q>,run <id> '<json>'}
nexus evolve <intent>
nexus reflect
nexus distill --dry-run
nexus mesh {keygen,id,add-peer,peers,export,push,pull}
nexus mcp                             # stdio MCP server (Claude Desktop)
nexus mcp-config --write              # auto-merge MCP config
nexus update                          # git pull + reinstall
nexus version

Architecture

Layer Implementation
Core model qwen3:4b via Ollama (30B opt-in)
Embeddings bge-m3 via Ollama
System prompt full 33-section Omega Foundation constitution (src/nexus/prompts.py)
Runtime layers constitution → NEXUS.md / ORACLE.md (project instructions) → USER MAP → 9-tier memory → active mode overlay → live memory context
Agent LangGraph + SqliteSaver thread checkpoints
Memory core.md + SQLite/FTS5 recall + LanceDB archival + 9-tier markdown (§06)
Retrieval LanceDB over ingested docs
Skills seed (13) + evolved/ (judge-gated) + mesh/ (Ed25519-signed)
Eval judge-model 3-gate: regression · diversity · head-to-head
Distillation collector → teacher → gold → eval → archive / QLoRA optional
Mesh Ed25519 signed skill bundles over HTTP
MCP server stdio — nexus_ask, nexus_retrieve, nexus_recall, nexus_remember, nexus_skill_list, nexus_skill_run
Tool layer read/write/edit/glob/grep, web_fetch, web_search, run_command (§29 guarded), spawn_agent (§19), remember, retrieve_notes
Sandbox Docker (no-net, cap-drop, read-only)
Sessions JSONL transcripts under data/sessions/<thread>.jsonl
Hooks ~/.nexus/hooks/{pre_prompt,post_response,pre_tool,post_tool,pre_exit}.sh/.bat/.ps1

The Constitution

Trinity Nexus's identity is not a tagline — it's a 33-section operating prompt (Omega Foundation 1.0) installed as the system prompt. See src/nexus/prompts.py. Highlights:

  • §01 Core laws: truth before comfort, clarity before agreement, usefulness before performance, evolution before repetition, structure before chaos, reality before fantasy
  • §02 Mind / Soul / Body identity model
  • §06 9-tier memory structure
  • §09 9-layer autonomous reasoning
  • §10 Truth engine — never speculate as fact
  • §13 12 operating modes
  • §19 Multi-agent internal structure (Intent Parser → Context Retriever → Architect → Builder → Critic → Truth Checker → Risk Governor → Memory Curator → Final Synthesizer)
  • §29 Security governor
  • §33 Prime Directive — build the next layer of the system on every command

Configuration (.env)

ORACLE_PRIMARY_MODEL=qwen3:4b
ORACLE_FAST_MODEL=qwen3:4b
ORACLE_EMBED_MODEL=bge-m3
ORACLE_NUM_CTX=16384
ORACLE_LLM_TIMEOUT_SEC=600
ORACLE_EMBED_KEEPALIVE=5m
ORACLE_TEACHER_PROVIDER=local
ORACLE_ENABLE_DISTILLATION=true
ORACLE_INSTANCE=Nexus
NEXUS_BANNER=pixel           # pixel | shadow | off
NEXUS_RECORD=1               # 1 = record session transcripts, 0 = off
NEXUS_HOOKS=                 # set off to disable hooks

Resolved from the project root — nexus works from any CWD.

Running qwen3:30b primary

On a 24 GB GPU, the 30B MoE and bge-m3 can't co-host. Either:

  1. ORACLE_EMBED_KEEPALIVE=0s + ORACLE_PRIMARY_MODEL=qwen3:30b (embedder unloads per call, ~1s penalty), or
  2. Run the embedder on a second GPU.

Uninstall

./uninstall.ps1 [-KeepData]
./uninstall.sh [--keep-data]

Tests

pytest tests/ -q      # 28/28 on the reference build

For contributors / AI agents

Read HANDOFF.md first — canonical state-of-system. Then:

cd trinity-nexus
git pull
nexus doctor
pytest tests/ -q
  • Don't delete src/nexus/skills/evolved/ or src/nexus/skills/mesh/ — they contain self-written / signed artifacts.
  • Make minimal changes (§17). Keep tests green.
  • The constitution is the behavior layer. Don't duplicate its rules in code.

License

Not yet declared. Treat as All Rights Reserved until specified.

Project details


Download files

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

Source Distribution

trinity_nexus-1.0.30.tar.gz (174.6 kB view details)

Uploaded Source

Built Distribution

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

trinity_nexus-1.0.30-py3-none-any.whl (189.7 kB view details)

Uploaded Python 3

File details

Details for the file trinity_nexus-1.0.30.tar.gz.

File metadata

  • Download URL: trinity_nexus-1.0.30.tar.gz
  • Upload date:
  • Size: 174.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for trinity_nexus-1.0.30.tar.gz
Algorithm Hash digest
SHA256 523dce2cde38bb20521991201231501290b1d610b7b48e1fa22151e16e6a3cfd
MD5 af0735c6e6851952ea43bd16b6128e89
BLAKE2b-256 22421c6c885f77a75ef2fab764befefe8835e9a2fbad62f1e0dd8682e528d2b8

See more details on using hashes here.

File details

Details for the file trinity_nexus-1.0.30-py3-none-any.whl.

File metadata

  • Download URL: trinity_nexus-1.0.30-py3-none-any.whl
  • Upload date:
  • Size: 189.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for trinity_nexus-1.0.30-py3-none-any.whl
Algorithm Hash digest
SHA256 90f59afc3557dc69caf37cb9b9ffcfcacf95bfbd12f62a69d1720f57ad5cedc7
MD5 e8112449725cefd46afe740d0f9cfc2a
BLAKE2b-256 0e9d473a79005a2111cf65ae9402e1edde5e344294afeba3e4a884239808a54c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page