A local-first Palantir Foundry emulator for development and testing.
OpenFoundry is a fully functional, local emulator of the Palantir Foundry platform. It implements real Foundry-compatible API endpoints backed by in-memory storage, letting you develop, test, and demo Foundry-based applications without access to a live Foundry stack.
It runs 10 backend services + a Vite-powered frontend console, seeds a realistic pest control ontology with 47 objects, and starts with a single command.
Storage note: With
DATABASE_URLset (see.env.example), services store data in PostgreSQL;start.shbrings up thepostgrescontainer fromdocker-compose.ymlwhen Docker is available. Without it, data is held in memory and persisted to/tmp/openfoundry-data/, and restarting services re-seeds from scratch unless those data files exist.
# 1. Clone the repository
git clone https://github.com/openfoundry/openfoundry.git
cd openfoundry
# 2. Install dependencies
pnpm install
# 3. Start everything (backend services + seed data + frontend)
bash start.sh
# Console: http://localhost:3000
# Gateway: http://localhost:8080
# Login: admin / admin123That's it. Docker and PostgreSQL are optional: if Docker is running, start.sh starts the postgres container for persistence; otherwise everything runs in-process with in-memory storage. Redis is never required.
To re-seed data from scratch:
bash start.sh --reseedRun the entire platform in a single Docker container -- no Node.js or pnpm install required on your machine.
# Build and start (first run takes a few minutes to install deps)
docker compose up --build
# Then open http://localhost:3000
# Login: admin / admin123To pass API keys for real LLM integration in AIP Chat:
# Copy the example and fill in your keys
cp .env.example .env
# Edit .env to set ANTHROPIC_API_KEY or OPENAI_API_KEY
# Docker Compose automatically reads .env
docker compose up --buildTo stop:
docker compose downData is persisted in a Docker volume (openfoundry-data). To reset and re-seed:
docker compose down -v
docker compose up --build| Category | What Works |
|---|---|
| Backend Services | 10 services running (gateway, ontology, objects, actions, multipass, datasets, admin, functions, aip, sentinel) |
| Pest Control Ontology | 47 objects across 7 types (PestControlOrder, TechnicianAssignment, Customer, etc.) |
| SearchJsonQueryV2 | 13 filter operators (eq, gt, lt, gte, lte, isNull, contains, startsWith, and, or, not, prefix, anyTerm) |
| ObjectSet loadObjects | 7 ObjectSet types (base, filter, union, intersect, subtract, searchAround, staticSet) |
| Aggregations | 6 metrics (min, max, avg, sum, count, approximateDistinct) |
| Authentication | OAuth2 PKCE + client_credentials flows; JWT tokens |
| Business Actions | 4 action types with real side effects (create, modify, delete objects) |
| Linked Objects | 8 link types with linked object navigation via searchAround |
| AIP Chat | Multi-turn chat with smart mock LLM that understands the ontology |
| Workshop | Operational dashboard with live object counts and status |
| Compass | Resource tree browser (spaces, projects, folders) |
| Pipeline Builder | 5 pre-built pipelines with DAG visualization |
| Datasets | 5 seeded datasets with branch and file management |
| Functions | 3 seeded TypeScript functions with execute endpoint |
+------------------+
| app-console | Vite frontend
| :3000 |
+--------+---------+
|
+--------+---------+
| svc-gateway | API gateway / routing
| :8080 |
+--------+---------+
|
+----------+---------+----+----+---------+----------+
| | | | | |
+-----+--+ +----+---+ +---+----+ +--+-----+ +-+------+ +-+--------+
|multipass| |ontology| |objects | |actions | |datasets| | admin |
| :8084 | | :8081 | | :8082 | | :8083 | | :8085 | | :8087 |
+---------+ +--------+ +--------+ +--------+ +--------+ +----------+
| | |
+------+-----+ +------+-----+ +------+-----+
| functions | | sentinel | | aip |
| :8088 | | :8091 | | :8092 |
+------------+ +------------+ +------------+
Services use PostgreSQL when DATABASE_URL is set, in-memory storage otherwise
| Service | Port | Description |
|---|---|---|
svc-gateway |
8080 | API gateway -- routes requests, handles auth |
svc-ontology |
8081 | Ontology CRUD -- object types, link types, action types |
svc-objects |
8082 | Object storage -- CRUD, ObjectSet queries, aggregations |
svc-actions |
8083 | Action execution -- validation, side effects |
svc-multipass |
8084 | Authentication -- users, groups, tokens, OAuth2 |
svc-datasets |
8085 | Dataset management -- files, schemas, branches |
svc-admin |
8087 | Platform admin -- configuration, user management |
svc-functions |
8088 | Functions -- user-defined TypeScript functions |
svc-sentinel |
8091 | Monitors -- scheduler, data fetcher, email digest effects |
svc-aip |
8092 | AI Platform -- mock LLM chat, embeddings |
Services not currently started by
start.sh: svc-compass (:8086), svc-webhooks (:8089), svc-media (:8090). These exist in the codebase but are not wired into the startup script.
All endpoints are served through the gateway at http://localhost:8080.
Most follow Palantir's /api/v2 prefix convention; a subset of the ontology, object, action and dataset
operations is also served under Palantir's older /api/v1 prefix, listed at the end of this section.
GET /api/v2/ontologies List ontologies
GET /api/v2/ontologies/:rid Get ontology
GET /api/v2/ontologies/:rid/objectTypes List object types
GET /api/v2/ontologies/:rid/objectTypes/:apiName Get object type
GET /api/v2/ontologies/:rid/objects/:type List objects
GET /api/v2/ontologies/:rid/objects/:type/:pk Get object
POST /api/v2/ontologies/:rid/objectSets/loadObjects Query via ObjectSet
POST /api/v2/ontologies/:rid/objectSets/aggregate Aggregate objects
GET /api/v2/ontologies/:rid/objects/:type/:pk/links/:linkType
List linked objects
GET /api/v2/ontologies/:rid/actionTypes List action types
POST /api/v2/ontologies/:rid/actions/:action/apply Apply action
POST /api/v2/ontologies/:rid/actions/:action/validate Validate action
GET /api/v2/datasets List datasets
GET /api/v2/datasets/:rid Get dataset
GET /api/v2/datasets/:rid/branches List branches
GET /api/v2/functions List functions
POST /api/v2/functions/:apiName/execute Execute function
GET /api/v2/compass/resources List root resources
GET /api/v2/compass/resources/:rid/children List children
POST /api/v2/aip/chat Multi-turn chat
GET /api/v2/aip/agents List agents
/api/v1 is a separate API, not the same one behind another prefix: it serves Foundry's v1 models,
which differ from v2 in shape (ObjectType.primaryKey is a list, an object nests its values under
properties, a branch is keyed branchId), so responses are not interchangeable between the two.
GET /api/v1/ontologies List ontologies (unpaginated)
GET /api/v1/ontologies/:rid Get ontology
GET /api/v1/ontologies/:rid/objectTypes List object types
GET /api/v1/ontologies/:rid/objectTypes/:type Get object type
GET /api/v1/ontologies/:rid/objectTypes/:type/outgoingLinkTypes
List outgoing link types
GET /api/v1/ontologies/:rid/actionTypes List action types
GET /api/v1/ontologies/:rid/actionTypes/:apiName Get action type
GET /api/v1/ontologies/:rid/queryTypes List query types
GET /api/v1/ontologies/:rid/objects/:type List objects
GET /api/v1/ontologies/:rid/objects/:type/:pk Get object
GET /api/v1/ontologies/:rid/objects/:type/:pk/links/:linkType
List linked objects
POST /api/v1/ontologies/:rid/objects/:type/search Search objects
POST /api/v1/ontologies/:rid/objects/:type/aggregate Aggregate objects
POST /api/v1/ontologies/:rid/actions/:action/apply Apply action
POST /api/v1/ontologies/:rid/actions/:action/applyBatch Apply action in batch
POST /api/v1/ontologies/:rid/actions/:action/validate Validate action
POST /api/v1/datasets Create dataset
GET /api/v1/datasets/:rid Get dataset
GET /api/v1/datasets/:rid/branches List branches
POST /api/v1/datasets/:rid/branches Create branch
GET /api/v1/datasets/:rid/branches/:branchId Get branch
DELETE /api/v1/datasets/:rid/branches/:branchId Delete branch
POST /api/v1/datasets/:rid/transactions Create transaction
POST /api/v1/datasets/:rid/transactions/:txRid/commit Commit transaction
POST /api/v1/datasets/:rid/transactions/:txRid/abort Abort transaction
GET /api/v1/datasets/:rid/files List files
GET /api/v1/datasets/:rid/files/* Get file metadata
DELETE /api/v1/datasets/:rid/files/* Delete file
Operations v1 declares that OpenFoundry does not serve -- the file upload and the whole
attachments namespace -- answer 404 rather than a wrong shape; the source records why where each
would have gone.
POST /api/v2/auth/token Get access token (OAuth2)
GET /api/v2/auth/me Get current user
POST /multipass/api/oauth2/token OAuth2 token endpoint
GET /multipass/api/oauth2/authorize OAuth2 PKCE authorize
| Username | Password | Role |
|---|---|---|
admin |
admin123 |
Administrator |
openfoundry/
+-- apps/
| +-- app-console/ Vite frontend console
| +-- app-docs/ Documentation site
| +-- app-workshop/ Low-code page builder
+-- conjure/ Conjure YAML service definitions
+-- db/ Database schemas (not used at runtime)
+-- deploy/ Docker and Helm deployment configs
+-- packages/ Shared libraries (28 packages)
+-- scripts/ Build, migration, and seed scripts
+-- services/ Microservices (13 defined, 10 active)
+-- tests/ Integration and end-to-end tests
+-- start.sh One-command startup script
+-- turbo.json Turborepo pipeline config
+-- pnpm-workspace.yaml pnpm workspace definition
Screenshots coming soon. Start the platform with
bash start.shand visit http://localhost:3000 to see the console.
# Start everything
bash start.sh
# Build all packages and services
pnpm build
# Run unit tests
pnpm test
# Lint all packages
pnpm lint
# Type-check all packages
pnpm typecheck- Node.js >= 20.0.0
- pnpm >= 10.27.0
- Docker (optional) -- only for the PostgreSQL container that makes data survive a restart
We welcome contributions of all kinds.
- Fork the repository and create a feature branch.
- Install dependencies with
pnpm install. - Make your changes -- add tests for new functionality.
- Run checks:
pnpm build && pnpm test && pnpm lint && pnpm typecheck. - Submit a pull request with a clear description of the change.
Licensed under the Apache License 2.0.
Copyright 2024 OpenFoundry Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.