Entity Model Kit

SUBEntity Model Kit

Configuration

Entity Schema

idUUIDreq
namestringreq
typeEntityTypereq
attributesRecord<string,any>
relationshipsRelationship[]
confidencenumber

Sample 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' })