# Semantic Nouns for AI-Native Applications

> Create and manage semantic entities at the edge with full type safety. Deploy globally, compose with all .do services, and let AI agents understand your domain model natively.

Canonical: https://nouns.do/

## In code

```ts
import { Nouns } from 'nouns.do'

// Define semantic entities
const entities = Nouns({ schema: $.Product, storage: 'edge' })

// React to entity lifecycle
on.Product.created($ => {
  $.Inventory.create({ productId: $.id, quantity: 0 })
  $.Search.index({ id: $.id, name: $.name })
})

// Compose with semantic patterns
on.Order.placed($ => {
  $.Inventory.decrement({ productId: $.product, quantity: $.qty })
})
```

## Frequently asked questions

### What are semantic nouns and why use them?

Semantic nouns are entities in your domain model that AI agents can understand and reason about natively. Unlike traditional ORM entities, semantic nouns include their meaning, relationships, and behavior as first-class properties. This enables AI agents to construct queries, understand relationships, and make decisions autonomously. Nouns.do runs at the edge with zero cold starts, no dependencies to manage, and automatic TypeScript type generation. No package.json bloat, security audits, or version conflicts.

### How do nouns compose with other .do services?

All .do services use semantic types that compose seamlessly using $.Subject.predicate.Object patterns. Chain nouns together, pipe through transformations, or compose complex workflows using standard TypeScript. For example, $.Product.get() returns a typed noun that can be passed to $.Order.create() or $.Inventory.update(). Full type inference across the entire pipeline ensures compile-time safety.

### What about performance and cost for entity management?

Sub-millisecond execution at the edge with automatic caching and intelligent prefetching. Nouns are distributed across 300+ locations for <50ms global access. Pay only for actual compute time, not idle resources or connection pooling. First 100K operations daily are free, then <$0.001 per operation. Entity storage is billed separately at $0.15/GB/month with automatic compression.

### Can I define custom noun types and relationships?

Yes. Define custom noun schemas using TypeScript interfaces or JSON Schema. Nouns.do automatically generates CRUD operations, relationship management, and validation logic. Support for one-to-many, many-to-many, and polymorphic relationships. Add custom methods, computed properties, and lifecycle hooks. The SDK is open source—extend any behavior you need.

### How reliable is noun persistence and querying?

Battle-tested across millions of entity operations daily. Automatic retries, conflict resolution, and error handling built-in. 99.99% uptime SLA with automatic failover across 300+ global locations. All noun operations are ACID-compliant with strong consistency guarantees. Automatic backups, point-in-time recovery, and versioning included.

## Part of Platform.do

nouns.do is one of the primitives of Platform.do, in the Data layer (records, vocabulary and search). Every .do shares one grammar, Business-as-Code, and one SDK.

- What is Business-as-Code? https://platform.do/business-as-code
- Platform.do: https://platform.do/
- Docs: https://docs.platform.do
