Infrastructure compounds. Block by block.
Deterministic infrastructure for verifiable, composable artifacts and programmable attribution.
ALX defines three invariants:
- Identity — content-addressed identifiers derived from canonicalized content and lineage
- Lineage — verifiable relationships forming a directed acyclic graph (DAG)
- Attribution — deterministic contribution tracing across the graph
Independent implementations produce identical outputs for identical inputs. No shared infrastructure required.
import { createBlock, validateBlock, traceAttribution, buildGraph } from "@alx/protocol";
// Create blocks
const research = createBlock("market analysis findings", []);
const synthesis = createBlock("competitive summary", [research.blockHash]);
const decision = createBlock("go-to-market plan", [research.blockHash, synthesis.blockHash]);
// Validate — recompute hash, confirm integrity
validateBlock(decision); // { ok: true }
// Trace attribution — who contributed to this decision?
const graph = buildGraph([research, synthesis, decision]);
const trace = traceAttribution(decision.blockHash, graph);
// trace.nodes — every block that contributed
// trace.leaves — [research.blockHash] — the original source
// trace.edges — decision→research, decision→synthesis, synthesis→research
// research.pathCount = 2 (reachable via two paths from decision)Every step is deterministic. Any implementation in any language produces the same hashes, the same graph, the same trace.
A Block is a content-addressed container with lineage.
Block = { blockHash, contentHash, parentHashes, content }
| Field | Derivation |
|---|---|
blockHash |
keccak256(canonicalize({ content, parentHashes })) |
contentHash |
keccak256(canonicalize(content)) |
parentHashes |
sorted, deduplicated dependency set |
content |
opaque — the protocol never inspects it |
Same content + same parents = same blockHash. Always.
Canonicalize → Hash → Validate → Trace
Each layer depends only on the ones before it.
| Layer | Operation | Purpose |
|---|---|---|
| Canonicalize | canonicalizeProtocolJson |
Deterministic JSON serialization |
| Hash | deriveBlockHash |
Content + parents → identity |
| Validate | validateGraph, verifyGraph |
DAG integrity + content authenticity |
| Trace | traceAttribution |
Root + graph → contribution structure |
Signing is orthogonal — EIP-712 attestation at any layer.
Verification APIs now expose additive unified diagnostics fields:
issueList(typed diagnostics)warnings(non-fatal messages)metrics(stable counters/context)
| Existing field | Unified field | Migration note |
|---|---|---|
errors |
issueList |
keep errors reads for compatibility while migrating |
issues |
issueList |
issues remains structural detail; issueList is normalized diagnostics |
broken |
issueList |
map broken.reason to issueList[*].code |
| ad-hoc counters | metrics |
consume shared counters from metrics |
Suggested rollout:
- Read legacy + unified fields in parallel.
- Migrate downstream matching logic to
issueList[*].code. - Remove legacy-only parsing after all consumers migrate.
Blockchain serves as ALX's authenticity layer — anchoring, attestation, and verification. No execution on-chain.
| Contract | Network | Address |
|---|---|---|
| PlatformRegistry | Base mainnet | 0xe8e9...17ce343 |
| CheckpointRegistry | Base mainnet | 0x1EC8...2A811 |
Platforms register identity. Checkpoints anchor state via Merkle roots. Anyone can verify block inclusion with a proof.
| Language | Location | Status |
|---|---|---|
| TypeScript (reference) | src/ |
Complete — 8 modules, 102 tests |
| Python | implementations/python/ |
Complete |
| Rust | implementations/rust/ |
Complete |
| Solidity | contracts/ |
Deployed — 19 tests |
All implementations MUST produce identical hashes for identical inputs.
- AI Agent Systems — traceable reasoning chains with evidence, claims, and decisions
- Audit and Compliance — verify outputs against source inputs with full lineage
- Multi-Agent Coordination — shared deterministic state across independent agents
- Attribution Models — track contributions through lineage graphs
- Workflow Memory — portable, reusable context that compounds over time
| Document | Level | Purpose |
|---|---|---|
SPEC.md |
L1 Protocol | Full normative specification — hashing, identity, lineage, attribution |
docs/ENVELOPE.md |
L2 Envelope | Standard content structure — block types, relations, trust metadata, AI consumption |
docs/INDEX-STANDARD.md |
L3 Index | Standard indexes for block retrieval — what to index, not how to query |
docs/QUICK-START.md |
Guide | Zero to working block graph in 5 minutes |
docs/protocol/CORE-CONTRACT.md |
L1 Protocol | Protocol identity — invariants and guarantees |
CHANGELOG.md |
Release | API and behavioral release notes |
docs/contracts/ |
L1 Protocol | On-chain architecture and upgrade strategy |
docs/implementers/ |
L1 Protocol | How to implement ALX in a new language |
docs/conventions/ |
Reference | Agent patterns, workflow examples |
HISTORICAL.md |
Policy | Archive and historical content policy |
npm install
npm run build
npm testIncludes: normative specification, reference implementations, conformance vectors, on-chain contracts, application conventions.
Excludes: application UX, hosted services, SDKs, ranking strategies, pricing, centralized APIs.
Xandr is the application layer built on top of the protocol.
| Topic | Channel |
|---|---|
| Questions and bugs | GitHub Issues |
| Security | security@xandrlabs.ai |
| Open source | opensource@xandrlabs.ai |
| Website | https://xandrlabs.ai |
| API | https://api.xandrlabs.ai |
MIT
- Website — https://app.xandrlabs.ai
- Documentation — https://docs.xandrlabs.ai
- API — https://api.xandrlabs.ai
- Open Source and Grants — opensource@xandrlabs.ai
ALX Protocol is under active development. Until versioning and compatibility guarantees are explicitly published, implementations should treat the protocol as subject to change.
