Nexus Protocol 🧠
The TCP/IP of Latent Space.
Stop wasting tokens. Start sharing minds.
Nexus is a high-speed transport layer for Artificial Intelligence. It replaces slow, expensive natural language communication between Agents with direct, zero-loss Latent Vector Injection.
⚡️ Why Nexus?
We are effectively building the Universal Embedding Standard for AI-to-AI communication.
| Feature | 🐢 The Old Way (JSON/Text) | 🚀 The Nexus Way (Vectors) |
|---|---|---|
| Medium | English / Text | High-Dimensional Vectors |
| Cost | High (Generation + Parsing Tokens) | Zero (Hidden State Transfer) |
| Speed | Slow (Autoregressive Generation) | Instant (Matrix Multiplication) |
| Loss | High (Semantic drift in parsing) | Lossless (Mathematical Precision) |
| Privacy | Public (Text is readable) | Obfuscated (Abstract Math) |
📦 Installation
pip install nexus-protocol
Requires Python 3.9+ and PyTorch.
🚀 Quickstart
Transmit a concept from Llama-3 to Mistral without generating a single word of text.
from nexus.client import NexusClient
from nexus.receiver import NexusReceiver
from nexus.protocol import TensorPacket
# 1. Initialize Sender (The Thinker)
sender = NexusClient("meta-llama/Meta-Llama-3-8B")
# 2. Encode a Thought (No text generation happens here)
# "The sky is blue" -> [1, 4096] Float32 Vector
thought_vector = sender.encode_thought("The atmospheric scattering of light...")
# 3. Packetize (TOON Format)
packet = TensorPacket.from_tensor(sender="Llama-3", tensor=thought_vector)
# --- 🌐 NETWORK TRANSMISSION (JSON Serialized) ---
# 4. Initialize Receiver (The Listener)
receiver = NexusReceiver("mistralai/Mistral-7B-v0.1")
# 5. Inject Thought & Generate
# The model starts generating from the *concept* you injected
output = receiver.receive_thought(packet.model_dump_json())
print(output)
# Output: "...creates a blue hue visible from the surface."
🧠 Core Architecture
Nexus solves the "Tower of Babel" problem in AI. Every model thinks in a different vector space. Nexus provides the Universal Bridge.
NexusClient: Extracts the "EOS Token" hidden state from the source model.NexusBridge: A neural adapter that projects the specific model space (e.g., 4096d) into the Universal Nexus Space (2048d).TensorPacket: Wraps the vector in the TOON (Token Oriented Object Notation) format for transport.InverseBridge: Projects the Universal Vector into the Target Model's space.NexusReceiver: Performs Prompt Injection, inserting the vector directly into the model's context window.
🗺 Roadmap
- Protocol v1: TOON-compliant packet structure.
- Adapters: Base
NexusBridgearchitecture with Cosine Similarity normalization. - Genesis Bridge: Pre-trained weights for Llama-3 <-> Mistral <-> GPT-2.
- HuggingFace Hub: Auto-download adapters from
nexus-protocol/adapters.
🤝 Contributing
We are building the internet for AIs. We need Bridge Builders.
If you have compute, help us train adapters between popular models. See CONTRIBUTING.md for training guides.
License: MIT
Release files for nexus-protocol 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nexus_protocol-0.1.0.tar.gz | 11.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nexus_protocol-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.3 kB
Release files / nexus_protocol-0.1.0.tar.gz
| Download URL | nexus_protocol-0.1.0.tar.gz |
|---|---|
| Size | 11.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0aabfae536e66ba023b87240e6865f08e234909e3013447623ad0a5842ccc679
|
|
BLAKE2b-256 checksum How to use checksums |
c5ac4ef29e65b46fe44965c8a7023d600f5ddc0bc9e065f6fefc50641fd364fe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / nexus_protocol-0.1.0-py3-none-any.whl
| Download URL | nexus_protocol-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55d0e3e616fbcfd496c85de8a14e5a3658cdb2df86812f8d782ccefde4a05db4
|
|
BLAKE2b-256 checksum How to use checksums |
d659fca309a7643ebfd98e0af62fd9e3e13d42168f4c9f66724b569f7e416b40
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|