palantir-core-workflow-b
Work with Palantir Foundry Ontology objects, actions, and queries via SDK. Use when querying objects, applying actions, linking objects, or building Ontology-driven applications. Trigger with phrases like "palantir ontology", "foundry objects", "palantir actions", "ontology query", "OSDK objects".
What this skill does
# Palantir Core Workflow B — Ontology Objects & Actions
## Overview
Query, filter, and mutate Ontology objects using the Foundry Platform SDK and OSDK. Covers listing objects with property filters, following links between object types, applying actions, and aggregating object data. This is the primary workflow for Ontology-driven applications.
## Prerequisites
- Completed `palantir-install-auth` setup
- An Ontology with configured object types, link types, and actions
- Familiarity with `palantir-core-workflow-a` (data pipelines feed the Ontology)
## Instructions
### Step 1: List and Filter Objects (REST API)
```python
import os, foundry
client = foundry.FoundryClient(
auth=foundry.UserTokenAuth(
hostname=os.environ["FOUNDRY_HOSTNAME"],
token=os.environ["FOUNDRY_TOKEN"],
),
hostname=os.environ["FOUNDRY_HOSTNAME"],
)
ONTOLOGY = "my-company"
# List employees in Engineering, sorted by hire date
result = client.ontologies.OntologyObject.list(
ontology=ONTOLOGY,
object_type="Employee",
page_size=20,
order_by="hireDate:asc",
properties={"department": "Engineering"},
)
for obj in result.data:
p = obj.properties
print(f"{p['fullName']} | {p['department']} | hired {p['hireDate']}")
```
### Step 2: Search Objects with Filters
```python
# Search with complex filters using the search endpoint
search_result = client.ontologies.OntologyObject.search(
ontology=ONTOLOGY,
object_type="Employee",
where={
"type": "and",
"value": [
{"type": "eq", "field": "department", "value": "Engineering"},
{"type": "gte", "field": "salary", "value": 100000},
],
},
page_size=50,
)
print(f"Found {len(search_result.data)} matching employees")
```
### Step 3: Follow Links Between Objects
```python
# Get all projects linked to an employee
employee_rid = "ri.ontology.main.object.employee-001"
linked_projects = client.ontologies.OntologyObject.list_linked_objects(
ontology=ONTOLOGY,
object_type="Employee",
primary_key="EMP-001",
link_type="assignedProjects",
)
for project in linked_projects.data:
print(f" Project: {project.properties['name']} — {project.properties['status']}")
```
### Step 4: Apply Actions to Modify Objects
```python
# Promote an employee — triggers validation rules defined in Ontology
result = client.ontologies.Action.apply(
ontology=ONTOLOGY,
action_type="promoteEmployee",
parameters={
"employeeId": "EMP-001",
"newTitle": "Senior Engineer",
"newSalary": 150000,
"effectiveDate": "2026-04-01",
},
)
print(f"Validation: {result.validation}") # VALID or INVALID with reasons
```
### Step 5: Aggregate Object Data
```python
# Aggregate salary by department
aggregation = client.ontologies.OntologyObject.aggregate(
ontology=ONTOLOGY,
object_type="Employee",
aggregation=[
{"type": "avg", "name": "avgSalary", "field": "salary"},
{"type": "count", "name": "headcount"},
],
group_by=[{"field": "department", "type": "exact"}],
)
for bucket in aggregation.data:
grp = bucket.group
vals = bucket.metrics
print(f"{grp['department']}: {vals['headcount']} people, avg ${vals['avgSalary']:,.0f}")
```
### Step 6: TypeScript OSDK (Generated SDK)
```typescript
import { createClient } from "@osdk/client";
import { Employee } from "@my-app/sdk"; // generated types
// Type-safe queries with auto-completion
const engineers = await client(Employee)
.where({ department: { $eq: "Engineering" } })
.orderBy(e => e.hireDate.asc())
.fetchPage({ pageSize: 20 });
for (const emp of engineers.data) {
console.log(`${emp.fullName} — ${emp.title}`);
}
// Apply action with type-safe parameters
await client(Employee).applyAction("promoteEmployee", {
employeeId: "EMP-001",
newTitle: "Senior Engineer",
});
```
## Output
- Filtered and sorted Ontology object queries
- Cross-object navigation via link types
- Action application with validation feedback
- Server-side aggregations grouped by properties
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| `ObjectTypeNotFound` | Wrong api_name | Check Ontology Manager for exact type names |
| `PropertyNotFound` | Wrong property name | Properties are camelCase in API, may differ from UI |
| `ActionValidationFailed` | Business rule violation | Read `result.validation.messages` for details |
| `LinkTypeNotFound` | Invalid link type name | Verify link type in Ontology Manager |
| `PermissionDenied` | Missing Ontology scope | Add `api:ontology-read` scope to your app |
## Examples
### Batch Action Application
```python
employee_ids = ["EMP-001", "EMP-002", "EMP-003"]
for eid in employee_ids:
result = client.ontologies.Action.apply(
ontology=ONTOLOGY,
action_type="markReviewed",
parameters={"employeeId": eid, "reviewDate": "2026-03-22"},
)
status = "OK" if result.validation == "VALID" else "FAILED"
print(f" {eid}: {status}")
```
## Resources
- [Ontology SDK Overview](https://www.palantir.com/docs/foundry/ontology-sdk/overview)
- [Get Object API](https://www.palantir.com/docs/foundry/api/ontology-resources/objects/get-object)
- [Python OSDK Guide](https://www.palantir.com/docs/foundry/ontology-sdk/python-osdk)
- [Actions API](https://www.palantir.com/docs/foundry/api/ontology-resources/actions/)
## Next Steps
- Handle errors systematically: `palantir-common-errors`
- Optimize query performance: `palantir-performance-tuning`
- Secure object access with RBAC: `palantir-enterprise-rbac`
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.