Entity Model Kit
SUBEntity Model Kit
Configuration
Entity Schema
idUUIDreqnamestringreqtypeEntityTypereqattributesRecord<string,any>relationshipsRelationship[]confidencenumberSample Entities
John Smithperson0.95
Operation Nexusevent0.88
Drone Fleet Alphaasset0.92
Acme Defense Corporganization0.97
Integration Code
import { defineEntity, EntityStore } from 'agent-tools-kit/ontology'
const Person = defineEntity({
name: 'Person',
fields: {
id: { type: 'uuid', required: true },
name: { type: 'string', required: true },
role: { type: 'string' },
},
relationships: ['worksAt', 'reportsTo'],
})
const store = new EntityStore({ adapter: 'postgres' })
await store.register(Person)
await store.create('Person', { name: 'John Smith' })