Loading source
Pulling the file list, source metadata, and syntax-aware rendering for this listing.
Source from repo
A comprehensive collection of Agent Skills for context engineering, multi-agent architectures, and production agent systems.
Files
Skill
Size
Entrypoint
Format
Open file
Syntax-highlighted preview of this file as included in the skill package.
skills/bdi-mental-states/references/rdf-examples.md
1# BDI RDF Examples23Complete RDF/Turtle examples for BDI mental state modeling.45## Complete Cognitive Workflow67```turtle8@prefix bdi: <https://w3id.org/fossr/ontology/bdi/> .9@prefix ex: <http://example.org/> .10@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .11@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .1213# ============================================================14# PHASE 1: World State Perception15# ============================================================1617ex:WorldState_traffic a bdi:WorldState ;18rdfs:comment "Heavy traffic on Route 101" ;19bdi:atTime "2026-01-04T08:30:00"^^xsd:dateTime ;20bdi:isPerceivedBy ex:Agent_commuter ;21bdi:triggers ex:BeliefProcess_assess_traffic .2223# ============================================================24# PHASE 2: Belief Formation25# ============================================================2627ex:BeliefProcess_assess_traffic a bdi:BeliefProcess ;28bdi:generates ex:Belief_traffic_delay ;29bdi:reasonsUpon ex:WorldState_traffic ;30bdi:isProcessedBy ex:Agent_commuter ;31bdi:atTime "2026-01-04T08:31:00"^^xsd:dateTime .3233ex:Belief_traffic_delay a bdi:Belief ;34rdfs:label "Traffic will cause 30-minute delay" ;35bdi:refersTo ex:WorldState_traffic ;36bdi:hasValidity ex:TimeInterval_morning_commute ;37bdi:hasPart ex:Belief_route_congested , ex:Belief_delay_duration ;38bdi:isJustifiedBy ex:Justification_traffic_report ;39bdi:motivates ex:Desire_arrive_on_time .4041ex:Belief_route_congested a bdi:Belief ;42rdfs:comment "Route 101 is congested" .4344ex:Belief_delay_duration a bdi:Belief ;45rdfs:comment "Delay estimated at 30 minutes" .4647ex:Justification_traffic_report a bdi:Justification ;48rdfs:label "Real-time traffic data from navigation system" ;49bdi:justifies ex:Belief_traffic_delay .5051# ============================================================52# PHASE 3: Desire Formation53# ============================================================5455ex:DesireProcess_plan_arrival a bdi:DesireProcess ;56bdi:generates ex:Desire_arrive_on_time ;57bdi:reasonsUpon ex:Belief_traffic_delay ;58bdi:isProcessedBy ex:Agent_commuter .5960ex:Desire_arrive_on_time a bdi:Desire ;61rdfs:label "I desire to arrive at work on time" ;62bdi:isMotivatedBy ex:Belief_traffic_delay ;63bdi:refersTo ex:WorldState_on_time_arrival .6465# ============================================================66# PHASE 4: Intention Commitment67# ============================================================6869ex:IntentionProcess_commit_route a bdi:IntentionProcess ;70bdi:generates ex:Intention_take_alternate_route ;71bdi:reasonsUpon ex:Desire_arrive_on_time ;72bdi:isProcessedBy ex:Agent_commuter .7374ex:Intention_take_alternate_route a bdi:Intention ;75rdfs:label "I will take alternate route via Highway 280" ;76bdi:fulfils ex:Desire_arrive_on_time ;77bdi:isSupportedBy ex:Belief_traffic_delay ;78bdi:specifies ex:Plan_alternate_commute ;79bdi:isJustifiedBy ex:Justification_time_optimization .8081ex:Justification_time_optimization a bdi:Justification ;82rdfs:label "Alternate route saves 20 minutes based on current conditions" ;83bdi:justifies ex:Intention_take_alternate_route .8485# ============================================================86# PHASE 5: Planning87# ============================================================8889ex:Planning_route_selection a bdi:Planning ;90bdi:reasonsUpon ex:Intention_take_alternate_route ;91bdi:defines ex:Plan_alternate_commute ;92bdi:atTime ex:TimeInterval_planning_phase .9394ex:Plan_alternate_commute a bdi:Plan ;95rdfs:label "Alternate commute via Highway 280" ;96bdi:addresses ex:Goal_arrive_by_9am ;97bdi:beginsWith ex:Task_exit_Route101 ;98bdi:endsWith ex:Task_arrive_parking ;99bdi:hasComponent ex:Task_exit_Route101 , ex:Task_merge_280 ,100ex:Task_navigate_280 , ex:Task_arrive_parking .101102ex:Task_exit_Route101 a bdi:Task ;103rdfs:label "Exit Route 101 at Whipple Ave" ;104bdi:precedes ex:Task_merge_280 .105106ex:Task_merge_280 a bdi:Task ;107rdfs:label "Merge onto Highway 280 North" ;108bdi:precedes ex:Task_navigate_280 .109110ex:Task_navigate_280 a bdi:Task ;111rdfs:label "Continue on Highway 280 for 8 miles" ;112bdi:precedes ex:Task_arrive_parking .113114ex:Task_arrive_parking a bdi:Task ;115rdfs:label "Arrive at office parking garage" .116117ex:Goal_arrive_by_9am a bdi:Goal ;118rdfs:label "Arrive at work by 9:00 AM" .119120# ============================================================121# PHASE 6: Plan Execution122# ============================================================123124ex:PlanExecution_commute a bdi:PlanExecution ;125bdi:satisfies ex:Plan_alternate_commute ;126bdi:addresses ex:Goal_arrive_by_9am ;127bdi:isExecutedBy ex:Agent_commuter ;128bdi:hasComponent ex:Action_exit , ex:Action_merge ,129ex:Action_drive_280 , ex:Action_park ;130bdi:atTime ex:TimeInterval_execution ;131bdi:bringsAbout ex:WorldState_arrived_on_time .132133ex:Action_exit a bdi:Action ;134bdi:isExecutionOf ex:Task_exit_Route101 ;135bdi:isPerformedBy ex:Agent_commuter ;136bdi:atTime "2026-01-04T08:35:00"^^xsd:dateTime .137138ex:Action_merge a bdi:Action ;139bdi:isExecutionOf ex:Task_merge_280 ;140bdi:isPerformedBy ex:Agent_commuter ;141bdi:atTime "2026-01-04T08:37:00"^^xsd:dateTime .142143ex:Action_drive_280 a bdi:Action ;144bdi:isExecutionOf ex:Task_navigate_280 ;145bdi:isPerformedBy ex:Agent_commuter ;146bdi:atTime "2026-01-04T08:40:00"^^xsd:dateTime .147148ex:Action_park a bdi:Action ;149bdi:isExecutionOf ex:Task_arrive_parking ;150bdi:isPerformedBy ex:Agent_commuter ;151bdi:bringsAbout ex:WorldState_arrived_on_time ;152bdi:atTime "2026-01-04T08:52:00"^^xsd:dateTime .153154# ============================================================155# PHASE 7: Resulting World State156# ============================================================157158ex:WorldState_arrived_on_time a bdi:WorldState ;159rdfs:comment "Agent arrived at work at 8:52 AM" ;160bdi:atTime "2026-01-04T08:52:00"^^xsd:dateTime .161162# ============================================================163# TEMPORAL INTERVALS164# ============================================================165166ex:TimeInterval_morning_commute a bdi:TimeInterval ;167bdi:hasStartTime "2026-01-04T08:30:00"^^xsd:dateTime ;168bdi:hasEndTime "2026-01-04T09:00:00"^^xsd:dateTime .169170ex:TimeInterval_planning_phase a bdi:TimeInterval ;171bdi:hasStartTime "2026-01-04T08:31:00"^^xsd:dateTime ;172bdi:hasEndTime "2026-01-04T08:34:00"^^xsd:dateTime .173174ex:TimeInterval_execution a bdi:TimeInterval ;175bdi:hasStartTime "2026-01-04T08:35:00"^^xsd:dateTime ;176bdi:hasEndTime "2026-01-04T08:52:00"^^xsd:dateTime .177```178179## Multi-Agent Coordination Example180181```turtle182@prefix bdi: <https://w3id.org/fossr/ontology/bdi/> .183@prefix ex: <http://example.org/> .184@prefix fipa: <http://www.fipa.org/specs/fipa00061/> .185186# Shared belief about project deadline187ex:Agent_developer a bdi:Agent ;188bdi:hasMentalState ex:Belief_deadline_friday .189190ex:Agent_manager a bdi:Agent ;191bdi:hasMentalState ex:Belief_deadline_friday .192193ex:Belief_deadline_friday a bdi:Belief ;194rdfs:label "Project deadline is Friday 5 PM" ;195bdi:refersTo ex:WorldState_deadline ;196bdi:hasValidity ex:TimeInterval_project_week .197198ex:WorldState_deadline a bdi:WorldState ;199rdfs:comment "Project XYZ must be delivered by 2026-01-10T17:00:00" .200201# Agent-specific mental states202ex:Agent_developer203bdi:hasDesire ex:Desire_complete_coding ;204bdi:hasIntention ex:Intention_implement_features .205206ex:Desire_complete_coding a bdi:Desire ;207rdfs:label "Complete feature implementation" ;208bdi:isMotivatedBy ex:Belief_deadline_friday .209210ex:Intention_implement_features a bdi:Intention ;211rdfs:label "Implement features A, B, and C" ;212bdi:fulfils ex:Desire_complete_coding ;213bdi:specifies ex:Plan_development .214215ex:Agent_manager216bdi:hasDesire ex:Desire_ensure_delivery ;217bdi:hasIntention ex:Intention_coordinate_team .218219ex:Desire_ensure_delivery a bdi:Desire ;220rdfs:label "Ensure on-time project delivery" ;221bdi:isMotivatedBy ex:Belief_deadline_friday .222223ex:Intention_coordinate_team a bdi:Intention ;224rdfs:label "Coordinate team activities" ;225bdi:fulfils ex:Desire_ensure_delivery ;226bdi:specifies ex:Plan_project_management .227228# FIPA communication229ex:Message_M1 a fipa:ACLMessage ;230fipa:sender ex:Agent_manager ;231fipa:receiver ex:Agent_developer ;232fipa:content ex:Belief_deadline_friday ;233fipa:performative fipa:inform .234```235236## Conflict Resolution Example237238```turtle239@prefix bdi: <https://w3id.org/fossr/ontology/bdi/> .240@prefix ex: <http://example.org/> .241242# Conflicting location beliefs243ex:Belief_at_home a bdi:Belief ;244bdi:refersTo ex:WorldState_home ;245rdfs:comment "Agent is currently at home" .246247ex:Belief_at_office a bdi:Belief ;248bdi:refersTo ex:WorldState_office ;249rdfs:comment "Agent is at office" .250251# Conflicting intentions252ex:Intention_work_from_home a bdi:Intention ;253bdi:isSupportedBy ex:Belief_at_home ;254rdfs:label "Work from home today" .255256ex:Intention_attend_meeting a bdi:Intention ;257bdi:isSupportedBy ex:Belief_at_office ;258rdfs:label "Attend in-person meeting" .259260# Justification for conflict resolution261ex:Justification_location_conflict a bdi:Justification ;262rdfs:comment "Cannot simultaneously be at home and office" ;263bdi:justifies ex:Intention_resolution .264265# Resolved intention266ex:Intention_resolution a bdi:Intention ;267rdfs:label "Attend meeting via video call from home" ;268bdi:fulfils ex:Desire_meeting_participation ;269bdi:isSupportedBy ex:Belief_at_home ;270bdi:isJustifiedBy ex:Justification_location_conflict .271```272273## T2B2T Payment Processing Example274275```turtle276@prefix bdi: <https://w3id.org/fossr/ontology/bdi/> .277@prefix ex: <http://example.org/> .278@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .279280# PHASE 1: Triples-to-Beliefs (External RDF → Internal Mental State)281282ex:WorldState_notification a bdi:WorldState ;283rdfs:comment "Push notification: Ghadeh requested $250 via Zelle" ;284bdi:atTime "2025-10-27T10:15:00"^^xsd:dateTime ;285bdi:triggers ex:BeliefProcess_BP1 .286287ex:BeliefProcess_BP1 a bdi:BeliefProcess ;288bdi:generates ex:Belief_payment_request ;289bdi:isProcessedBy ex:Agent_A .290291ex:Belief_payment_request a bdi:Belief ;292rdfs:label "Ghadeh requested $250" ;293bdi:refersTo ex:WorldState_notification ;294bdi:motivates ex:Desire_pay_Ghadeh .295296ex:Desire_pay_Ghadeh a bdi:Desire ;297rdfs:label "Pay Ghadeh $250" ;298bdi:isMotivatedBy ex:Belief_payment_request .299300ex:Intention_I1 a bdi:Intention ;301rdfs:label "Pay Ghadeh $250" ;302bdi:fulfils ex:Desire_pay_Ghadeh ;303bdi:specifies ex:Plan_payment .304305# PHASE 2: Beliefs-to-Triples (Mental State → External RDF)306307ex:PlanExecution_PE1 a bdi:PlanExecution ;308bdi:satisfies ex:Plan_payment ;309bdi:bringsAbout ex:WorldState_payment_complete .310311ex:WorldState_payment_complete a bdi:WorldState ;312rdfs:comment "Payment of $250 sent to Ghadeh via Zelle" ;313bdi:atTime "2025-10-27T10:20:00"^^xsd:dateTime .314```315316