Ontology-First
Define your business structure—entities, functions, access groups—in a single declarative config.
Your ontology is your business in code—what exists, what can be done, who can do it.
ont-run is a framework where:
The ontology is your operational DNA. AI writes code, but only humans change what the business is.
Ontology-First
Define your business structure—entities, functions, access groups—in a single declarative config.
Human-in-the-Loop
Ontology changes require human approval. AI builds the logic, but only humans change what the business is.
MCP Integration
Functions are automatically exposed as MCP tools. AI agents see only what their user is allowed to call.
TypeScript & Go
Write your backend in TypeScript or Go. Both support Zod-like schemas and automatic SDK generation.
TypeScript:
import { defineOntology, z } from 'ont-run';import getUser from './resolvers/getUser.js';
export default defineOntology({ name: 'my-api', accessGroups: { public: { description: 'Unauthenticated users' }, admin: { description: 'Administrators' }, }, entities: { User: { description: 'A user account' }, }, functions: { getUser: { description: 'Get user by ID', access: ['admin'], entities: ['User'], inputs: z.object({ id: z.string().uuid() }), resolver: getUser, }, },});Go:
import ont "github.com/vanna-ai/ont-run/pkg/ontology"
func DefineOntology() *ont.Config { return &ont.Config{ Name: "my-api", AccessGroups: map[string]ont.AccessGroup{ "public": {Description: "Unauthenticated users"}, "admin": {Description: "Administrators"}, }, Entities: map[string]ont.Entity{ "User": {Description: "A user account"}, }, Functions: map[string]ont.Function{ "getUser": { Description: "Get user by ID", Access: []string{"admin"}, Entities: []string{"User"}, Inputs: ont.Object(map[string]ont.Schema{ "id": ont.String().UUID(), }), Resolver: resolvers.GetUser, }, }, }}