Skip to main content

Encrypted compute layer for AI agents

Project description

NXD

NXD is an encrypted compute layer for AI agents. It wraps fully homomorphic encryption, credential vaulting, and privacy primitives behind a single Python import — so developers can run agents on sensitive data without exposing client records, credentials, or proprietary code to models, clouds, or MCP servers.

Three guarantees

  1. The agent works fully — capability unchanged; scores, matches, charges, and aggregates complete normally.
  2. The agent sees nothing — sensitive values stay encrypted; agents handle opaque tokens and references only.
  3. The operator holds the keys — keys stay local, auditable, and revocable.

Install

pip install nxd

Requires Python 3.10 or 3.11 (Concrete ML FHE dependency).

Quick start

import nxd

# FHE compute on encrypted data
results = nxd.score(model, clients)
matched  = nxd.match(model, record_a, record_b)
average  = nxd.aggregate(model, records)

# Credentials — agent never sees plaintext keys
vault = nxd.Vault(agent_id="billing-agent")
vault.store("stripe_key", "sk_live_xxxx")
result = vault.use("stripe_key", stripe_charge_fn)
vault.audit_log()

# Agent-to-agent encrypted context
handoff = nxd.Handoff()
token = handoff.pack(clients)
scores = nxd.receive(model, token, handoff)

# Code and text privacy before any AI call
protected = nxd.shield(source_code)
original = nxd.unshield(protected)

# Encrypted search, identity, tokenization, PII redaction
index = nxd.build_index(records)
token, hits = nxd.search(index, "diabetes")
nxd.register("user_123", "credential")
nxd.verify("user_123", candidate)
safe = nxd.redact("Patient John Smith, SSN 432-12-6789")
token = nxd.tokenize("4532-1234-5678-9010")

# Documents, channels, state, signatures
nxd.seal("contract.pdf")
ch = nxd.channel("agent-a", "agent-b")
nxd.checkpoint.save("agent-123", state)
nxd.sign("agent-a", "approve payment")

# Privacy analytics, key control, audit
nxd.blur(47230.0, sensitivity=1000, epsilon=1.0)
shares = nxd.split("master_key", n=5, m=3)
locked = nxd.bind(data, recipient="agent-compliance-7")
nxd.audit.verify()

Benchmarks (MacBook Air, Python 3.11, Concrete ML 1.9.0)

Operation Latency Notes
FHE score (1 record) ~183 ms First-call cold start
FHE score (1k records, parallel) 1.6 s 8 cores, ~1.6 ms/record
FHE match (single pair) 352 ms Cross-system comparison
FHE aggregate (1k records, parallel) 1.8 s ~0.009% quantization error
Credential vault use <1 ms Decrypt in memory only
Proof suite 85/85 passed python3 prove.py

Development

git clone https://github.com/Nexploraai/nxd
cd nxd
pip install -e ".[dev]"
python3 prove.py
python3 agent.py
python3 demo.py

License

MIT — see LICENSE.

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

nxd-0.1.0.tar.gz (15.9 kB view details)

Uploaded Source

Built Distribution

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

nxd-0.1.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file nxd-0.1.0.tar.gz.

File metadata

  • Download URL: nxd-0.1.0.tar.gz
  • Upload date:
  • Size: 15.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for nxd-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f04a4d8d70ed791d0e9c8055739ce263376fdecf07902be4d6096a8cbc252e07
MD5 8166a50bf42df80928e9a1507d8df04b
BLAKE2b-256 dddfb2df3d8ecde7db843e168a5504f1f42bc6cb7c0e4e106b9e5662facb5019

See more details on using hashes here.

File details

Details for the file nxd-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: nxd-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for nxd-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 74f3d76b6b828c1453d8894c9721227b713427649119b6d8bc9d9c7c7fa33b82
MD5 4afac051d8ebe7c1ba31b32af0fdb140
BLAKE2b-256 4132828f82c66e67039b686d172cf9dea6a9edf4804451d4454a05eff4d3605a

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