跳转至

Foundry platform summary for LLMs(面向LLM的Foundry平台概述)

This page provides a summary of Palantir's Foundry platform for use with LLMs and AI agents, covering the platform's architecture, core terminology, and data integration patterns.

Select the copy icon in the top right corner of the code block below to copy the content to your clipboard. Next, paste the content into your AI agent's conversation window to provide it with helpful context about the Foundry platform. If your agent is configured with the Palantir MCP, it can use the search_foundry_documentation tool to explore the documentation about topics covered in this summary.

:::callout{theme="neutral"} The summary below was generated by an LLM and has been reviewed by Palantir engineers to ensure its accuracy as a high-level explanation of the Foundry platform for use by LLMs and AI agents.

This content was last updated on March 16, 2026. :::

# Palantir Foundry

> Palantir Foundry is an enterprise data operating system that enables organizations to integrate data from any source, build a semantic layer (the Ontology) that maps data to real-world concepts, create operational applications, and deploy AI-powered workflows. This document provides an overview for AI agents helping users build in Foundry. This document was last updated Monday, March 16, 2026.

## Platform Architecture

Foundry organizes data into two primary layers: the *data layer* and the *object layer* (Ontology). Applications then consume data from these layers to power operational workflows.

### Enterprise Operating System

Palantir's standard architecture consists of three integrated platforms that collectively function as an **Enterprise Operating System**:

- **Apollo:** The continuous delivery platform that manages infrastructure and orchestrates zero-downtime upgrades across hundreds of services.
- **Foundry:** The foundational data operations platform providing core capabilities for data management, logic authoring, Ontology development, analytics, and workflow development.
- **AIP:** The generative AI platform providing secure LLM connectivity, agent development tools, AI-enabled applications, and the Evals framework for governing AI workflows.

These platforms work together to power mission-critical operations across industries, from healthcare to defense to manufacturing.

**Forward Deployed Engineering:** Palantir's product development paradigm where engineers are deeply embedded in customer environments—from factory floors to operational centers—working alongside customers to build and ship features that address real-world challenges. This continuous feedback loop drives platform evolution.

**Pursuing Alpha:** The goal of the platform is to deliver extreme differentiation through maintainable customization. Successful deployments enable organizations to build applications, integrations, and AI agents that address their unique problems, infusing their particularities into their ontology and adapting in real-time to complex operational conditions.

### 1. Data Layer

Raw data is stored in **datasets**, which typically represent tabular data like you might find in a spreadsheet, but support data at any scale. Data enters Foundry through **connectors** that sync from source systems (databases, APIs, cloud storage, enterprise systems like SAP). **Transforms** process and clean data, producing output datasets. The platform maintains complete **data lineage**, tracking how every dataset was produced and what logic was applied.

### 2. Ontology Layer (Object Layer)

The Ontology is a semantic layer that maps datasets and models to real-world concepts. It transforms rows into **objects** (like `Customer`, `Order`, `Aircraft`), columns into **properties** (characteristics of objects), and relationships into **links** (connections between objects).

More than a simple semantic layer, the Ontology is designed to represent the complex, interconnected *decisions* of an enterprise through the four-fold integration of **data**, **logic**, **action**, and **security**. This enables both humans and AI agents to collaborate across operational workflows. The Ontology consists of a **Language** (modeling semantic objects and kinetic actions), an **Engine** (providing scalable read/write architecture), and a **Toolchain** (enabling developers to build on the Ontology via the OSDK).

The Ontology includes:
- **Object types:** Schema definitions for real-world entities or events
- **Link types:** Relationship definitions between object types
- **Action types:** Definitions for sets of changes users can make to objects, property values, and links
- **Functions:** Server-side business logic that operates on the Ontology
- **Interfaces:** Abstract types describing the shape and capabilities of object types, enabling consistent interaction with object types that share a common shape

### Applications

Applications consume data from both layers to power operational workflows. Users interact with objects through **Workshop** (low-code application builder), **Slate** (custom HTML/CSS/JS applications), analytics tools like **Quiver** and **Object Explorer**, or custom applications built with the **Ontology SDK (OSDK)**.

### Data Flow Summary

```
Source Systems → Connectors → Datasets → Transforms → Clean Datasets
                                                           ↓
                                              Ontology (Objects, Links)
                                                           ↓
                                              Applications (Workshop, OSDK, and others)
                                                           ↓
                                              User Decisions → Actions → Writeback to external system
```

### Multimodal Data Plane (MMDP)

The Multimodal Data Plane (MMDP) is Palantir's open data and compute architecture that underlies Foundry and AIP. Key aspects include:

- **Open data architecture:** Apache Iceberg as the primary table format, enabling integration with data platforms like Databricks, Snowflake, and cloud providers without data duplication via virtual catalogs and virtual tables
- **Multimodal data support:** Beyond tabular data, MMDP extends to media, documents, streaming data, and geospatial data types
- **Open compute architecture:** Autoscaling runtimes including Spark for batch compute, Flink for streaming compute, and single-node engines like DataFusion, Polars, and DuckDB
- **Compute Modules:** "Bring your own compute" capability for containerized runtimes, models, and applications
- **Model access:** Secure connectivity to commercial LLMs (OpenAI, Anthropic, Google, Meta, xAI) and custom enterprise models through the Model Catalog

## Core Terminology

### Data Layer Terms

**Dataset:** A wrapper around a collection of files stored in Foundry. Datasets can be structured (tabular with schemas), unstructured (images, videos, PDFs), or semi-structured (JSON, XML). Datasets support versioning through transactions and maintain full history.

**Transform:** Code that processes input datasets to produce output datasets. Transforms are written in Code Repositories using Python, SQL, or Java, or in Code Workspaces using Python or R. Python transforms can run on lightweight single-node engines (Pandas, Polars, DuckDB) or distributed Spark.

**Pipeline Builder:** A point-and-click application for building data pipelines without writing code. Supports batch and streaming workflows.

**Sync:** The process of bringing data from external source systems into Foundry. There are several types: batch syncs (to datasets), streaming syncs (to streams), change data capture (CDC) syncs (to streams with changelog metadata), and media syncs (to media sets). Syncs can be scheduled or triggered manually.

**Connector:** A pre-built integration for connecting to external data sources (databases, cloud storage, APIs, enterprise systems).


**Listener:** An endpoint that enables external systems to push data into Foundry when they cannot use standard Foundry authentication or configurable API payloads. Foundry supports three listener types: HTTPS listeners (for webhooks, outputting to streams), WebSocket listeners (for real-time bidirectional communication with compute modules), and Email listeners (for receiving inbound emails to media sets).

**Incremental pipeline / transform:** A pipeline or transform that processes only rows or files that have changed since the last build, rather than reprocessing the entire dataset. Reduces latency and compute costs for large-scale datasets.

**Branch:** A version control concept allowing parallel development of pipelines, datasets, the Ontology, and Workshop applications. Changes are deployed back to the Main branch when ready. In Code Repositories, you can choose between two branch types: **Code Repositories branches** can be based on any branch and are scoped to changes within a single repository, while **Global branches** must be based on the main branch and can contain changes across multiple Palantir applications. Global branches are supported in Python Transforms and TypeScript v1 repositories. **Global Branching** provides a unified experience to make modifications across multiple applications on a single branch, test changes end-to-end without disrupting the production environment, and merge with a single action. The branching workflow includes creating a branch from `Main`, making changes, creating a **proposal** (analogous to a pull request) to deploy changes, and reviewing and approving changes before deployment. Note that not all resource types are supported on Global branches: TypeScript v2 and Python functions cannot be modified on a branch (though you can reference specific versions), and the Ontology SDK is not branchable.

### Ontology Terms

**Object:** A single instance of an object type, representing a real-world entity or event (for example, a specific flight "JFK → SFO 2021-02-24").

**Object Type:** The schema definition of a real-world entity or event. Defines properties, their types, the primary key, and backing dataset(s).

**Object Set:** A collection of objects, typically the result of a filter or search. Object sets can be passed to functions, displayed in applications, or used in actions.

**Property:** The schema definition of a characteristic of a real-world entity or event (for example, `employee number`, `start date`, `role`). Properties have types (string, integer, date, array, and others) and can be required or optional.

**Primary Key:** The unique identifier for objects of a type. Maps to a column in the backing dataset.

**Link Type:** The schema definition for relationships between object types (for example, the link between employee and company). Specifies cardinality (one-to-one, one-to-many, many-to-many) and which properties serve as foreign keys.

**Action Type:** A definition of changes or edits to objects, property values, and links that a user can take at once, including parameters, rules, submission criteria, and side effects (notifications, webhooks).

**Action:** A user-initiated transaction that modifies objects, properties, or links. Actions are instances of action types.

**Interface:** An abstract type describing shared properties across multiple object types. Enables polymorphic workflows.

**Materialization:** A dataset that combines data from input datasources with user edits to capture the latest state of each object. Used for building downstream Foundry pipelines or enabling downloads of Ontology data.

### Function Terms

**Function:** Server-side code (TypeScript or Python) that can read Ontology data, perform computations, and make Ontology edits.

**Function-backed Action:** An action type whose logic is implemented by a function rather than declarative rules.

**Function-backed Column:** A derived column in a Workshop Object Table whose value is calculated on-the-fly by a function. When using runtime input, the function processes only the objects currently displayed in the table for faster performance.

**Ontology Edits:** Modifications to objects, properties, and links performed by functions (creating objects, updating properties, deleting objects, adding/removing links).

### Application Terms

**Workshop:** A low-code application builder for creating operational applications using drag-and-drop widgets. Workshop apps are built on the Ontology and use events for interactivity.

**Widget:** A UI component in Workshop (table, chart, map, form, button, and others). Widgets bind to Ontology data and can trigger events.

**Event:** A configurable behavior in Workshop that is triggered by user interactions (for example, button selection, row selection). Events can update variables, navigate to pages or tabs, open or close overlays, open other Foundry resources, refresh data, or control module appearance.

**Variable:** A typed value used to configure how data moves through a Workshop module. Variables store values of various types (object sets, strings, numbers, booleans, dates, timestamps, arrays, structs, geopoints, geoshapes, time series) and bind to widget inputs and outputs to enable interactivity.

**Slate:** An application framework that enables application developers to construct customizable applications using a drag-and-drop interface, CSS and JavaScript.

**OSDK (Ontology SDK):** Auto-generated SDKs (TypeScript, Python, Java, plus OpenAPI spec for other languages) for accessing Ontology data and executing actions from external applications.

**Custom Widget:** There are two approaches to extending Workshop with custom functionality:
1. **OSDK Custom Widget:** A React component built with OSDK that extends Workshop's widget library, deployed and registered as a native Workshop widget.
2. **Custom Widget via iframe:** An external application embedded in Workshop that can bidirectionally communicate using Workshop variables and events via the `@osdk/workshop-iframe-custom-widget` npm package, enabling the embedded app to read from and write to Workshop without being a native widget.

### AI Platform (AIP) Terms

**AIP:** Palantir's Artificial Intelligence Platform for building AI-powered workflows, agents, and functions on top of the Ontology. AIP's architecture encompasses 12 key capability categories: secure LLM integration and access, end-to-end observability, context engineering, the Ontology system, vector/compute/tool services, security and governance, agent lifecycle management, operational automation, development environments, human + AI applications, package/release/deploy workflows, and enterprise automation.

**AIP Chatbot:** An interactive assistant built in AIP Chatbot Studio (formerly known as AIP Agent Studio), equipped with enterprise-specific information and tools (including Ontology data, documents, and custom functions).

**AIP Logic:** A no-code development environment for building, testing, and releasing LLM-powered functions that can return outputs or make edits to the Ontology.

**AIP Assist:** An in-platform LLM assistant for navigating and understanding Foundry.

**AIP Observability:** A set of capabilities in Workflow Lineage that provide visibility into AIP and Ontology workflow executions, including metrics, execution history, distributed tracing, logging, and log search.

**Retrieval Context:** Documents, object data, or function outputs provided to an AIP chatbot to ground its responses.

**LLM-provider compatible APIs:** Foundry provides proxy endpoints for popular LLM providers (Anthropic, OpenAI) that accept requests in the same format as the providers' native APIs. This enables use of open-source SDKs and tools like Claude Code while benefiting from Foundry capabilities such as rate limiting, zero data retention (ZDR), and usage tracking. External tools can be configured to route requests through these endpoints by setting environment variables with a Foundry token and the appropriate base URL.

**Bring Your Own Model (BYOM):** Organizations can connect their own LLMs or model provider accounts to AIP through registered models. Registered models can be used across AIP applications including AIP Chatbot Studio, AIP Logic, Workshop, and TypeScript functions. Models are registered through Control Panel using a REST API source in Data Connection, with support for rate limits, permissions control, and usage observability through Resource Management. BYOM is recommended when Palantir-provided models cannot be used for legal or compliance reasons, or when leveraging fine-tuned or specialized LLMs.

## Data Integration

Data integration in Foundry provides an extensible framework for connecting to source systems, transforming data, and maintaining high-quality pipelines.

### Pipeline Builder

**Pipeline Builder** is Foundry's primary application for data integration. It provides:
- Point-and-click interface for building pipelines
- Dataset health checks
- Type-safe transformations with schema safety
- Built-in LLM assistance for generating complex transformations
- Support for media processing and geospatial data

Workflow: Inputs → Transform → Preview → Deliver → Outputs

Pipeline Builder can output to datasets, media sets, files and file sets, geotemporal series syncs, virtual tables, or Ontology components (object types, link types, and time series syncs) directly.

### Code Repositories

For complex transformation logic, **Code Repositories** provides a web-based IDE for writing production-ready transforms in Python, Java, SQL, or Mesa. Features include:
- Git-based version control with branching
- Pull requests and code review
- IntelliSense and error checking
- Integration with CI/CD workflows

### Transform Languages

**Python Transforms** (most full-featured):
- Use `@transform.using` decorator
- Work with PySpark DataFrames or Pandas/Polars/DuckDB
- Support incremental computation
- Can call external APIs via `transforms-external-systems`

**SQL Transforms:**
- Declarative SQL syntax

**Java Transforms:**
- Access to full Spark Java API

### Processing Modes

**Batch:** Fully recomputes all datasets in the pipeline on each run.

**Incremental:** Processes only new/changed data. More efficient for large, append-only datasets. Requires careful handling of schema changes.

**Streaming:** Near real-time processing using Flink. For use cases requiring low latency.

### Data Quality

**Data Expectations:** Assertions about data quality (for example, "column X should never be null", "values should be in range"). Expectations can block builds if violated.

**Health Checks:** Monitoring rules that alert on pipeline issues, data freshness, or quality problems.

**Data Health:** A Foundry application for monitoring the health of platform resources including datasets, builds, functions, actions, and automates. Data Health provides two primary feature sets:
- **Monitoring views:** Monitor resources at scale using scope-based monitoring rules across projects, folders, or individual resources.
- **Health checks:** Configure detailed checks on individual resources, including content and schema validation for datasets.

Alerts can be delivered through Foundry notifications, email digests, or external systems such as PagerDuty and Slack.

## Ontology

The Ontology is the semantic layer that transforms raw data into real-world concepts, enabling applications and users to work with meaningful entities rather than abstract tables.

### Object Types

An object type defines:
- **Properties:** Attributes with types (string, integer, double, boolean, date, timestamp, array, struct, geoshape, and others)
- **Primary Key:** Unique identifier property
- **Title:** The property that acts as a display name for objects of this type
- **Backing Datasource(s):** The source of the data used as property values for objects of this type

Objects are automatically created and updated through the indexing process when backing datasources are updated. One row = one object.

### Link Types

Link types define relationships with:
- **Source and Target Object Types:** Which types are connected
- **Cardinality:** One-to-one, one-to-many, many-to-one, or many-to-many
- **Key:** The properties or columns used to create links (foreign key to primary key for one-to-one/many-to-one, or join table for many-to-many)
- **Object-backed Links:** Use a backing object type to add additional metadata/properties on the relationship (extends many-to-one links)

Links enable traversing relationships: from an Order, navigate to its Customer; from a Customer, navigate to all their Orders.

### Interfaces

Interfaces provide polymorphism:
- Define shared properties that multiple object types implement
- Enable workflows that operate on any implementing type
- Example: `Facility` interface implemented by `Airport`, `Manufacturing Plant`, `Maintenance Hangar`

### Action Types

Action types define sets of changes or edits users can make to objects, property values, and links:
- **Parameters:** Inputs the user provides (object selections, text fields, dropdowns)
- **Rules:** Logic that transforms parameters into ontology edits (create/modify/delete objects and links)
- **Side Effects:** Notifications and webhooks to integrate with existing organizational processes
- **Schedule Rules:** Trigger builds of schedules when actions are applied, with support for passing action parameters to parameterized transforms
- **Submission Criteria:** Conditions that determine whether an Action can be submitted, supporting business logic and permissions.

Actions can be **function-backed** for complex logic that cannot be expressed declaratively.

## Functions

Functions enable server-side business logic with first-class Ontology support. Functions can:
- Query and aggregate object data
- Traverse links between objects
- Create, update, and delete objects (Ontology edits)
- Call external APIs

### Languages

**TypeScript v2:** Runs in a Node.js runtime with OSDK support, configurable resources, Ontology interfaces support, and language model integration through proxy endpoints.

**TypeScript v1:** Supports webhooks, functions on models, and bring-your-own-model features not available in v2.

**Python:** Ontology object and edits support with OSDK. The only language usable in Pipeline Builder. Supports language model integration through proxy endpoints.


**Ontology SQL:** Define reusable, parameterized queries over ontology objects using SQL. Ontology SQL functions are read-only and return lists of structs matching selected columns. Can be created in SQL Studio or SQL Console in Object mode.

### TypeScript v1 Example

```typescript
import { Function } from "@foundry/functions-api";
import { Objects } from "@foundry/ontology-api";

export class FlightFunctions {
    @Function()
    public currentFlightDestinations(airportCode: string): Set<string> {
        const flightsFromAirport = Objects.search()
            .flights()
            .filter(flight => flight.departureAirportCode.exactMatch(airportCode))
            .all();

        const destinations = flightsFromAirport.map(flight => flight.arrivalAirportCode!);

        return new Set(destinations);
    }
}
```

### Python Example

```python
from functions.api import function, String

@function
def my_function() -> String:
    return "Hello World!"
```

### Function-backed Columns

Derived properties computed on-the-fly in Workshop Object Tables:

```typescript
@Function()
public flightAlertCalculateUrgency(flightAlerts: ObjectSet<FlightAlert>):
FunctionsMap<FlightAlert, string>{
    const map = new FunctionsMap<FlightAlert, string>();
    flightAlerts.all().forEach(flightAlert => {
        var hoursDelayed = flightAlert.timeOfDelayHours
        if (hoursDelayed! > 4) {
            map.set(flightAlert, "High")
        } else if (hoursDelayed! > 2) {
            map.set(flightAlert, "Medium")
        } else {
            map.set(flightAlert, "Low")
        }
    });
    return map;
}
```

### Function-backed Actions

Actions implemented with Ontology edit functions:

```typescript
@OntologyEditFunction()
public addPriorityToTitle(ticket: DemoTicket): void {
    let newTitle: string = "[" + ticket.ticketPriority + "]" + ticket.ticketTitle;
    ticket.ticketTitle = newTitle;
}
```

## Applications

### Workshop

Workshop is a flexible, object-oriented application building tool that enables builders to create interactive applications for operational users. Key concepts:

**Widgets:** UI components that display content and are the core building blocks of a module's user interface
- Object Table: Display and interact with object sets
- Object List: Cards for browsing objects
- Chart XY: Visualizations backed by Ontology aggregations
- Inline Action: Enables users to create, modify, or delete objects or links via action types, supporting both form and table interfaces
- Map: Geospatial object visualization
- Button Group: Trigger Actions, Workshop events, URLs, and exports via styled buttons
- Many more (60+ widgets across display, visualization, filtering, navigation, and embedding categories)

**Events:** Trigger specific behavior based on user actions
- Row selection → update variable
- Button selection → execute action
- Object selection → navigate to detail view

**Variables:** Configure how data moves through a Workshop module
- Store object sets, object set filters, primitives (strings, numbers, booleans, dates, timestamps), arrays, structs, geopoints, geoshapes, and time series
- Bind to widget inputs and outputs
- Enable interactivity between widgets

**Layouts:** Configure how the user interface of a module is organized (columns, rows, tabs, flow, toolbar, loop)
- Pages, overlays (drawers and modals), collapsible sections

**Common Patterns:**
- Inbox/Task Management: List of items to triage and process
- Common Operational Picture (COP): Big-screen dashboards with maps and charts
- Detail Views: Drill down from list to individual object
- Forms: Capture user input and execute actions

### Slate

Slate enables application developers to construct customizable applications using a drag-and-drop interface, CSS and JavaScript:
- Drag-and-drop widget positioning
- Custom styling and branding
- Direct JavaScript for complex interactions
- Access to Ontology and Functions via API calls
- Support for public-facing applications

Use Slate when you need a code-first approach with full HTML, CSS, and JavaScript customization, custom styling and branding, or public-facing applications.

### OSDK (Ontology SDK)

For fully custom applications, OSDK generates type-safe SDKs:

**TypeScript SDK:**
```typescript
import { createClient } from "@osdk/client";
import { Employee } from "@your-generated-sdk";

const client = createClient(foundryUrl, ontologyRid, auth);
const result = await client(Employee).fetchPage();
const employees = result.data;
```

**Slate Integration:**
```typescript
import { client } from "@slate/osdk";

const driverResponse = await client.ontology.objects.F1Driver.fetchPage({
    pageSize: 10,
});
const driverNames = driverResponse.data.map(
    (driver) => `${driver.forename} ${driver.surname}`
);
```

OSDK supports:
- Object queries with filtering, sorting, pagination
- Link traversal
- Action execution
- Real-time subscriptions
- Custom Workshop widgets


### Pilot

Pilot is an AI-powered application builder that creates applications from natural language prompts. You describe the application you want to build, and Pilot automatically generates the ontology entities, design specification, frontend code, and seed data. Applications built with Pilot use OSDK and React, and are deployed through Developer Console as production-grade hosted applications.

Pilot manages the full application lifecycle with specialized AI agents:
- **Ontology generation:** Creates object types, action types, link types, properties, and relationships
- **Design specification:** Produces color palette, typography, layout, and interaction patterns
- **Frontend generation:** Implements a React application using OSDK hooks with live preview
- **Seed data generation:** Generates sample data in an isolated container (AI agents never access real enterprise data)
- **Guided deployment:** Step-by-step deployment through ontology promotion, Developer Console configuration, and CI checks

Pilot uses Global Branching to promote ontology changes to production.

### Analytics Applications

**Quiver:** Point-and-click analysis on Ontology objects and time series
- Best for: Ontology-mapped data, time series, embeddable dashboards
- Features: Link traversal, time series formula language

**Contour:** Point-and-click analysis on datasets (tables)
- Best for: Large datasets (100k+ rows), non-Ontology data
- Features: Visual transforms, joins, aggregations, dashboards


**Insight:** Point-and-click analysis on Ontology objects
- Best for: Analysts and investigators working with modeled Ontology data
- Features: Step-by-step analysis paths, link traversal, aggregations, visualizations, maps, SQL queries, data writeback
- Compared to Object Explorer: Insight is best for informed analysis on known Ontology data with an intuitive workflow; Object Explorer is best for discovery and searching across unfamiliar Ontology data

**Code Workbook** [Legacy]: Code-based analysis notebooks
- Languages: Python, R, SQL
- Features: Visualization, collaboration, template reuse
- Note: Legacy status, consider other tools (Code Workspaces for exploratory analysis, Code Repositories for production pipelines)

**Notepad:** Object-aware collaborative rich-text editor
- Embed charts and tables from other tools
- Template-based report generation
- Point-in-time data snapshots

**Fusion:** Spreadsheet application
- Writeback from spreadsheets to datasets
- Familiar spreadsheet experience

**Object Explorer:** Search and analysis tool for answering questions about anything in the Ontology
- Keyword and property-based search
- Bulk actions on object sets
- Export capabilities

## AIP Applications

### AIP Chatbot Studio

Build interactive assistants (AIP Chatbots) with:
- **Retrieval Context:** Ground responses in Ontology objects, documents, or function outputs
- **Tools:** Enable chatbots to perform specific actions or retrieve information. Tool types include: Actions (execute ontology edits), Object query (access and filter object types), Function (call Foundry functions including AIP Logic), Update application variable, Command (trigger operations in Palantir applications on behalf of users), and Request clarification (pause for user input). Tools can operate in prompted tool calling mode (sequential, all models) or native tool calling mode (parallel, improved performance, subset of models).
- **Application Variables:** Configure chatbot state and map to Workshop variables
- **Deployment:** Use in AIP Threads, Workshop, OSDK applications, or via Platform APIs for programmatic access including session creation, streaming/blocking message exchanges, and conversation history retrieval

Agent Tiers:
1. **Ad-hoc:** Use AIP Threads for quick document analysis
2. **Task-specific:** Build reusable chatbots with specific context
3. **Agentic Application:** Integrate chatbots into Workshop or OSDK apps
4. **Automated:** Publish chatbot as function for autonomous workflows via AIP Automate

### AIP Logic

No-code environment for LLM-powered functions:
- Visual block-based interface
- Intuitive prompt engineering with natural language
- Query Ontology objects for context
- Make Ontology edits based on LLM output
- Integrate with Automate for triggered or scheduled execution of Ontology edits

Use cases:
- Extract structured data from unstructured text
- Classify and route incoming requests
- Generate summaries and recommendations

### AIP Assist

In-platform LLM assistant for:
- Navigating Foundry documentation
- Understanding platform capabilities
- Developer assistance with code and APIs

### AIP Evals

Testing environment to evaluate AIP Logic functions, Chatbot functions, and code-authored functions, specifically designed for handling LLM non-determinism:
- Create evaluation suites with test cases
- Measure quality metrics
- Run experiments with parameter combinations
- Compare model performance

## Automation

### Automate

Automate triggers actions based on conditions:

**Conditions:**
- Time-based: "Every Monday at 9am"
- Data-based: "When a high-priority alert is created"
- Combined: "Every Monday at 9am, check for new high-priority alerts"

**Effects:**
- Action effects: Execute actions on objects (create, modify, delete)
- Function effects: Execute functions for custom compute logic (beta)
- Logic effects: Execute AIP Logic functions
- Notification effects: Send notifications (email, platform) with optional attachments
- Fallback effects: Handle errors gracefully when primary effects fail

Use cases:
- Scheduled report sending and digests
- Data alerting
- Workflow automation
- Watched searches

## Developer Tools

### Code Repositories

Web-based IDE for:
- Python, Java, SQL transforms
- TypeScript and Python functions
- Git version control
- Pull requests and code review
- CI/CD integration

### Developer Console

Portal for:
- OSDK generation and management
- OAuth client configuration
- Application hosting on enrollment subdomains or custom domains
- Application sharing and long-lived tokens
- Ontology MCP configuration for AI agent access

### REST APIs

Programmatic access to platform resources through Palantir's APIs:
- **Datasets:** Read, write, and manage datasets, including branches, transactions, files, and views
- **Filesystem:** Manage spaces, projects, folders, and resource roles
- **Administration:** Manage users, groups, organizations, hosts, and markings
- **Orchestration:** Trigger builds, inspect jobs, and configure schedules
- **Connectivity:** Manage connections, virtual tables, and file or table imports from external sources
- **SQL Queries:** Execute SQL against datasets
- **Media Sets:** Upload, retrieve, and manage media sets and their items
- **Ontology:** Query and edit ontology data
- **AIP Chatbots:** Programmatic chatbot interactions
- **Platform administration:** Audit logs, data health checks, streams, checkpoints, and more

### VS Code Integration

- VS Code Workspaces in browser
- Local VS Code with Palantir extension
- Continue extension for AI assistance with Foundry context

### Palantir MCP

Model Context Protocol server enabling:
- External AI IDEs to access Foundry context
- Documentation and API discovery
- Application building assistance
- 70+ tools for building and modifying ontology types (object types, link types, action types)

Palantir MCP is designed for ontology *builders* and development workflows. It can modify ontology types but cannot write ontology data.


### Ontology MCP (OMCP)

Ontology MCP is a Developer Console feature that exposes application ontology resources as MCP tools, enabling external AI agents to interact with ontology data:
- External AI agents can read objects, execute actions, and query data
- Controlled writes to ontology data through predefined actions
- Access restricted through application restrictions and permissions
- Authenticates using OAuth 2.0 with support for authorization code grant (for user-based access) and client credentials grant (for service-to-service workflows)
- Integrates with desktop agents (Claude.ai, Microsoft Copilot Studio, Gemini Enterprise) and headless agent frameworks (Anthropic SDK, Google ADK, Microsoft Agent Framework, OpenAI SDK)
- **MCP Hub** provides a central location to discover and manage all Ontology MCP servers configured across an enrollment

Ontology MCP is designed for ontology *consumers*: external AI agents that need to safely interact with production ontology data.

## Interoperability

Foundry and AIP are designed to interoperate with existing enterprise systems across multiple domains:

- **Data interoperability:** Built on open data standards like Apache Iceberg and Apache Parquet, with connectivity through REST, JDBC, and S3-compatible access. The Multimodal Data Plane (MMDP) enables integration with existing data platforms like Databricks, Snowflake, and BigQuery through Virtual Tables.

- **Metadata interoperability:** Exposes metadata attributes across projects, datasets, ontology elements, models, and more through Platform SDK and APIs for integration with data catalogs and governance tools.

- **Semantic interoperability:** The Ontology can be accessed through REST APIs and integrated with external semantic modeling tools. Webhooks enable integration with operational systems.

- **Code & logic interoperability:** Uses open languages (Python, Java, SQL) and runtimes (Spark, Flink, DataFusion, Polars). Compute Modules enable bringing custom containerized runtimes.

- **Analytical interoperability:** Out-of-the-box connectors for Power BI®, Tableau, Jupyter®, and RStudio®. Code Workspaces provides native Jupyter® and RStudio® experiences.

- **Security interoperability:** Integrates with existing authentication (SAML) and authorization systems (Active Directory).

## Observability

Foundry provides built-in tools to monitor the health of your resources, debug issues in development and production, trace execution across services, and analyze telemetry at scale.

### Monitoring

**Data Health** is the primary application for monitoring platform resources. It provides:
- **Monitoring views:** Scope-based monitoring rules across projects, folders, or individual resources
- **Health checks:** Detailed validation on individual resources including content and schema validation

Alerts can be delivered through Foundry notifications or external systems like PagerDuty and Slack.

### Metrics

Foundry provides metrics across multiple resource types:
- **Functions, actions, and AIP Logic:** Near real-time success/failure counts and P95 execution duration over the last 30 days
- **Streams and compute modules:** Metrics for monitoring long-running compute workloads

### Debugging

**Workflow Lineage** enables exploration of platform history and logs:
- View seven days of execution history
- Filter by status, user, duration, or version
- Search across logs from all executions

**Trace views** visualize the full request journey across functions, actions, and LLM calls, showing duration, inputs, outputs, and errors.

### Log Export

Foundry logs, metrics, and traces can be exported to a streaming dataset to power custom dashboards, pipelines, or observability workflows.

## Security & Governance

Foundry security is built on:

### Access Control

- **Projects:** Primary security boundary for organizing work and resources
- **Organizations:** Mandatory controls for user silos
- **Roles:** Discretionary permissions (Owner, Editor, Viewer, Discoverer)
- **Markings:** Mandatory controls for sensitive data (PII, PHI, and others)

### Data Protection

- Encryption at rest and in transit
- Single sign-on and multi-factor authentication
- Comprehensive audit logging
- Row and column-level security

### Governance

- Data lineage tracking
- Sensitive data scanning
- Data retention policies
- Checkpoint justifications for sensitive actions

## Documentation Links

### Getting Started

- [Overview](https://www.palantir.com/docs/foundry/getting-started/overview)
- [Introductory Concepts](https://www.palantir.com/docs/foundry/getting-started/introductory-concepts)
- [Application Reference](https://www.palantir.com/docs/foundry/getting-started/application-reference)

### Data Integration

- [Data Integration Overview](https://www.palantir.com/docs/foundry/data-integration/overview)
- [Pipeline Builder](https://www.palantir.com/docs/foundry/pipeline-builder/overview)
- [Code Repositories](https://www.palantir.com/docs/foundry/code-repositories/overview)
- [Python Transforms](https://www.palantir.com/docs/foundry/transforms-python/overview)

### Ontology

- [Ontology Overview](https://www.palantir.com/docs/foundry/ontology/overview)
- [Ontology Best Practices and Anti-patterns](https://www.palantir.com/docs/foundry/ontology/ontology-best-practices-and-anti-patterns)
- [Object Types](https://www.palantir.com/docs/foundry/object-link-types/object-types-overview)
- [Link Types](https://www.palantir.com/docs/foundry/object-link-types/link-types-overview)
- [Action Types](https://www.palantir.com/docs/foundry/action-types/overview)
- [Interfaces](https://www.palantir.com/docs/foundry/interfaces/interface-overview)

### Functions

- [Functions Overview](https://www.palantir.com/docs/foundry/functions/overview)
- [TypeScript v1 Getting Started](https://www.palantir.com/docs/foundry/functions/typescript-v1-getting-started)
- [TypeScript v2 Getting Started](https://www.palantir.com/docs/foundry/functions/typescript-v2-getting-started)
- [Python Functions](https://www.palantir.com/docs/foundry/functions/python-getting-started)

### Applications

- [Workshop](https://www.palantir.com/docs/foundry/workshop/overview)
- [Slate](https://www.palantir.com/docs/foundry/slate/overview)
- [OSDK](https://www.palantir.com/docs/foundry/ontology-sdk/overview)
- [OSDK React Applications](https://www.palantir.com/docs/foundry/ontology-sdk-react-applications/overview)
- [Pilot](https://www.palantir.com/docs/foundry/pilot/overview)

### AI Platform

- [AIP Overview](https://www.palantir.com/docs/foundry/aip/overview)
- [Chatbot Studio](https://www.palantir.com/docs/foundry/chatbot-studio/overview)
- [AIP Logic](https://www.palantir.com/docs/foundry/logic/overview)
- [AIP Evals](https://www.palantir.com/docs/foundry/aip-evals/overview)

### Analytics

- [Quiver](https://www.palantir.com/docs/foundry/quiver/overview)
- [Contour](https://www.palantir.com/docs/foundry/contour/overview)
- [Notepad](https://www.palantir.com/docs/foundry/notepad/overview)

### Automation

- [Automate](https://www.palantir.com/docs/foundry/automate/overview)
- [Foundry Rules](https://www.palantir.com/docs/foundry/foundry-rules/overview)

### Observability

- [Observability overview](https://www.palantir.com/docs/foundry/observability/overview)
- [Data Health](https://www.palantir.com/docs/foundry/observability/data-health)
- [Workflow Lineage](https://www.palantir.com/docs/foundry/workflow-lineage/overview)
- [AIP Observability](https://www.palantir.com/docs/foundry/aip-observability/overview)

### Security

- [Security overview](https://www.palantir.com/docs/foundry/security/overview)

中文翻译

# 面向LLM的Foundry平台概述

本页概述了Palantir的Foundry平台,供LLM和AI智能体使用,涵盖平台架构、核心术语和数据集成模式。

选择下方代码块右上角的复制图标,将内容复制到剪贴板。然后,将内容粘贴到AI智能体的对话窗口中,为其提供有关Foundry平台的有用上下文。如果您的智能体配置了[Palantir MCP](https://palantir.com/docs/foundry/palantir-mcp/overview/),它可以使用[`search_foundry_documentation`工具](https://palantir.com/docs/foundry/palantir-mcp/available-tools/#documentation-search-tools)来探索本概述所涵盖主题的相关文档。

:::callout{theme="neutral"}
以下概述由LLM生成,并已由Palantir工程师审核,以确保其作为供LLM和AI智能体使用的Foundry平台高级解释的准确性。 <br><br>
此内容最后更新于2026年3月16日。
:::

````llm
# Palantir Foundry

> Palantir Foundry是一个企业数据操作系统,使组织能够集成来自任何来源的数据,构建将数据映射到现实世界概念的语义层(本体论(Ontology)),创建运营应用程序,并部署AI驱动的工作流。本文档为帮助用户在Foundry中构建的AI智能体提供了概述。本文档最后更新于2026年3月16日,星期一。

## 平台架构

Foundry将数据组织成两个主要层:*数据层(Data Layer)* 和 *对象层(Object Layer)*(本体论(Ontology))。然后,应用程序从这些层消费数据,以驱动运营工作流。

### 企业操作系统

Palantir的标准架构由三个集成平台组成,它们共同充当**企业操作系统(Enterprise Operating System)**:

- **Apollo:** 持续交付平台,负责管理基础设施并编排数百个服务的零停机升级。
- **Foundry:** 基础数据操作平台,提供数据管理、逻辑编写、本体论(Ontology)开发、分析和工作流开发的核心能力。
- **AIP:** 生成式AI平台,提供安全的LLM连接、智能体开发工具、AI驱动的应用程序以及用于治理AI工作流的Evals框架。

这些平台协同工作,为从医疗保健到国防再到制造业等各行各业的使命关键型运营提供动力。

**前向部署工程(Forward Deployed Engineering):** Palantir的产品开发范式,工程师深入嵌入客户环境——从工厂车间到运营中心——与客户并肩工作,构建和交付解决现实世界挑战的功能。这种持续的反馈循环驱动着平台的发展。

**追求卓越(Pursuing Alpha):** 平台的目标是通过可维护的定制化来实现极致的差异化。成功的部署使组织能够构建解决其独特问题的应用程序、集成和AI智能体,将其特殊性注入到本体论(Ontology)中,并实时适应复杂的运营条件。

### 1. 数据层(Data Layer)

原始数据存储在**数据集(Datasets)**中,这些数据集通常代表您可能在电子表格中看到的表格数据,但支持任何规模的数据。数据通过**连接器(Connectors)**从源系统(数据库、API、云存储、SAP等企业系统)同步到Foundry。**转换(Transforms)**处理和清理数据,生成输出数据集。平台维护完整的**数据谱系(Data Lineage)**,跟踪每个数据集是如何生成的以及应用了哪些逻辑。

### 2. 本体论层(Ontology Layer)(对象层(Object Layer))

本体论(Ontology)是一个语义层,将数据集和模型映射到现实世界的概念。它将行转换为**对象(Objects)**(如`Customer`、`Order`、`Aircraft`),将列转换为**属性(Properties)**(对象的特征),将关系转换为**链接(Links)**(对象之间的连接)。

本体论(Ontology)不仅仅是一个简单的语义层,它旨在通过**数据(Data)**、**逻辑(Logic)**、**动作(Action)**和**安全(Security)**的四重集成,来表示企业复杂、相互关联的*决策*。这使得人类和AI智能体能够在运营工作流中进行协作。本体论(Ontology)包含一个**语言(Language)**(建模语义对象和动态动作)、一个**引擎(Engine)**(提供可扩展的读/写架构)和一个**工具链(Toolchain)**(使开发者能够通过OSDK在本体论(Ontology)上进行构建)。

本体论(Ontology)包括:
- **对象类型(Object Types):** 现实世界实体或事件的模式定义
- **链接类型(Link Types):** 对象类型之间的关系定义
- **动作类型(Action Types):** 用户可以对对象、属性值和链接进行的一组更改的定义
- **函数(Functions):** 在本体论(Ontology)上运行的服务器端业务逻辑
- **接口(Interfaces):** 描述对象类型的形状和能力的抽象类型,支持与共享共同形状的对象类型进行一致交互

### 应用程序

应用程序从两个层消费数据,以驱动运营工作流。用户通过**Workshop**(低代码应用程序构建器)、**Slate**(自定义HTML/CSS/JS应用程序)、**Quiver**和**Object Explorer**等分析工具,或使用**本体论SDK (OSDK)** 构建的自定义应用程序与对象进行交互。

### 数据流摘要
源系统 → 连接器 → 数据集 → 转换 → 清理后的数据集 ↓ 本体论(Ontology) (对象, 链接) ↓ 应用程序 (Workshop, OSDK等) ↓ 用户决策 → 动作 → 写回外部系统
### 多模态数据平面 (MMDP)

多模态数据平面(MMDP)是Palantir的开放数据和计算架构,是Foundry和AIP的基础。关键方面包括:

- **开放数据架构:** Apache Iceberg作为主要表格式,通过虚拟目录和虚拟表实现与Databricks、Snowflake和云提供商等数据平台的集成,无需数据复制
- **多模态数据支持:** 除了表格数据,MMDP还扩展到媒体、文档、流数据和地理空间数据类型
- **开放计算架构:** 自动扩展运行时,包括用于批处理的Spark、用于流处理的Flink,以及DataFusion、Polars和DuckDB等单节点引擎
- **计算模块(Compute Modules):** “自带计算”能力,用于容器化运行时、模型和应用程序
- **模型访问:** 通过模型目录安全连接到商业LLM(OpenAI、Anthropic、Google、Meta、xAI)和自定义企业模型

## 核心术语

### 数据层术语

**数据集(Dataset):** 对存储在Foundry中的文件集合的封装。数据集可以是结构化的(带模式的表格)、非结构化的(图像、视频、PDF)或半结构化的(JSON、XML)。数据集通过事务支持版本控制并维护完整历史。

**转换(Transform):** 处理输入数据集以产生输出数据集的代码。转换使用Python、SQL或Java在代码仓库(Code Repositories)中编写,或使用Python或R在代码工作区(Code Workspaces)中编写。Python转换可以在轻量级单节点引擎(Pandas、Polars、DuckDB)或分布式Spark上运行。

**管道构建器(Pipeline Builder):** 一个点击式应用程序,用于在不编写代码的情况下构建数据管道。支持批处理和流式工作流。

**同步(Sync):** 将数据从外部源系统引入Foundry的过程。有几种类型:批量同步(到数据集)、流式同步(到流)、变更数据捕获(CDC)同步(到带有变更日志元数据的流)和媒体同步(到媒体集)。同步可以按计划进行或手动触发。

**连接器(Connector):** 用于连接到外部数据源(数据库、云存储、API、企业系统)的预构建集成。

**监听器(Listener):** 一个端点,使外部系统能够在无法使用标准Foundry身份验证或可配置API负载时将数据推送到Foundry。Foundry支持三种监听器类型:HTTPS监听器(用于webhook,输出到流)、WebSocket监听器(用于与计算模块的实时双向通信)和电子邮件监听器(用于接收发往媒体集的入站电子邮件)。

**增量管道/转换(Incremental pipeline / transform):** 仅处理自上次构建以来发生更改的行或文件的管道或转换,而不是重新处理整个数据集。减少了大规模数据集的延迟和计算成本。

**分支(Branch):** 一种版本控制概念,允许并行开发管道、数据集、本体论(Ontology)和Workshop应用程序。准备就绪后,更改将部署回主分支。在代码仓库(Code Repositories)中,您可以选择两种分支类型:**代码仓库分支(Code Repositories branches)** 可以基于任何分支,并且范围限于单个仓库内的更改;而**全局分支(Global branches)** 必须基于主分支,并且可以包含跨多个Palantir应用程序的更改。Python转换和TypeScript v1仓库支持全局分支。**全局分支(Global Branching)** 提供了一种统一的体验,可以在单个分支上跨多个应用程序进行修改,端到端测试更改而不会中断生产环境,并通过单个操作进行合并。分支工作流包括从`Main`创建分支、进行更改、创建**提案(Proposal)**(类似于拉取请求)以部署更改,以及在部署前审查和批准更改。请注意,并非所有资源类型都支持全局分支:TypeScript v2和Python函数不能在分支上修改(尽管您可以引用特定版本),并且本体论SDK不可分支。

### 本体论(Ontology)术语

**对象(Object):** 对象类型的单个实例,代表现实世界的实体或事件(例如,特定航班“JFK → SFO 2021-02-24”)。

**对象类型(Object Type):** 现实世界实体或事件的模式定义。定义属性、其类型、主键和后备数据集。

**对象集(Object Set):** 对象的集合,通常是过滤或搜索的结果。对象集可以传递给函数、在应用程序中显示或在动作中使用。

**属性(Property):** 现实世界实体或事件特征的模式定义(例如,`employee number`、`start date`、`role`)。属性具有类型(字符串、整数、日期、数组等),并且可以是必需的或可选的。

**主键(Primary Key):** 类型对象的唯一标识符。映射到后备数据集中的列。

**链接类型(Link Type):** 对象类型之间关系的模式定义(例如,员工和公司之间的链接)。指定基数(一对一、一对多、多对多)以及哪些属性充当外键。

**动作类型(Action Type):** 用户一次可以对对象、属性值和链接进行的更改或编辑的定义,包括参数、规则、提交标准和副作用(通知、webhook)。

**动作(Action):** 用户发起的事务,用于修改对象、属性或链接。动作是动作类型的实例。

**接口(Interface):** 描述跨多个对象类型的共享属性的抽象类型。支持多态工作流。

**物化(Materialization):** 一个数据集,它结合了来自输入数据源的数据和用户编辑,以捕获每个对象的最新状态。用于构建下游Foundry管道或启用本体论(Ontology)数据的下载。

### 函数术语

**函数(Function):** 服务器端代码(TypeScript或Python),可以读取本体论(Ontology)数据、执行计算并进行本体论(Ontology)编辑。

**函数支持的动作(Function-backed Action):** 一种动作类型,其逻辑由函数而非声明性规则实现。

**函数支持的列(Function-backed Column):** Workshop对象表中的派生列,其值由函数即时计算。使用运行时输入时,函数仅处理表中当前显示的对象,以获得更快的性能。

**本体论编辑(Ontology Edits):** 由函数执行的对对象、属性和链接的修改(创建对象、更新属性、删除对象、添加/删除链接)。

### 应用程序术语

**Workshop:** 一个低代码应用程序构建器,用于使用拖放小部件创建运营应用程序。Workshop应用程序构建在本体论(Ontology)之上,并使用事件进行交互。

**小部件(Widget):** Workshop中的UI组件(表格、图表、地图、表单、按钮等)。小部件绑定到本体论(Ontology)数据,并可以触发事件。

**事件(Event):** Workshop中由用户交互(例如,按钮选择、行选择)触发的可配置行为。事件可以更新变量、导航到页面或选项卡、打开或关闭覆盖层、打开其他Foundry资源、刷新数据或控制模块外观。

**变量(Variable):** 用于配置数据如何在Workshop模块中移动的带类型值。变量存储各种类型的值(对象集、字符串、数字、布尔值、日期、时间戳、数组、结构体、地理点、地理形状、时间序列),并绑定到小部件输入和输出以实现交互性。

**Slate:** 一个应用程序框架,使应用程序开发者能够使用拖放界面、CSS和JavaScript构建可定制的应用程序。

**OSDK(本体论SDK):** 自动生成的SDK(TypeScript、Python、Java,以及用于其他语言的OpenAPI规范),用于从外部应用程序访问本体论(Ontology)数据并执行动作。

**自定义小部件(Custom Widget):** 有两种方法可以使用自定义功能扩展Workshop:
1.  **OSDK自定义小部件(OSDK Custom Widget):** 使用OSDK构建的React组件,用于扩展Workshop的小部件库,作为原生Workshop小部件部署和注册。
2.  **通过iframe的自定义小部件(Custom Widget via iframe):** 嵌入在Workshop中的外部应用程序,可以使用`@osdk/workshop-iframe-custom-widget` npm包通过Workshop变量和事件进行双向通信,使嵌入式应用程序能够读取和写入Workshop,而无需成为原生小部件。

### AI平台 (AIP) 术语

**AIP:** Palantir的人工智能平台,用于在本体论(Ontology)之上构建AI驱动的工作流、智能体和函数。AIP的架构包含12个关键能力类别:安全的LLM集成和访问、端到端可观测性、上下文工程、本体论(Ontology)系统、向量/计算/工具服务、安全与治理、智能体生命周期管理、运营自动化、开发环境、人+AI应用程序、包/发布/部署工作流以及企业自动化。

**AIP聊天机器人(AIP Chatbot):** 在AIP聊天机器人工作室(AIP Chatbot Studio)(以前称为AIP智能体工作室(AIP Agent Studio))中构建的交互式助手,配备了企业特定的信息和工具(包括本体论(Ontology)数据、文档和自定义函数)。

**AIP逻辑(AIP Logic):** 一个无代码开发环境,用于构建、测试和发布由LLM驱动的函数,这些函数可以返回输出或对本体的进行编辑。

**AIP辅助(AIP Assist):** 平台内的LLM助手,用于导航和理解Foundry。

**AIP可观测性(AIP Observability):** 工作流谱系(Workflow Lineage)中的一组功能,提供对AIP和本体论(Ontology)工作流执行的可见性,包括指标、执行历史、分布式追踪、日志记录和日志搜索。

**检索上下文(Retrieval Context):** 提供给AIP聊天机器人以支撑其响应的文档、对象数据或函数输出。

**兼容LLM提供商的API(LLM-provider compatible APIs):** Foundry为流行的LLM提供商(Anthropic、OpenAI)提供代理端点,这些端点接受与提供商原生API相同格式的请求。这使得可以使用开源SDK和Claude Code等工具,同时受益于Foundry的功能,如速率限制、零数据保留(ZDR)和使用跟踪。可以通过设置带有Foundry令牌和适当基础URL的环境变量,将外部工具配置为通过这些端点路由请求。

**自带模型 (BYOM):** 组织可以通过注册模型将其自己的LLM或模型提供商账户连接到AIP。注册模型可以在AIP应用程序中使用,包括AIP聊天机器人工作室(AIP Chatbot Studio)、AIP逻辑(AIP Logic)、Workshop和TypeScript函数。模型通过控制面板(Control Panel)使用数据连接(Data Connection)中的REST API源进行注册,支持速率限制、权限控制以及通过资源管理(Resource Management)进行使用可观测性。当出于法律或合规原因无法使用Palantir提供的模型,或者需要利用微调或专门的LLM时,建议使用BYOM。

## 数据集成

Foundry中的数据集成提供了一个可扩展的框架,用于连接到源系统、转换数据和维护高质量的管道。

### 管道构建器(Pipeline Builder)

**管道构建器(Pipeline Builder)** 是Foundry用于数据集成的首要应用程序。它提供:
- 用于构建管道的点击式界面
- 数据集健康检查
- 具有模式安全性的类型安全转换
- 用于生成复杂转换的内置LLM辅助
- 支持媒体处理和地理空间数据

工作流:输入 → 转换 → 预览 → 交付 → 输出

管道构建器(Pipeline Builder)可以直接输出到数据集、媒体集、文件和文件集、地理时间序列同步、虚拟表或本体论(Ontology)组件(对象类型、链接类型和时间序列同步)。

### 代码仓库(Code Repositories)

对于复杂的转换逻辑,**代码仓库(Code Repositories)** 提供了一个基于Web的IDE,用于使用Python、Java、SQL或Mesa编写生产就绪的转换。功能包括:
- 基于Git的版本控制,支持分支
- 拉取请求和代码审查
- IntelliSense和错误检查
- 与CI/CD工作流集成

### 转换语言

**Python转换(Python Transforms)**(功能最全面):
- 使用 `@transform.using` 装饰器
- 使用PySpark DataFrame或Pandas/Polars/DuckDB
- 支持增量计算
- 可以通过 `transforms-external-systems` 调用外部API

**SQL转换(SQL Transforms):**
- 声明式SQL语法

**Java转换(Java Transforms):**
- 访问完整的Spark Java API

### 处理模式

**批处理(Batch):** 每次运行时完全重新计算管道中的所有数据集。

**增量处理(Incremental):** 仅处理新增/更改的数据。对于大型、仅追加的数据集更高效。需要谨慎处理模式更改。

**流处理(Streaming):** 使用Flink进行近实时处理。适用于需要低延迟的用例。

### 数据质量

**数据期望(Data Expectations):** 关于数据质量的断言(例如,“列X不应为空”、“值应在范围内”)。如果违反期望,可以阻止构建。

**健康检查(Health Checks):** 监控规则,用于在管道问题、数据新鲜度或质量问题上发出警报。

**数据健康(Data Health):** 一个Foundry应用程序,用于监控平台资源的健康状况,包括数据集、构建、函数、动作和自动化。数据健康(Data Health)提供两个主要功能集:
- **监控视图(Monitoring views):** 使用基于范围的监控规则跨项目、文件夹或单个资源大规模监控资源。
- **健康检查(Health checks):** 对单个资源配置详细检查,包括数据集的内容和模式验证。

警报可以通过Foundry通知、电子邮件摘要或外部系统(如PagerDuty和Slack)传递。

## 本体论(Ontology)

本体论(Ontology)是语义层,将原始数据转换为现实世界的概念,使应用程序和用户能够处理有意义的实体,而不是抽象的表。

### 对象类型(Object Types)

对象类型定义:
- **属性(Properties):** 具有类型的属性(字符串、整数、双精度浮点数、布尔值、日期、时间戳、数组、结构体、地理形状等)
- **主键(Primary Key):** 唯一标识符属性
- **标题(Title):** 充当此类型对象显示名称的属性
- **后备数据源(Backing Datasource(s)):** 用作此类型对象属性值的数据源

当后备数据源更新时,对象通过索引过程自动创建和更新。一行 = 一个对象。

### 链接类型(Link Types)

链接类型定义关系,包括:
- **源和目标对象类型(Source and Target Object Types):** 哪些类型被连接
- **基数(Cardinality):** 一对一、一对多、多对一或多对多
- **键(Key):** 用于创建链接的属性或列(对于一对一/多对一,外键到主键;对于多对多,连接表)
- **对象支持的链接(Object-backed Links):** 使用后备对象类型在关系上添加额外的元数据/属性(扩展多对一链接)

链接支持遍历关系:从订单导航到其客户;从客户导航到其所有订单。

### 接口(Interfaces)

接口提供多态性:
- 定义多个对象类型实现的共享属性
- 支持对任何实现类型进行操作的工作流
- 示例:`Facility` 接口由 `Airport`、`Manufacturing Plant`、`Maintenance Hangar` 实现

### 动作类型(Action Types)

动作类型定义用户可以对对象、属性值和链接进行的一组更改或编辑:
- **参数(Parameters):** 用户提供的输入(对象选择、文本字段、下拉菜单)
- **规则(Rules):** 将参数转换为本体论编辑(创建/修改/删除对象和链接)的逻辑
- **副作用(Side Effects):** 与现有组织流程集成的通知和webhook
- **计划规则(Schedule Rules):** 应用动作时触发计划构建,支持将动作参数传递给参数化转换
- **提交标准(Submission Criteria):** 确定动作是否可以提交的条件,支持业务逻辑和权限。

对于无法用声明性方式表达的复杂逻辑,动作可以是**函数支持的(Function-backed)**。

## 函数(Functions)

函数支持具有一流本体论(Ontology)支持的服务器端业务逻辑。函数可以:
- 查询和聚合对象数据
- 遍历对象之间的链接
- 创建、更新和删除对象(本体论编辑)
- 调用外部API

### 语言

**TypeScript v2:** 在具有OSDK支持的Node.js运行时中运行,可配置资源,支持本体论(Ontology)接口,并通过代理端点集成语言模型。

**TypeScript v1:** 支持v2中不可用的webhook、模型函数和自带模型功能。

**Python:** 通过OSDK支持本体论(Ontology)对象和编辑。是管道构建器(Pipeline Builder)中唯一可用的语言。支持通过代理端点集成语言模型。

**本体论SQL(Ontology SQL):** 使用SQL定义可重用的、参数化的本体论对象查询。本体论SQL函数是只读的,并返回与所选列匹配的结构体列表。可以在SQL工作室(SQL Studio)或对象模式下的SQL控制台(SQL Console)中创建。

### TypeScript v1 示例

```typescript
import { Function } from "@foundry/functions-api";
import { Objects } from "@foundry/ontology-api";

export class FlightFunctions {
    @Function()
    public currentFlightDestinations(airportCode: string): Set<string> {
        const flightsFromAirport = Objects.search()
            .flights()
            .filter(flight => flight.departureAirportCode.exactMatch(airportCode))
            .all();

        const destinations = flightsFromAirport.map(flight => flight.arrivalAirportCode!);

        return new Set(destinations);
    }
}

Python 示例

from functions.api import function, String

@function
def my_function() -> String:
    return "Hello World!"

函数支持的列(Function-backed Columns)

在Workshop对象表中即时计算的派生属性:

@Function()
public flightAlertCalculateUrgency(flightAlerts: ObjectSet<FlightAlert>):
FunctionsMap<FlightAlert, string>{
    const map = new FunctionsMap<FlightAlert, string>();
    flightAlerts.all().forEach(flightAlert => {
        var hoursDelayed = flightAlert.timeOfDelayHours
        if (hoursDelayed! > 4) {
            map.set(flightAlert, "High")
        } else if (hoursDelayed! > 2) {
            map.set(flightAlert, "Medium")
        } else {
            map.set(flightAlert, "Low")
        }
    });
    return map;
}

函数支持的动作(Function-backed Actions)

使用本体论编辑函数实现的动作:

@OntologyEditFunction()
public addPriorityToTitle(ticket: DemoTicket): void {
    let newTitle: string = "[" + ticket.ticketPriority + "]" + ticket.ticketTitle;
    ticket.ticketTitle = newTitle;
}

应用程序

Workshop

Workshop是一个灵活的、面向对象的应用程序构建工具,使构建者能够为运营用户创建交互式应用程序。关键概念:

小部件(Widgets): 显示内容的UI组件,是模块用户界面的核心构建块 - 对象表(Object Table):显示对象集并与之交互 - 对象列表(Object List):用于浏览对象的卡片 - 图表XY(Chart XY):由本体论聚合支持的 Visualization - 内联动作(Inline Action):使用户能够通过动作类型创建、修改或删除对象或链接,支持表单和表格界面 - 地图(Map):地理空间对象可视化 - 按钮组(Button Group):通过样式化按钮触发动作、Workshop事件、URL和导出 - 更多(显示、可视化、过滤、导航和嵌入类别中的60多个小部件)

事件(Events): 基于用户操作触发特定行为 - 行选择 → 更新变量 - 按钮选择 → 执行动作 - 对象选择 → 导航到详细视图

变量(Variables): 配置数据如何在Workshop模块中移动 - 存储对象集、对象集过滤器、原语(字符串、数字、布尔值、日期、时间戳)、数组、结构体、地理点、地理形状和时间序列 - 绑定到小部件输入和输出 - 启用小部件之间的交互性

布局(Layouts): 配置模块用户界面的组织方式(列、行、选项卡、流、工具栏、循环) - 页面、覆盖层(抽屉和模态框)、可折叠部分

常见模式: - 收件箱/任务管理:待分类和处理的项目列表 - 通用操作画面(COP):带有地图和图表的宽屏仪表板 - 详细视图:从列表向下钻取到单个对象 - 表单:捕获用户输入并执行动作

Slate

Slate使应用程序开发者能够使用拖放界面、CSS和JavaScript构建可定制的应用程序: - 拖放小部件定位 - 自定义样式和品牌 - 用于复杂交互的直接JavaScript - 通过API调用访问本体论(Ontology)和函数 - 支持面向公众的应用程序

当您需要采用代码优先的方法,需要完整的HTML、CSS和JavaScript定制、自定义样式和品牌,或构建面向公众的应用程序时,请使用Slate。

OSDK(本体论SDK)

对于完全自定义的应用程序,OSDK生成类型安全的SDK:

TypeScript SDK:

import { createClient } from "@osdk/client";
import { Employee } from "@your-generated-sdk";

const client = createClient(foundryUrl, ontologyRid, auth);
const result = await client(Employee).fetchPage();
const employees = result.data;

Slate 集成:

import { client } from "@slate/osdk";

const driverResponse = await client.ontology.objects.F1Driver.fetchPage({
    pageSize: 10,
});
const driverNames = driverResponse.data.map(
    (driver) => `${driver.forename} ${driver.surname}`
);

OSDK支持: - 带有过滤、排序、分页的对象查询 - 链接遍历 - 动作执行 - 实时订阅 - 自定义Workshop小部件

Pilot

Pilot是一个AI驱动的应用程序构建器,可以根据自然语言提示创建应用程序。您描述要构建的应用程序,Pilot会自动生成本体论实体、设计规范、前端代码和种子数据。使用Pilot构建的应用程序使用OSDK和React,并通过开发者控制台(Developer Console)作为生产级托管应用程序部署。

Pilot使用专门的AI智能体管理完整的应用程序生命周期: - 本体论生成: 创建对象类型、动作类型、链接类型、属性和关系 - 设计规范: 生成调色板、排版、布局和交互模式 - 前端生成: 使用OSDK钩子实现React应用程序,并带有实时预览 - 种子数据生成: 在隔离容器中生成样本数据(AI智能体从不访问真实的企业数据) - 引导式部署: 通过本体论提升、开发者控制台(Developer Console)配置和CI检查进行逐步部署

Pilot使用全局分支(Global Branching)将本体论更改提升到生产环境。

分析应用程序

Quiver: 对本体的对象和时间序列进行点击式分析 - 最适合:本体映射数据、时间序列、可嵌入仪表板 - 功能:链接遍历、时间序列公式语言

Contour: 对数据集(表)进行点击式分析 - 最适合:大型数据集(10万行以上)、非本体数据 - 功能:可视化转换、连接、聚合、仪表板

Insight: 对本体的对象进行点击式分析 - 最适合:使用建模后的本体数据的分析师和调查人员 - 功能:逐步分析路径、链接遍历、聚合、可视化、地图、SQL查询、数据写回 - 与Object Explorer相比:Insight最适合对已知本体数据进行有依据的分析,工作流直观;Object Explorer最适合在未知本体数据中进行发现和搜索

代码工作簿(Code Workbook) [旧版]:基于代码的分析笔记本 - 语言:Python、R、SQL - 功能:可视化、协作、模板复用 - 注意:旧版状态,请考虑其他工具(代码工作区(Code Workspaces)用于探索性分析,代码仓库(Code Repositories)用于生产管道)

Notepad: 面向对象的协作式富文本编辑器 - 嵌入来自其他工具的图表和表格 - 基于模板的报告生成 - 时间点数据快照

Fusion: 电子表格应用程序 - 从电子表格写回数据集 - 熟悉的电子表格体验

Object Explorer: 用于回答关于本体中任何内容的搜索和分析工具 - 基于关键字和属性的搜索 - 对对象集执行批量操作 - 导出功能

AIP 应用程序

AIP聊天机器人工作室(AIP Chatbot Studio)

构建交互式助手(AIP聊天机器人),具有: - 检索上下文(Retrieval Context): 将响应基于本体对象、文档或函数输出 - 工具(Tools): 使聊天机器人能够执行特定操作或检索信息。工具类型包括:动作(执行本体编辑)、对象查询(访问和过滤对象类型)、函数(调用Foundry函数,包括AIP逻辑)、更新应用程序变量、命令(代表用户在Palantir应用程序中触发操作)和请求澄清(暂停等待用户输入)。工具可以在提示工具调用模式(顺序,所有模型)或原生工具调用模式(并行,性能提升,部分模型)下运行。 - 应用程序变量(Application Variables): 配置聊天机器人状态并映射到Workshop变量 - 部署(Deployment): 在AIP线程(AIP Threads)、Workshop、OSDK应用程序中使用,或通过平台API(Platform APIs)进行编程访问,包括会话创建、流式/阻塞消息交换和对话历史检索

智能体层级: 1. 临时(Ad-hoc): 使用AIP线程(AIP Threads)进行快速文档分析 2. 特定任务(Task-specific): 构建具有特定上下文的可重用聊天机器人 3. 智能体应用程序(Agentic Application): 将聊天机器人集成到Workshop或OSDK应用程序中 4. 自动化(Automated): 将聊天机器人作为函数发布,通过AIP自动化(AIP Automate)实现自主工作流

AIP逻辑(AIP Logic)

用于LLM驱动函数的无代码环境: - 可视化基于块的界面 - 使用自然语言进行直观的提示工程 - 查询本体对象以获取上下文 - 基于LLM输出进行本体编辑 - 与自动化(Automate)集成,用于触发或计划执行本体编辑

用例: - 从非结构化文本中提取结构化数据 - 分类和路由传入请求 - 生成摘要和建议

AIP辅助(AIP Assist)

平台内的LLM助手,用于: - 导航Foundry文档 - 理解平台能力 - 为代码和API提供开发者辅助

AIP评估(AIP Evals)

用于评估AIP逻辑函数、聊天机器人函数和代码编写函数的测试环境,专门设计用于处理LLM的非确定性: - 创建包含测试用例的评估套件 - 衡量质量指标 - 使用参数组合运行实验 - 比较模型性能

自动化

自动化(Automate)

自动化(Automate)根据条件触发动作:

条件: - 基于时间:“每周一上午9点” - 基于数据:“当创建高优先级警报时” - 组合:“每周一上午9点,检查新的高优先级警报”

效果: - 动作效果:对对象执行动作(创建、修改、删除) - 函数效果:执行函数以实现自定义计算逻辑(测试版) - 逻辑效果:执行AIP逻辑函数 - 通知效果:发送通知(电子邮件、平台),可带附件 - 回退效果:当主要效果失败时优雅地处理错误

用例: - 计划报告发送和摘要 - 数据警报 - 工作流自动化 - 监视搜索

开发者工具

代码仓库(Code Repositories)

基于Web的IDE,用于: - Python、Java、SQL转换 - TypeScript和Python函数 - Git版本控制 - 拉取请求和代码审查 - CI/CD集成

开发者控制台(Developer Console)

门户,用于: - OSDK生成和管理 - OAuth客户端配置 - 在注册子域或自定义域上托管应用程序 - 应用程序共享和长期令牌 - 用于AI智能体访问的本体MCP配置

REST API

通过Palantir的API对平台资源进行编程访问: - 数据集: 读取、写入和管理数据集,包括分支、事务、文件和视图 - 文件系统: 管理空间、项目、文件夹和资源角色 - 管理: 管理用户、组、组织、主机和标记 - 编排: 触发构建、检查作业和配置计划 - 连接性: 管理连接、虚拟表以及从外部源导入文件或表 - SQL查询: 对数据集执行SQL - 媒体集: 上传、检索和管理媒体集及其项目 - 本体论: 查询和编辑本体数据 - AIP聊天机器人: 编程式聊天机器人交互 - 平台管理: 审计日志、数据健康检查、流、检查点等

VS Code 集成

  • 浏览器中的VS Code工作区
  • 带有Palantir扩展的本地VS Code
  • 用于AI辅助的Continue扩展,带有Foundry上下文

Palantir MCP

模型上下文协议服务器,支持: - 外部AI IDE访问Foundry上下文 - 文档和API发现 - 应用程序构建辅助 - 70多个用于构建和修改本体类型(对象类型、链接类型、动作类型)的工具

Palantir MCP专为本体构建者和开发工作流设计。它可以修改本体类型,但不能写入本体数据。

本体MCP (OMCP)

本体MCP是开发者控制台(Developer Console)的一项功能,它将应用程序本体资源暴露为MCP工具,使外部AI智能体能够与本体数据交互: - 外部AI智能体可以读取对象、执行动作和查询数据 - 通过预定义动作对本体数据进行受控写入 - 通过应用程序限制和权限限制访问 - 使用OAuth 2.0进行身份验证,支持授权码授权(用于基于用户的访问)和客户端凭证授权(用于服务到服务工作流) - 与桌面智能体(Claude.ai、Microsoft Copilot Studio、Gemini Enterprise)和无头智能体框架(Anthropic SDK、Google ADK、Microsoft Agent Framework、OpenAI SDK)集成 - MCP中心(MCP Hub) 提供了一个中心位置,用于发现和管理跨注册配置的所有本体MCP服务器

本体MCP专为本体消费者设计:需要安全地与生产本体数据交互的外部AI智能体。

互操作性

Foundry和AIP旨在与跨多个领域的现有企业系统互操作:

  • 数据互操作性: 基于Apache Iceberg和Apache Parquet等开放数据标准构建,通过REST、JDBC和S3兼容访问进行连接。多模态数据平面(MMDP)通过虚拟表(Virtual Tables)实现与现有数据平台(如Databricks、Snowflake和BigQuery)的集成。

  • 元数据互操作性: 通过平台SDK和API暴露跨项目、数据集、本体元素、模型等的元数据属性,用于与数据目录和治理工具集成。

  • 语义互操作性: 本体论(Ontology)可以通过REST API访问,并与外部语义建模工具集成。Webhook支持与运营系统的集成。

  • 代码和逻辑互操作性: 使用开放语言(Python、Java、SQL)和运行时(Spark、Flink、DataFusion、Polars)。计算模块(Compute Modules)支持引入自定义容器化运行时。

  • 分析互操作性: 开箱即用的Power BI®、Tableau、Jupyter®和RStudio®连接器。代码工作区(Code Workspaces)提供原生的Jupyter®和RStudio®体验。

  • 安全互操作性: 与现有身份验证(SAML)和授权系统(Active Directory)集成。

可观测性

Foundry提供内置工具来监控资源健康状况、在开发和生产中调试问题、跨服务追踪执行以及大规模分析遥测数据。

监控

数据健康(Data Health) 是监控平台资源的主要应用程序。它提供: - 监控视图(Monitoring views): 跨项目、文件夹或单个资源的基于范围的监控规则 - 健康检查(Health checks): 对单个资源的详细验证,包括内容和模式验证

警报可以通过Foundry通知或外部系统(如PagerDuty和Slack)传递。

指标

Foundry提供跨多种资源类型的指标: - 函数、动作和AIP逻辑: 过去30天内的近实时成功/失败计数和P95执行持续时间 - 流和计算模块: 用于监控长时间运行的计算工作负载的指标

调试

工作流谱系(Workflow Lineage) 支持探索平台历史和日志: - 查看七天的执行历史 - 按状态、用户、持续时间或版本过滤 - 搜索所有执行的日志

追踪视图(Trace views) 可视化跨函数、动作和LLM调用的完整请求旅程,显示持续时间、输入、输出和错误。

日志导出

Foundry日志、指标和追踪可以导出到流数据集,以支持自定义仪表板、管道或可观测性工作流。

安全与治理

Foundry安全构建于:

访问控制

  • 项目(Projects): 组织工作和资源的主要安全边界
  • 组织(Organizations): 用户隔离的强制控制
  • 角色(Roles): 自由决定的权限(所有者、编辑者、查看者、发现者)
  • 标记(Markings): 敏感数据(PII、PHI等)的强制控制

数据保护

  • 静态和传输中加密
  • 单点登录和多因素身份验证
  • 全面的审计日志
  • 行级和列级安全

治理

  • 数据谱系追踪
  • 敏感数据扫描
  • 数据保留策略
  • 敏感操作的检查点理由

文档链接

入门

数据集成

本体论

函数

应用程序

AI平台

分析

自动化

可观测性

安全