Skip to main content

Python bindings for the Ten formal algebra

Project description

Ten

A formal algebra for machine intelligence communication

License Spec

Ten is a language designed for machines, not people.

It is a formal algebra whose messages can be composed, projected, filtered, sorted, and verified through mathematical operations — not parsed through natural language understanding. Ten is not human-readable by design.

The problem: AI agents today communicate using natural language or JSON stuffed into protocols like MCP and A2A. This works, but it's profoundly wasteful. Every receiving AI must parse ambiguous text, infer intent, and guess at priority. Sorting a thousand messages by urgency requires parsing all of them.

Ten's answer: A mathematically rigorous message algebra where urgency is a sortable scalar in a fixed-position header, where two messages can be composed into a valid third message, where trust is a computable property of the message itself, and where the language continuously optimizes its own encoding based on real usage patterns.

The Most Important Thing

Ten makes a strong claim: that a formal algebra beats the status quo (natural language + LLM inference, or JSON + custom code) for machine-to-machine communication at scale. Proving this claim transparently — with measured token counts, dollar costs, latency, variance data, and honest accounting of where Ten loses — is the project's primary goal.

The status quo is not weak. LLMs are cheap and getting cheaper. JSON is universal and well-tooled. Ten must earn its place with data, not assertions. The validation plan designs industry-specific stress tests (derivatives portfolios, international supply chains, clinical trials), measures everything, and includes an adversarial comparison against JSON + domain code to isolate what Ten specifically contributes beyond "a schema that domain code reads from."

If Ten's advantages turn out to be narrow, the project will say so. Intellectual honesty is more valuable than marketing.

Key Ideas

Fixed algebra, unbounded vocabulary. The composition rules never change. The vocabulary evolves continuously as AIs discover what they need to say. New concepts are compositions of existing primitives — never breaking changes.

Variable-resolution encoding. Say "medium urgency" in one bit, or "urgency 9537/10000" in fourteen bits. Pay only for the precision you need.

Slang. The most common compound concepts automatically earn short encodings. "Encrypted, private, minimal detail, verified source" becomes a single token. Slang composes algebraically — unlike human idioms.

Self-evolving. A built-in evolution mechanism (the Canonica) collects usage telemetry, detects equivalent constructs, and publishes optimized canonical forms. Ten provably converges toward the Shannon limit on AI-to-AI communication efficiency.

Not a protocol — a language. Ten rides inside existing protocols (MCP, A2A, ACP) as the payload encoding. It completes them rather than competing with them.

Documentation

  • TEN-SPEC.md — The founding specification. Start here.
  • VALIDATION.md — Industry stress tests, token economics, and the honest case for (and against) Ten.
  • ROADMAP.md — Implementation plan. Validation is the critical gate.
  • WHY-TEN.md — Elevator pitches for every audience, from platform engineers to type theorists.
  • ARCHITECTURE.md — Technical architecture: C core, Python wrappers, memory model, performance targets.

Status

libten (C core) is implemented and passing all 49 tests — 6 kernel types, 6 composition operations, facet vectors, recursive validation, arena allocation. Next: binary serialization, Python bindings, MCP server, then the validation phase that determines whether Ten's claims hold up under measurement.

Open Research Problems

  • Kernel minimality and sufficiency — Is the proposed type kernel minimal? Is it sufficient to express all necessary concepts?
  • Convergence proofs — Does the evolution mechanism provably converge toward optimal encoding?
  • Composition complexity — What are the computational bounds on each algebraic operation?
  • Slang theory — When should a compound concept earn a dedicated short token?

The Name

Ten = Token + Attention ("Attention Is All You Need"). Also evokes base-ten: a small set of symbols from which all quantities compose.

Contributing

This project is in its earliest stage. If you work in formal language theory, abstract algebra, information theory, protocol design, or AI agent systems — or if you just find this interesting — open an issue or start a discussion. The specification is the starting point, not the final word.

License

Apache 2.0 — see LICENSE.


Website: tenlang.org The Canonica: thecanonica.org

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

tenlang-0.1.0.tar.gz (20.1 kB view details)

Uploaded Source

Built Distribution

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

tenlang-0.1.0-py3-none-any.whl (19.3 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for tenlang-0.1.0.tar.gz
Algorithm Hash digest
SHA256 3e874ef4be9c6d694816b349c5a45ddb290c23374f0d5906f4e00bfcd3e42a39
MD5 93f3322dbdc59abb7999c3eca6cf69b1
BLAKE2b-256 ba1088367aa564b7d9cee1af0703b014e12ffb0a71c0f1df182c5f449c50efa5

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for tenlang-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 14fccc3f908a2d401d92ee998cde8f35ecb535bba49c3666612c33e3f69f62be
MD5 60a48f513c3b6b229f2eeb772b57134e
BLAKE2b-256 42ec41f953ce2f9ded02d684b2f522e3eb25f512a4efecf64da23168fd6a3017

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