YounndAI Domains

YounndAI Domains

The Schema Registry

Typed schemas for
every industry

Structured tags with typed fields, validation rules, and trust signals. Open standard. Managed registry.

Explore RegistryLearn the Format
31 Official Domains//Open Standard//Schema as a Service
YounndAI Domains
DomainsSchemaPricingDocs
  1. Docs
  2. Use Cases
  3. AI Agent Integration
use-cases

AI Agent Integration

How AI agents discover and consume domain schemas at runtime.

Prerequisites

Ensure you have network access to the Domains API. All examples use the base URL https://domains.younndai.com/api.

Runtime Schema Discovery

AI agents don't need prior knowledge of domain schemas. They can discover, parse, and use schemas at runtime — adapting to any industry without retraining.

The Discovery Flow

1

Discover available domains

const domains = await fetch("/api/domains").then((r) => r.json());
2

Find the relevant domain

const healthDomain = domains.find(
  (d) => d.path === "yon.health",
);
3

Fetch the full schema

const schema = await fetch(
  `/api/domains/${healthDomain.path}`,
).then((r) => r.json());

Field Extraction

Once the schema is loaded, agents extract field definitions to use as tool parameters:

// Extract fields from a specific record
const vitalsRecord = schema.records.VITALS;
const fields = Object.entries(vitalsRecord.fields);

// Each field has: name (key), type, required, range?, enum?, pattern?, description?
fields.forEach(([name, constraint]) => {
  console.log(
    `${name}: ${constraint.type}${constraint.required ? " (required)" : ""}`,
  );
});

// Output:
// bp: string (required)
// hr: int
// temp_c: float

Validation

Before processing data, agents validate inputs against field definitions:

function validateField(value: unknown, constraint: FieldConstraint): boolean {
  if (constraint.required && (value === undefined || value === null))
    return false;
  if (value === undefined) return true; // optional field, not provided

  switch (constraint.type) {
    case "string":
      if (typeof value !== "string") return false;
      if (constraint.enum && !constraint.enum.includes(value)) return false;
      if (constraint.pattern && !new RegExp(constraint.pattern).test(value))
        return false;
      return true;
    case "int":
    case "float":
      if (typeof value !== "number") return false;
      if (
        constraint.range &&
        (value < constraint.range[0] || value > constraint.range[1])
      )
        return false;
      return true;
    case "bool":
      return typeof value === "boolean";
    case "ts":
      return typeof value === "string" && !isNaN(Date.parse(value));
    default:
      return true;
  }
}

💡Tip

Client libraries provide validate() functions that handle all type checking, enum validation, and required field enforcement automatically. You don't need to implement this from scratch.

Agent-to-Agent Communication

When two agents share the same domain vocabulary, structured communication emerges naturally:

Agent A structures output

Emits data according to yon.health

Agent B validates and consumes

Fetches yon.health and knows exactly what fields to expect

No negotiation needed

The schema IS the contract

This is the core thesis: when grammar (YON) and vocabulary (Domains) are shared, interoperability is free.

Next Steps

Cross-Industry Workflows
See this pattern in action across healthcare, insurance, and payment.
Registry API
Full endpoint reference.
← Cross-Industry WorkflowsReference →

On This Page

Runtime Schema Discovery
The Discovery Flow
Field Extraction
Validation
Agent-to-Agent Communication
Next Steps
Registry
Schema
Pricing
API
GitHub
YounndAI
YounndAIYou and AI, unifiedBuilt withNollamaNollama
© — YounndAI™. You and AI, unified. (pronounced “yoon-dye”). All rights reserved.