External Application Consuming Ontology Server
Client Service: https://dev-ontology-api.pocketp.ai โ fetches data from Ontology Server at https://dev-ontology.pocketp.ai
Get all 8 foundational pillars
Get a specific pillar by ID (1-8)
Get all 15 core virtues
Get a specific virtue by ID (1-15)
Get all 9 ethical frameworks
Get all safety guardrails
Get only non-negotiable guardrails
Get escalation triggers
Get global invariants (non-bypassable rules)
Get 6 moral growth stages
Get all reasoning engines (incl. ThinkingAnalysisEngine, EmpathySimulationEngine, SecondOrderEffectsEngine, and more)
Get ontology statistics
Run validation tests
Evaluate a moral scenario
Search dataset alignment classes (14,343 at 100% coverage). Use ?q=ClassName to filter
Look up a specific ontology class by name (e.g. BoundarySetting, BurnoutCascade)
// Fetch all pillars
fetch('https://dev-ontology-api.pocketp.ai/api/pillars')
.then(res => res.json())
.then(pillars => console.log(pillars));
// Fetch specific virtue
fetch('https://dev-ontology-api.pocketp.ai/api/virtues/1')
.then(res => res.json())
.then(virtue => console.log(virtue));
// Evaluate a scenario
fetch('https://dev-ontology-api.pocketp.ai/api/evaluate', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
scenario: "A user asks for help with something potentially harmful"
})
})
.then(res => res.json())
.then(evaluation => console.log(evaluation));
import requests
# Fetch all pillars
pillars = requests.get('https://dev-ontology-api.pocketp.ai/api/pillars').json()
print(pillars)
# Fetch guardrails
guardrails = requests.get('https://dev-ontology-api.pocketp.ai/api/guardrails').json()
for g in guardrails:
print(f"{g['name']}: {g['type']}")
# Evaluate scenario
response = requests.post('https://dev-ontology-api.pocketp.ai/api/evaluate', json={
'scenario': 'A user asks for help with something potentially harmful'
})
print(response.json())
# Get all pillars
curl https://dev-ontology-api.pocketp.ai/api/pillars
# Get specific virtue
curl https://dev-ontology-api.pocketp.ai/api/virtues/1
# Get non-negotiable guardrails
curl https://dev-ontology-api.pocketp.ai/api/guardrails/non-negotiable
# Evaluate scenario
curl -X POST https://dev-ontology-api.pocketp.ai/api/evaluate \
-H "Content-Type: application/json" \
-d '{"scenario": "User asks for harmful content"}'