Skip to content

ont-run

Define your business as an ontology. Build it with AI.
GitHub stars

What is ont-run?

Your ontology is your business in code—what exists, what can be done, who can do it.

ont-run is a framework where:

  1. You define your business structure as an ontology — entities, functions, access groups
  2. AI agents implement the logic and call your functions via MCP
  3. Humans approve any changes to the ontology (the shape of your business)

The ontology is your operational DNA. AI writes code, but only humans change what the business is.

Key Features

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.

Quick Example

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,
},
},
}
}