palantir-hello-world
Create a minimal working Palantir Foundry example querying Ontology objects. Use when starting a new Foundry integration, testing your setup, or learning basic Foundry API and Ontology patterns. Trigger with phrases like "palantir hello world", "palantir example", "palantir quick start", "foundry first query".
What this skill does
# Palantir Hello World
## Overview
Build a minimal working example that connects to Palantir Foundry, queries Ontology objects via the REST API, reads a dataset, and applies an action. Uses real `foundry-platform-sdk` Python API calls.
## Prerequisites
- Completed `palantir-install-auth` setup
- Valid bearer token or OAuth2 credentials
- At least one Ontology with object types configured in your Foundry enrollment
## Instructions
### Step 1: List Available Ontologies
```python
import os
import foundry
client = foundry.FoundryClient(
auth=foundry.UserTokenAuth(
hostname=os.environ["FOUNDRY_HOSTNAME"],
token=os.environ["FOUNDRY_TOKEN"],
),
hostname=os.environ["FOUNDRY_HOSTNAME"],
)
# List all ontologies you have access to
for ont in client.ontologies.Ontology.list():
print(f"Ontology: {ont.api_name} RID: {ont.rid}")
```
### Step 2: Query Ontology Objects
```python
# List objects of type "Employee" from the default ontology
# The object type api_name comes from your Ontology configuration
ONTOLOGY = "your-ontology-api-name"
OBJECT_TYPE = "Employee"
objects = client.ontologies.OntologyObject.list(
ontology=ONTOLOGY,
object_type=OBJECT_TYPE,
page_size=5,
)
for obj in objects.data:
props = obj.properties
print(f" {props.get('fullName', 'N/A')} — {props.get('department', 'N/A')}")
```
### Step 3: Get a Single Object by Primary Key
```python
employee = client.ontologies.OntologyObject.get(
ontology=ONTOLOGY,
object_type=OBJECT_TYPE,
primary_key="EMP-001",
)
print(f"Found: {employee.properties}")
```
### Step 4: Read a Dataset
```python
# Read rows from a Foundry dataset (tabular)
DATASET_RID = "ri.foundry.main.dataset.xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
# Get dataset metadata
dataset = client.datasets.Dataset.get(dataset_rid=DATASET_RID)
print(f"Dataset: {dataset.name}, Path: {dataset.path}")
# Read rows from the dataset (CSV format)
content = client.datasets.Dataset.read(
dataset_rid=DATASET_RID,
branch_id="master",
format="arrow", # or "csv"
)
print(f"Read {len(content)} bytes of data")
```
### Step 5: Apply an Ontology Action
```python
# Actions modify objects — e.g., updating an employee's department
result = client.ontologies.Action.apply(
ontology=ONTOLOGY,
action_type="updateDepartment",
parameters={
"employeeId": "EMP-001",
"newDepartment": "Engineering",
},
)
print(f"Action result: {result.validation}")
```
### Step 6: Run and Verify
```bash
set -euo pipefail
python hello_foundry.py
# Expected output:
# Ontology: my-company RID: ri.ontology.main.ontology.xxx
# Employee: Jane Doe — Engineering
# Action result: VALID
```
## Output
- Authenticated connection to Palantir Foundry
- Listed ontologies and object types
- Retrieved objects with property values
- Read dataset content
- Applied an action to modify an object
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `ObjectTypeNotFound` | Wrong `api_name` | Check Ontology Manager for exact object type names |
| `ObjectNotFound` | Invalid primary key | Verify the key exists; keys are case-sensitive |
| `ActionValidationFailed` | Missing required params | Check action definition for required parameters |
| `DatasetNotFound` | Wrong RID or no access | Verify RID in Foundry UI; check project permissions |
| `401 Unauthorized` | Token expired | Regenerate in Developer Console |
## Examples
### Using the REST API Directly (curl)
```bash
# List objects via REST
curl -s -H "Authorization: Bearer $FOUNDRY_TOKEN" \
"https://$FOUNDRY_HOSTNAME/api/v2/ontologies/my-ontology/objects/Employee?pageSize=5" \
| python -m json.tool
```
### TypeScript OSDK Equivalent
```typescript
import { createClient } from "@osdk/client";
import { Employee } from "@my-app/sdk"; // generated from OSDK
const employees = await client(Employee)
.where({ department: "Engineering" })
.fetchPage({ pageSize: 10 });
employees.data.forEach(emp => console.log(emp.fullName));
```
## Resources
- [Foundry API Introduction](https://www.palantir.com/docs/foundry/api/general/overview/introduction)
- [Get Object API](https://www.palantir.com/docs/foundry/api/ontology-resources/objects/get-object)
- [Python SDK PyPI](https://pypi.org/project/foundry-platform-sdk/)
- [Code Examples](https://www.palantir.com/docs/foundry/code-examples/foundry-apis-local-environment)
## Next Steps
- Set up iterative development: `palantir-local-dev-loop`
- Build data pipelines with transforms: `palantir-core-workflow-a`
- Query and link objects: `palantir-core-workflow-b`
Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.