Skip to main content

A trustworthy context DataFrame for AI applications, powered by Rust.

Project description

Cognoxium

日本語 · Documentation · Security

Cognoxium is a trustworthy context DataFrame for AI applications, powered by Rust.

AI applications ingest messages, retrieved documents, tool results, and external resources from trust domains that do not naturally fit into a single safe prompt. Cognoxium treats those inputs as typed data with provenance, sensitivity, retention, token cost, and lineage—then compiles them into a deterministic, auditable context pack.

Project status: alpha. The Python API is usable today and automatically selects the Rust extension when installed. Serialization compatibility is not guaranteed before 1.0.

Install

pip install cognoxium

Optional interoperability dependencies are separate:

pip install "cognoxium[arrow,pandas,polars,tokenizers]"

Quickstart

import cognoxium as cx

records = [
    {"id": "policy", "payload": "Never disclose credentials.", "role": "system",
     "sources": ["app://policy"], "trust": "trusted", "retention": "required"},
    {"id": "result", "payload": "The build passed.", "sources": ["tool://ci"]},
]
pack = (
    cx.CognitionFrame.from_records(records).dedupe().rank("build status")
    .pack(budget=512, token_profile=cx.profiles.approximate(),
          boundary=cx.Boundary.external("openai"))
)
print(pack.to_openai())

Why Cognoxium?

  • DataFrame ergonomics: lazy filtering, projection, joins, grouping, ranking, and deterministic deduplication.
  • Budget-aware packing: required, preferred, and optional retention contracts with explicit overflow behavior.
  • Trust boundaries: provenance, quarantine, sensitivity labels, expiry, and secret-aware external packing.
  • Auditable lineage: every exclusion, merge, truncation, and token decision is captured in a manifest.
  • Provider-neutral output: render the same pack for OpenAI, Anthropic, or plain text.
  • Local by default: no network calls, API keys, model calls, accounts, or telemetry in the core library.

Security model

Cognoxium enforces deterministic information-flow rules. It does not claim to solve prompt injection or determine whether arbitrary content is truthful. Injection detection is a risk signal; trust labels, provenance, least privilege, and application-side authorization remain necessary.

Development

python -m unittest discover -s tests -v
cargo test --workspace

Build the extension with maturin:

maturin develop

See CONTRIBUTING.md for the full workflow.

License

Licensed under the Apache License 2.0.

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

cognoxium-0.1.0.tar.gz (52.1 kB view details)

Uploaded Source

Built Distributions

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

cognoxium-0.1.0-cp310-abi3-win_amd64.whl (4.4 MB view details)

Uploaded CPython 3.10+Windows x86-64

cognoxium-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.1 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ x86-64

cognoxium-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (4.8 MB view details)

Uploaded CPython 3.10+manylinux: glibc 2.17+ ARM64

cognoxium-0.1.0-cp310-abi3-macosx_11_0_arm64.whl (4.5 MB view details)

Uploaded CPython 3.10+macOS 11.0+ ARM64

cognoxium-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl (4.5 MB view details)

Uploaded CPython 3.10+macOS 10.12+ x86-64

File details

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

File metadata

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

File hashes

Hashes for cognoxium-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bfa8be4a5fe04022eef9b8fa31624d8a5be2f138b608de9599b7e55b1b6d91be
MD5 92093e107b494bd46483a320d91fcf65
BLAKE2b-256 358919b597c207db955fe44f12238ae9b9881837a4351560a03092469c5b63e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for cognoxium-0.1.0.tar.gz:

Publisher: release.yml on Nue-Japan/cognoxium

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

File details

Details for the file cognoxium-0.1.0-cp310-abi3-win_amd64.whl.

File metadata

  • Download URL: cognoxium-0.1.0-cp310-abi3-win_amd64.whl
  • Upload date:
  • Size: 4.4 MB
  • Tags: CPython 3.10+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for cognoxium-0.1.0-cp310-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 0c92c65e02975cc757b992cac3905b0279169a50534ef37784ea1ebc358d8489
MD5 16f27b9dc7a714c846f53d4bfcd3e09e
BLAKE2b-256 69669f36de3f5be9b16d5c4bed00403fe18f07e1a7d0f0900c96cbca083e455f

See more details on using hashes here.

Provenance

The following attestation bundles were made for cognoxium-0.1.0-cp310-abi3-win_amd64.whl:

Publisher: release.yml on Nue-Japan/cognoxium

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

File details

Details for the file cognoxium-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for cognoxium-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 8642b9e0350e07fbe4a01d5e5b47a4a76539a3e014a54a97bf89d9b618b1eea5
MD5 7b87e060802ad010a102e70e20f46bfb
BLAKE2b-256 f0b1b8bfd9bc2cf42857c0b56097aa57f6109276d1d57a94ef3f0c795ad8ce97

See more details on using hashes here.

Provenance

The following attestation bundles were made for cognoxium-0.1.0-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: release.yml on Nue-Japan/cognoxium

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

File details

Details for the file cognoxium-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl.

File metadata

File hashes

Hashes for cognoxium-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm Hash digest
SHA256 45a896fe851882119ba6c273c016805dc6199946300679e685a20d8baf104c48
MD5 7663590d82fb8e7f46d7e4135d2f7817
BLAKE2b-256 4e0303a6e3f5ec684a0f260b00653469ec35b82f6ae256b88b59cb992c8c33ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for cognoxium-0.1.0-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl:

Publisher: release.yml on Nue-Japan/cognoxium

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

File details

Details for the file cognoxium-0.1.0-cp310-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for cognoxium-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 879e25ecd566e12017faa5f134b872f8367ad6dd8917ab5ba810865d51688e74
MD5 e1919b108818c5f4793014c2ad879a8d
BLAKE2b-256 0203e3969d76c6d99ab73b0e09a729ff4a122fbe99274a2de7f8a63bfa83d8fe

See more details on using hashes here.

Provenance

The following attestation bundles were made for cognoxium-0.1.0-cp310-abi3-macosx_11_0_arm64.whl:

Publisher: release.yml on Nue-Japan/cognoxium

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

File details

Details for the file cognoxium-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for cognoxium-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 06c8e8a4c716940f70a1fd28a4f0771156d2d146355689318277cde9538bac36
MD5 e1a06195edc154372b6db75bc611b5b8
BLAKE2b-256 12152809311ab5962e25a7fad0edd72a7523e75709736ad90b859e144725696c

See more details on using hashes here.

Provenance

The following attestation bundles were made for cognoxium-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl:

Publisher: release.yml on Nue-Japan/cognoxium

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

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