ONTOLOGYCore ConceptsFeb 22, 2026

Palantir Ontology — Core Concepts & Architecture

#ontology#object-types#actions#links#semantic-layer

Palantir Ontology — Core Concepts & Architecture

What is the Ontology?

The Palantir Ontology is a semantic layer that sits above raw data and represents your organization's domain model as typed, connected business objects. Instead of working with raw tables and datasets, applications and AI agents interact with Objects that have meaning: Patients, Orders, Missions, Assets, Contracts.

The Ontology is the foundation of AIP — every AI function, every Copilot action, and every Workshop application reads from and writes to the Ontology.

Core Building Blocks

Object Types

Object Types define the schema of your business entities. Each Object Type has:

  • Primary Key: Unique identifier property
  • Properties: Typed attributes (string, integer, boolean, timestamp, geopoint, time-series)
  • Display Name: Human-readable label
  • Icon & Color: Visual representation in UIs
Object Type: Patient
├── Properties:
│   ├── patient_id (string, primary key)
│   ├── first_name (string)
│   ├── last_name (string)
│   ├── date_of_birth (date)
│   ├── diagnosis_codes (string[])
│   └── admission_timestamp (timestamp)
└── Backed by: /clinical/patients dataset

Link Types

Link Types define typed relationships between Object Types:

  • One-to-Many: Order → OrderLineItems
  • Many-to-Many: Patient ↔ Physician
  • Self-referential: Employee → Manager (Employee)
Link Type: PatientAdmissions
├── Object Type A: Patient
├── Object Type B: HospitalAdmission
├── Cardinality: One Patient → Many Admissions
└── Display: "Admissions" (from Patient) / "Patient" (from Admission)

Actions

Actions are typed, audited operations that create, modify, or delete Ontology objects. They enforce validation rules before applying changes.

// Action Definition (TypeScript Function Repository)
import { Action } from '@osdk/foundry';

export const updatePatientDiagnosis = Action({
  apiName: 'update-patient-diagnosis',
  parameters: {
    patient: { type: 'object', objectType: 'Patient' },
    diagnosisCode: { type: 'string' },
    notes: { type: 'string', nullable: true },
  },
  validation: [
    ({ diagnosisCode }) => diagnosisCode.startsWith('ICD-') || 'Must be a valid ICD code',
  ],
});

The Ontology SDK (OSDK)

The OSDK provides TypeScript and Python clients for querying and mutating the Ontology from external applications.

TypeScript OSDK Example

import { createClient } from '@osdk/client';
import { createPalantirJwtTokenProvider } from '@osdk/oauth';

const client = createClient(
  'https://your-stack.palantirfoundry.com',
  'my-app-client-id',
  createPalantirJwtTokenProvider({ token: process.env.FOUNDRY_TOKEN }),
);

// Query objects
const patients = await client(Patient)
  .where({ diagnosisCodes: { $contains: 'ICD-10-E11' } })
  .orderBy({ lastName: 'asc' })
  .limit(50)
  .all();

// Navigate links
const admissions = await patient.$link.admissions.all();

// Apply an action
await client(UpdatePatientDiagnosis)({
  patient: patientObject,
  diagnosisCode: 'ICD-10-E11.9',
  notes: 'Type 2 diabetes, well-controlled',
});

Python OSDK Example

from foundry_sdk import FoundryClient

client = FoundryClient(
    hostname="https://your-stack.palantirfoundry.com",
    auth=UserTokenAuth(token=os.environ['FOUNDRY_TOKEN']),
)

# Query
patients = client.ontology.objects.Patient.filter(
    Patient.diagnosis_codes.contains('ICD-10-E11')
).all()

# Apply action
client.ontology.actions.update_patient_diagnosis(
    patient=patient_obj,
    diagnosis_code='ICD-10-E11.9',
)

Ontology Search & Filtering

// Full-text search
const results = await client(Asset)
  .search('F-35 maintenance')
  .limit(20)
  .all();

// Property filters
const activeContracts = await client(Contract)
  .where({
    $and: [
      { status: { $eq: 'ACTIVE' } },
      { value: { $gt: 1_000_000 } },
      { expirationDate: { $gt: new Date() } },
    ]
  })
  .all();

// Aggregations
const summary = await client(Order)
  .groupBy({ department: 'exact' })
  .aggregate({
    total: { $sum: 'amount' },
    count: { $count: '*' },
  });

Why the Ontology Matters for AI

AIP Logic functions receive objects from the Ontology as context. When an LLM is asked "What is the status of Order #12345?", AIP automatically fetches the Order object and provides it as grounded context — preventing hallucination by giving the model real, live data.

This is the core Palantir advantage: AI with grounded, real-time enterprise context.