Schema
Extended Schema.org vocabulary with modern web concepts and digital properties
Schema
The schema.org.ai package provides an extended superset of Schema.org with 817 types and 1,518 properties, enhanced with modern web concepts and digital-first properties. This is the foundational ontology that all others build upon.
What is Schema?
Schema provides the base vocabulary for describing things on the web and in business applications:
- Core Types: Thing, Person, Organization, Place, Event, CreativeWork, Product, Service
- Properties: Standard metadata (name, description, identifier, url, image)
- Digital Extensions:
digitalproperty on all Things, modern web concepts - Type Safety: Full TypeScript definitions for all types and properties
- JSON-LD: Native linked data support for semantic web
Modern Extensions to Schema.org
Digital Property on Thing
Every Thing in our extended schema has a digital property that marks it as digital-native:
interface Thing {
'@type': string
'@context'?: string | object
name?: string
description?: string
identifier?: string | PropertyValue
url?: string | URL
image?: ImageObject | string
// Digital extension - marks this as a digital entity
digital?: boolean
// Additional digital properties
virtualLocation?: string
onlinePresence?: URL[]
digitalRepresentation?: Thing
}Modern Platform Types
We've added types for modern web and platform concepts:
// Agent: Autonomous software that performs tasks
interface Agent extends Thing {
'@type': 'Agent'
capabilities?: string[]
tools?: Tool[]
model?: string
provider?: Organization
context?: object
}
// Tool: Software, API, or service used to perform work
interface Tool extends Thing {
'@type': 'Tool'
category?: string
requiredSkills?: Skill[]
usedBy?: Occupation[]
api?: API
documentation?: URL
}
// Workflow: Automated process or sequence of tasks
interface Workflow extends Thing {
'@type': 'Workflow'
steps?: Action[]
triggers?: Event[]
inputs?: PropertyValue[]
outputs?: PropertyValue[]
automated?: boolean
}
// LandingPage: Marketing page with conversion goal
interface LandingPage extends WebPage {
'@type': 'LandingPage'
conversionGoal?: Action
cta?: Action
headline?: string
value Proposition?: string
socialProof?: Review[]
}Base Type Hierarchy
All types extend from Thing, creating a unified type system:
Thing (base type)
├── CreativeWork
│ ├── Article
│ ├── WebPage
│ │ └── LandingPage (modern)
│ ├── SoftwareSourceCode
│ └── Dataset
├── Person
│ └── Agent (modern)
├── Organization
│ ├── Corporation
│ └── Startup (modern)
├── Place
│ └── VirtualLocation (modern)
├── Event
│ ├── BusinessEvent
│ └── WorkflowEvent (modern)
├── Product
│ └── SoftwareApplication
│ └── Tool (modern)
├── Service
│ └── ManagedService (modern)
├── Action
│ ├── CreateAction
│ ├── UpdateAction
│ └── SearchAction
└── Intangible
├── Skill (extended)
├── Occupation (extended)
├── Process (extended)
└── Workflow (modern)Usage Examples
Basic Schema.org Types
import { Person, Organization, Place } from 'schema.org.ai'
const person: Person = {
'@type': 'Person',
'@context': 'https://schema.org',
name: 'Jane Doe',
email: '[email protected]',
worksFor: {
'@type': 'Organization',
name: 'Acme Corp'
}
}
const org: Organization = {
'@type': 'Organization',
name: 'Acme Corporation',
legalName: 'Acme Corp Inc.',
address: {
'@type': 'PostalAddress',
streetAddress: '123 Main St',
addressLocality: 'San Francisco',
addressRegion: 'CA',
postalCode: '94102'
}
}Modern Digital-First Types
import { Agent, Tool, Workflow } from 'schema.org.ai'
const agent: Agent = {
'@type': 'Agent',
name: 'Code Review Agent',
digital: true,
capabilities: ['code-analysis', 'security-scanning', 'best-practices'],
tools: [
{ '@type': 'Tool', name: 'ESLint' },
{ '@type': 'Tool', name: 'SonarQube' }
],
model: 'claude-sonnet-4.5',
provider: {
'@type': 'Organization',
name: 'Anthropic'
}
}
const workflow: Workflow = {
'@type': 'Workflow',
name: 'CI/CD Pipeline',
digital: true,
automated: true,
steps: [
{ '@type': 'TestAction', name: 'Run Tests' },
{ '@type': 'BuildAction', name: 'Build Application' },
{ '@type': 'DeployAction', name: 'Deploy to Production' }
],
triggers: [
{ '@type': 'Event', name: 'Push to Main Branch' }
]
}Business-as-Code Integration
import { $ } from 'sdk.do'
// Create entities using schema types
await $.Person.create({
'@type': 'Person',
name: 'Alice Smith',
digital: true,
jobTitle: 'Software Engineer',
worksFor: {
'@type': 'Organization',
name: 'Tech Startup Inc'
}
})
// Create modern platform entities
await $.Agent.create({
'@type': 'Agent',
name: 'Customer Support Bot',
digital: true,
capabilities: ['answer-questions', 'create-tickets', 'escalate'],
tools: ['zendesk', 'knowledge-base', 'llm']
})
await $.Workflow.create({
'@type': 'Workflow',
name: 'Order Fulfillment',
digital: true,
automated: true,
steps: ['validate-order', 'process-payment', 'ship-product', 'send-confirmation']
})Digital Property Usage
The digital property enables systems to distinguish between physical and digital entities:
// Physical entity
const physicalStore: Place = {
'@type': 'Store',
name: 'Downtown Shop',
digital: false,
address: { ... }
}
// Digital entity
const onlineStore: Place = {
'@type': 'Store',
name: 'E-Commerce Site',
digital: true,
url: 'https://shop.example.com',
virtualLocation: 'cloud'
}
// Hybrid entity
const retailChain: Organization = {
'@type': 'Organization',
name: 'Retail Chain',
digital: false, // primarily physical
onlinePresence: [
'https://website.com',
'https://app.com'
],
digitalRepresentation: {
'@type': 'WebSite',
digital: true,
url: 'https://website.com'
}
}Integration with Other Ontologies
Schema provides the foundation that all other ontologies extend:
// Occupations extend Person
interface Occupation extends Intangible {
'@type': 'Occupation'
// ... inherits Thing properties
}
// Tools extend Product/SoftwareApplication
interface Tool extends Thing {
'@type': 'Tool'
// ... inherits Thing properties
}
// Processes extend Intangible
interface Process extends Intangible {
'@type': 'Process'
// ... inherits Thing properties
}
// All have access to base Thing properties:
// - name, description, identifier
// - url, image, sameAs
// - digital (our extension)Type Safety with TypeScript
import type { Person, Organization, ImageObject } from 'schema.org.ai'
// Full type checking
const person: Person = {
'@type': 'Person',
name: 'John Doe',
image: {
'@type': 'ImageObject',
url: 'https://example.com/photo.jpg',
width: 800,
height: 600
} as ImageObject,
worksFor: {
'@type': 'Organization',
name: 'Acme Inc'
} as Organization
}
// TypeScript will error if types don't match
// person.name = 123 // ❌ Error: Type 'number' is not assignable to type 'string'JSON-LD Support
All types support JSON-LD serialization for semantic web:
import { serialize } from 'schema.org.ai'
const data = {
'@context': 'https://schema.org',
'@type': 'Person',
name: 'Jane Doe',
jobTitle: 'CEO',
worksFor: {
'@type': 'Organization',
name: 'Tech Corp'
}
}
// Use in HTML for SEO
const jsonLd = JSON.stringify(data)
// <script type="application/ld+json">{jsonLd}</script>Modern Web Concepts
Agent Type
For autonomous software entities:
const aiAgent: Agent = {
'@type': 'Agent',
name: 'Data Analysis Agent',
digital: true,
capabilities: ['data-cleaning', 'visualization', 'insights'],
tools: ['pandas', 'matplotlib', 'openai'],
model: 'gpt-4',
autonomy: 'high'
}Tool Type
For software and APIs:
const tool: Tool = {
'@type': 'Tool',
name: 'Stripe API',
digital: true,
category: 'payment-processing',
api: {
'@type': 'API',
endpoint: 'https://api.stripe.com',
authentication: 'api-key'
},
documentation: 'https://stripe.com/docs'
}Workflow Type
For automated processes:
const workflow: Workflow = {
'@type': 'Workflow',
name: 'Content Publishing Workflow',
digital: true,
automated: true,
steps: [
{ '@type': 'CreateAction', object: 'Article' },
{ '@type': 'ReviewAction', agent: 'Editor' },
{ '@type': 'PublishAction', target: 'Website' }
]
}Learn More
- Nouns - All entity types across ontologies
- Verbs - Actions, activities, and events
- Agents Integration - How agents use all ontologies
- GitHub: schema.org.ai