What is a Xenkey?
A Xenkey is an atomic unit of meaning about a real-world object — a business, product, service, place, person, process, or event. It is written for AI understanding, not for marketing persuasion.
Each Xenkey represents a single, minimal, falsifiable idea. The specification version is declared in every document:
{ "spec": "1.0" }Design Goals
Truth over persuasion
Describe reality, not promotion.
Contextuality
Capture when, where, and for whom it applies.
Composability
Many Xenkeys describe one object.
AI readability
Strict structure for retrieval and indexing.
Identity
| Field | Type | Description |
|---|---|---|
| id | string | Primary identifier. Format: xk_ + ULID |
| ulid | string | Optional. Derived from id suffix (must match if present) |
| spec | "1.0" | Specification version |
Lifecycle & Mutability
Xenkeys follow a strict lifecycle that ensures data integrity and trust.
Mutability Rules
- •Draft — can be edited freely
- •Published — immutable. Changes require a new Xenkey
- •If
published_atis set, status cannot bedraft
| Field | Type | Description |
|---|---|---|
| status | enum | draft | unpublished | published | archived |
| created_at | datetime | Creation timestamp (RFC 3339) |
| published_at | datetime | When the Xenkey was published |
| updated_at | datetime | Internal/read-only, set by API |
| etag | string | Internal/read-only, used for concurrency control |
Meaning Core
The heart of every Xenkey. Four required fields that capture a structured unit of truth.
| Field | Type | Description |
|---|---|---|
| title | string | Short, descriptive identifier for the experience |
| fact | string | Factual, verifiable statement about reality |
| meaning | string | Why this fact matters to humans |
| context | string | When, where, and for whom this applies |
| constraints | string | Free-form nuance not captured by structured fields |
Scope & Anchors
Anchors tie Xenkeys to real-world entities. Every Xenkey must have at least one anchor. Multi-anchor support allows a single Xenkey to describe the intersection of multiple objects.
| Field | Type | Description |
|---|---|---|
| organization_id | string | Owning organization |
| base_id | string | Logical grouping (workspace/project) |
| unit_id | string | Optional structured data entry reference |
| anchors[] | array | Array of anchor objects (min 1) |
{
"anchor_id": "anchor_001",
"anchor_type": "product",
"role": "primary"
}| Field | Type | Description |
|---|---|---|
| tags | string[] | Classification tags (e.g., booking_required, wifi) |
| emotions | string[] | Emotional context codes (from emotion-codes.json) |
| vibe | string | Atmosphere / mood description |
| seasons | string[] | Applicable seasons |
| time_of_day | string[] | Applicable times of day |
| meal | string[] | Applicable meal periods |
Demographics
| Field | Type | Description |
|---|---|---|
| age_min | integer | Minimum recommended age |
| age_max | integer | Maximum recommended age (must be >= age_min) |
| gender | string | Target gender (if applicable) |
Geography
Xenkeys can be global or geo-scoped. The geo_scope field determines which geographic fields are required.
| Field | Type | Description |
|---|---|---|
| geo_scope | enum | Geographic precision level |
| country | string | ISO 3166-1 alpha-2 country code |
| region | string | Region / state / province |
| city | string | City name |
| timezone | string | IANA timezone name (e.g., Europe/Rome) |
| geo | [lng, lat] | Coordinates as [longitude, latitude] |
| availability_countries | string[] | Countries where this is available (not location) |
Scope rules: If geo_scope=country, country is required. If region, both country and region (or city) are required. If point, geo is required.
Localization
| Field | Type | Description |
|---|---|---|
| locale | string | Language tag (e.g., en-US, ja-JP) |
| source_locale | string | Original language of the content |
| translation_group | string | Groups translations together. Format: tg_ + ULID |
| is_source_locale | boolean | True if this is the original language version |
Rule: If is_source_locale = true, then locale must equal source_locale. Translations reuse the same translation_group.
Integrity
Published Xenkeys include a cryptographic hash computed at publish time, ensuring content integrity.
| Field | Type | Description |
|---|---|---|
| hash_alg | "sha256" | Hash algorithm used |
| hash_id | string | Unique hash identifier. Format: hash_ + ULID |
| hash | string | SHA-256 hash of the canonical payload |
Indexing & Privacy
Xenkeys can be published to multiple channels. Each channel enables different retrieval capabilities.
| Field | Type | Description |
|---|---|---|
| publication | string[] | Channels: vector, graph, aidex |
| is_published | boolean | True if published to at least one channel |
| is_vector | boolean | Indexed in vector store (Qdrant) |
| is_graph | boolean | Projected to knowledge graph (Neo4j) |
| is_aidex | boolean | Published to Aidex robot-oriented wiki |
| is_private | boolean | Visible only to org-scoped access |
Rules:
- •
aidexrequiresvector(both must be in publication) - • If
is_published=true, publication must have at least one entry - • Aidex is a robot-oriented wiki layer with stricter quotas than vector indexing
Vector & Graph Retrieval
Published Xenkeys automatically transform into two complementary data representations, enabling hybrid AI retrieval.
Vector Index (Qdrant)
- • Text source:
fact + meaning + context - • Converted to high-dimensional embeddings
- • Enables semantic similarity search
- • Payload filters: status, geo, tags, emotions, time
- • Idempotency: (id, version) key
Knowledge Graph (Neo4j)
- • Nodes: Xenkey, Organization, Object, Tag, Emotion
- • Edges: OWNS, DESCRIBED_BY, TAGS, EXPRESSES
- • Reveals relationships and structure
- • Idempotent MERGE on natural keys
- • Enables graph traversal queries
Hybrid retrieval combines vector similarity with structural graph filters, enabling grounded, explainable AI responses. The indexing pipeline is asynchronous with retries and dead-letter queues.
Invariants
- ✓
anchorsmust be present and non-empty - ✓ If both
age_minandage_maxare present:age_max >= age_min - ✓ If
geois present, must be[longitude, latitude] - ✓
geo_scope=countryrequirescountry - ✓
geo_scope=regionrequirescountry+region(orcity) - ✓
geo_scope=pointrequiresgeo - ✓
aidexin publication impliesvectorin publication - ✓
is_published=truerequires non-emptypublication[]
Example Payloads
Draft Xenkey (minimal)
{
"spec": "1.0",
"id": "xk_01J8Y6S4V9ZQ3M9K2W2M8JQY5C",
"status": "draft",
"created_at": "2026-01-21T12:00:00Z",
"organization_id": "org_123",
"base_id": "base_123",
"anchors": [
{ "anchor_id": "anchor_1", "anchor_type": "product", "role": "primary" }
],
"title": "Fresh espresso",
"fact": "A 30 ml espresso shot made from 100% Arabica beans.",
"meaning": "Represents the cafe's standard espresso offering.",
"context": "Default menu item available all day.",
"locale": "en-US",
"source_locale": "en-US",
"translation_group": "tg_01J8Y6S6Q4K8FKJ1PS2H0WQ1B8",
"is_source_locale": true,
"hash_alg": "sha256",
"hash_id": "hash_01J8Y6S6Q4K8FKJ1PS2H0WQ1B9",
"hash": "6e4f8c9d8b0f7a6d3b3a0f3c1f8e9d6e...",
"is_vector": false,
"is_graph": false,
"is_aidex": false,
"publication": [],
"is_published": false,
"is_private": false
}Published Xenkey (with geo + vector indexing)
{
"spec": "1.0",
"id": "xk_01J8Y6S9QH8P2G8P6X1K3R2H5A",
"status": "published",
"created_at": "2026-01-21T12:05:00Z",
"published_at": "2026-01-21T12:10:00Z",
"organization_id": "org_123",
"base_id": "base_123",
"unit_id": "unit_456",
"anchors": [
{ "anchor_id": "anchor_1", "anchor_type": "product", "role": "primary" }
],
"title": "Fresh espresso",
"fact": "A 30 ml espresso shot made from 100% Arabica beans.",
"meaning": "Represents the cafe's standard espresso offering.",
"context": "Default menu item available all day.",
"tags": ["coffee", "espresso", "menu_item"],
"time_of_day": ["morning", "afternoon"],
"meal": ["breakfast", "coffee_time"],
"vibe": "energetic",
"geo_scope": "point",
"country": "IT",
"city": "Milan",
"timezone": "Europe/Rome",
"geo": [9.1900, 45.4642],
"locale": "en-US",
"source_locale": "en-US",
"translation_group": "tg_01J8Y6S6Q4K8FKJ1PS2H0WQ1B8",
"is_source_locale": true,
"hash_alg": "sha256",
"hash_id": "hash_01J8Y6S6Q4K8FKJ1PS2H0WQ1B9",
"hash": "6e4f8c9d8b0f7a6d3b3a0f3c1f8e9d6e...",
"is_vector": true,
"is_graph": false,
"is_aidex": false,
"publication": ["vector"],
"is_published": true,
"is_private": false
}This specification is the canonical reference for Xenkey spec=1.0.
Canonical JSON Schema: xenkey_schema_v1_0.json