Skip to main content

Shared knowledge atlas built on PRISM-TEX (.ptex) nonce-addressed maps with content-hash dedup

Project description

Amni-Prism

PyPI Python License: MIT

Shared knowledge atlas built on PRISM-TEX (.ptex). Every fact gets a unique nonce — contribute knowledge, it deduplicates automatically by content hash, and the atlas grows. NDJSON manifests are append-only and git-merge-friendly, so multiple contributors never collide.

Status: alpha (0.1.x). API may shift before 1.0.

Install

pip install amni-prism

For local development:

git clone https://github.com/Amnibro/Amni-Prism
cd Amni-Prism
pip install -e .

Quick Start

import prism

prism.contribute_text('./codex', 'The speed of light is 299792458 m/s', domain='physics')

result = prism.query_text('./codex', 'The speed of light is 299792458 m/s')

hits = prism.search_keyword('./codex', 'speed of light')

CLI

prism contribute "The speed of light is 299792458 m/s" -d physics

prism search "speed of light"

prism propose "Water boils at 100C at sea level" -d physics --confidence 0.8

prism pending
prism verify

prism scrape --file article.txt --source "https://en.wikipedia.org/wiki/Light"

prism stats

How It Works

  1. Nonces — Every word/line/block gets a unique nonce in finite-field space. Same content → same nonce → automatic dedup.
  2. PRISM-TEX Storage — Knowledge stored as nonce-addressed maps. Vocab in NLX format, hierarchical tiers in HNA format.
  3. Content-Hash Dedup — SHA-256 over normalized content ensures no duplicates across contributors merging different codexes.
  4. Two-Tier Verification — Small models propose (~50 tokens), large models verify (~20 tokens). ~70 tokens per verified fact.
  5. NDJSON Manifests — Append-only JSON-lines manifests are git-merge-friendly. No merge conflicts when two contributors add facts to the same domain.

Domains

25 built-in domains: code, math, science, history, language, music, art, philosophy, psychology, economics, politics, law, medicine, engineering, technology, education, sports, entertainment, food, travel, nature, religion, mythology, literature, general.

Why use this

  • Knowledge that survives model swaps. The atlas is a pile of facts addressed by content, not a fine-tune of a specific model. Swap your LLM tomorrow, keep your atlas.
  • Federation without coordination. Two contributors building independent codexes can prism merge their work and get a deduplicated union, with no central server.
  • Built for the Adam runtime. Amni-Prism is the federated layer of Amni-Ai (Adam). The [federated] extra in Adam pulls this in directly.

Source Allowlist

Scraping is gated to license-compatible sources (Wikipedia, arXiv, RFC, Python docs, MDN, HuggingFace). See prism.scrape.ALLOWED_SOURCES.

Contributing

Fork, clone, pip install -e ., add facts via the CLI or Python API, and open a PR with your codex export. NDJSON manifests merge cleanly under git.

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

amni_prism-0.1.2.tar.gz (22.1 kB view details)

Uploaded Source

Built Distribution

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

amni_prism-0.1.2-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file amni_prism-0.1.2.tar.gz.

File metadata

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

File hashes

Hashes for amni_prism-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1f72845d0ec2db19d7e248dd96880c1f4fbe53798b1da2c15119e3e7ac6cb6ca
MD5 f958853ea47508325769afc6e6007879
BLAKE2b-256 72bf59452a5f219b185c9fe1a759a4845ea75fa0ee2fa916c67e3c7f24e722ed

See more details on using hashes here.

File details

Details for the file amni_prism-0.1.2-py3-none-any.whl.

File metadata

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

File hashes

Hashes for amni_prism-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 161a3ed2b439ee0a4ac060421d679745a18fb81e720655bcedbc7fd9cb962d27
MD5 c93ad5df4784cbc016671fa5e4fb53a1
BLAKE2b-256 0f2a2e175e64b34783e2c404f45a2a17a2257304cb6e9d8f8acab17b48bfe904

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