Introduction
A detailed walkthrough of YounndAI Domains for developers, architects, and AI practitioners.
YounndAI Domains serves three distinct audiences. This page gives each a fast path to productivity.
For Developers
You want to fetch a schema and use it. Here's how:
GET /api/domains/yon.health
{
"domain": "yon.health",
"version": "1.0",
"status": "active",
"records": {
"VITALS": {
"description": "Patient vital signs",
"fields": {
"bp": { "type": "string", "required": true, "pattern": "\\d+/\\d+", "description": "Blood Pressure in mmHg in systolic/diastolic format", "unit": "mmHg", "example": "120/80" },
"hr": { "type": "int", "required": false, "range": [30, 250], "description": "Heart Rate in bpm", "unit": "bpm", "example": "72" },
"temp_c": { "type": "float", "required": false, "range": [30.0, 45.0], "description": "Temperature (Celsius) in °C", "unit": "°C", "example": "37.0" }
}
}
}
}
Each field has a type (string, int, float, bool, or ts), optional required flag, constraints like range, enum, or pattern, and self-documenting context: description, unit, and example. Parse the schema, validate your data, and you're integrated.
For Architects
Domains provide a contract layer between systems. Instead of point-to-point integrations, every service reads from the same schema source:
Fetch
Extract
Validate
Version-Pin
Lock to a specific schema version for stability.
For AI Practitioners
AI agents can discover and consume domain schemas autonomously:
// Agent discovers the health domain at runtime
const schema = await fetch("/api/domains/yon.health").then((r) => r.json());
// Extract field definitions for tool parameters
const vitals = schema.records.VITALS;
const fields = Object.entries(vitals.fields);
// Use fields as typed tool parameters
const toolParams = fields.map(([name, constraint]) => ({
name,
type: constraint.type,
required: constraint.required ?? false,
}));
💡Tip
AI agents don't need prior knowledge of domain schemas. They can discover, parse, and use schemas at runtime — making them adaptable to new industries without retraining.
