Install any skill in seconds. Free to start, no credit card required.
Get Started Free →This skill should be used when the user asks to "model agent mental states", "implement BDI architecture", "create belief-desire-intention models", "transform RDF to beliefs", "build cognitive agent", or mentions BDI ontology, mental state modeling, rational agency, or neuro-symbolic AI integration.
.claude/skills/sickn33-bdi-mental-states/SKILL.md| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 17% | 0% |
| case-03 | ✗→✓ | ▲ Improved | 43% | 0% |
| case-12 | ✗→✓ | ▲ Improved | 51% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 50% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 53% | 0% |
Transform external RDF context into agent mental states (beliefs, desires, intentions) using formal BDI ontology patterns. This skill enables agents to reason about context through cognitive architecture, supporting deliberative reasoning, explainability, and semantic interoperability within multi-agent systems.
Activate this skill when:
Mental States (Endurants): Persistent cognitive attributes
Belief: What the agent believes to be true about the worldDesire: What the agent wishes to bring aboutIntention: What the agent commits to achievingMental Processes (Perdurants): Events that modify mental states
BeliefProcess: Forming/updating beliefs from perceptionDesireProcess: Generating desires from beliefsIntentionProcess: Committing to desires as actionable intentionsturtle:Belief_store_open a bdi:Belief ; rdfs:comment "Store is open" ; bdi:motivates :Desire_buy_groceries . :Desire_buy_groceries a bdi:Desire ; rdfs:comment "I desire to buy groceries" ; bdi:isMotivatedBy :Belief_store_open . :Intention_go_shopping a bdi:Intention ; rdfs:comment "I will buy groceries" ; bdi:fulfils :Desire_buy_groceries ; bdi:isSupportedBy :Belief_store_open ; bdi:specifies :Plan_shopping .
Mental states reference structured configurations of the environment:
turtle:Agent_A a bdi:Agent ; bdi:perceives :WorldState_WS1 ; bdi:hasMentalState :Belief_B1 . :WorldState_WS1 a bdi:WorldState ; rdfs:comment "Meeting scheduled at 10am in Room 5" ; bdi:atTime :TimeInstant_10am . :Belief_B1 a bdi:Belief ; bdi:refersTo :WorldState_WS1 .
Intentions specify plans that address goals through task sequences:
turtle:Intention_I1 bdi:specifies :Plan_P1 . :Plan_P1 a bdi:Plan ; bdi:addresses :Goal_G1 ; bdi:beginsWith :Task_T1 ; bdi:endsWith :Task_T3 . :Task_T1 bdi:precedes :Task_T2 . :Task_T2 bdi:precedes :Task_T3 .
Triples-to-Beliefs-to-Triples implements bidirectional flow between RDF knowledge graphs and internal mental states:
Phase 1: Triples-to-Beliefs
turtle# External RDF context triggers belief formation :WorldState_notification a bdi:WorldState ; rdfs:comment "Push notification: Payment request $250" ; bdi:triggers :BeliefProcess_BP1 . :BeliefProcess_BP1 a bdi:BeliefProcess ; bdi:generates :Belief_payment_request .
Phase 2: Beliefs-to-Triples
turtle# Mental deliberation produces new RDF output :Intention_pay a bdi:Intention ; bdi:specifies :Plan_payment . :PlanExecution_PE1 a bdi:PlanExecution ; bdi:satisfies :Plan_payment ; bdi:bringsAbout :WorldState_payment_complete .
| C4 Level | Notation | Mental State Representation | |----------|----------|----------------------------| | L1 Context | ArchiMate | Agent boundaries, external perception sources | | L2 Container | ArchiMate | BDI reasoning engine, belief store, plan executor | | L3 Component | UML | Mental state managers, process handlers | | L4 Code | UML/RDF | Belief/Desire/Intention classes, ontology instances |
Mental entities link to supporting evidence for traceable reasoning:
turtle:Belief_B1 a bdi:Belief ; bdi:isJustifiedBy :Justification_J1 . :Justification_J1 a bdi:Justification ; rdfs:comment "Official announcement received via email" . :Intention_I1 a bdi:Intention ; bdi:isJustifiedBy :Justification_J2 . :Justification_J2 a bdi:Justification ; rdfs:comment "Location precondition satisfied" .
Mental states persist over bounded time periods:
turtle:Belief_B1 a bdi:Belief ; bdi:hasValidity :TimeInterval_TI1 . :TimeInterval_TI1 a bdi:TimeInterval ; bdi:hasStartTime :TimeInstant_9am ; bdi:hasEndTime :TimeInstant_11am .
Query mental states active at specific moments:
sparqlSELECT ?mentalState WHERE { ?mentalState bdi:hasValidity ?interval . ?interval bdi:hasStartTime ?start ; bdi:hasEndTime ?end . FILTER(?start <= "2025-01-04T10:00:00"^^xsd:dateTime && ?end >= "2025-01-04T10:00:00"^^xsd:dateTime) }
Complex mental entities decompose into constituent parts for selective updates:
turtle:Belief_meeting a bdi:Belief ; rdfs:comment "Meeting at 10am in Room 5" ; bdi:hasPart :Belief_meeting_time , :Belief_meeting_location . # Update only location component :BeliefProcess_update a bdi:BeliefProcess ; bdi:modifies :Belief_meeting_location .
Augment LLM outputs with ontological constraints:
pythondef augment_llm_with_bdi_ontology(prompt, ontology_graph): ontology_context = serialize_ontology(ontology_graph, format='turtle') augmented_prompt = f"{ontology_context}\n\n{prompt}" response = llm.generate(augmented_prompt) triples = extract_rdf_triples(response) is_consistent = validate_triples(triples, ontology_graph) return triples if is_consistent else retry_with_feedback()
Map BDI ontology to executable production rules:
prolog% Belief triggers desire formation [HEAD: belief(agent_a, store_open)] / [CONDITIONALS: time(weekday_afternoon)] » [TAIL: generate_desire(agent_a, buy_groceries)]. % Desire triggers intention commitment [HEAD: desire(agent_a, buy_groceries)] / [CONDITIONALS: belief(agent_a, has_shopping_list)] » [TAIL: commit_intention(agent_a, buy_groceries)].
hasPart relations for meronymic structures enabling selective belief updates.atTime or hasValidity.motivates/isMotivatedBy, generates/isGeneratedBy) for flexible querying.Justification instances for explainability and trust.BeliefProcess ⊑ ∃generates.Belief).Validate implementation against these SPARQL queries:
sparql# CQ1: What beliefs motivated formation of a given desire? SELECT ?belief WHERE { :Desire_D1 bdi:isMotivatedBy ?belief . } # CQ2: Which desire does a particular intention fulfill? SELECT ?desire WHERE { :Intention_I1 bdi:fulfils ?desire . } # CQ3: Which mental process generated a belief? SELECT ?process WHERE { ?process bdi:generates :Belief_B1 . } # CQ4: What is the ordered sequence of tasks in a plan? SELECT ?task ?nextTask WHERE { :Plan_P1 bdi:hasComponent ?task . OPTIONAL { ?task bdi:precedes ?nextTask } } ORDER BY ?task
hasPart for complex beliefs.See references/ folder for detailed documentation:
bdi-ontology-core.md - Core ontology patterns and class definitionsrdf-examples.md - Complete RDF/Turtle examplessparql-competency.md - Full competency question SPARQL queriesframework-integration.md - SEMAS, JADE, LAG integration patternsPrimary sources:
| Case | Status | Duration (ms) | Turns | Tokens | Tool calls | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Without | With | Δ | Without | With | Δ | Without | With | Δ | Without | With | Δ | ||
case-01 | fail→pass | 24,626 | 17,704 | -28% | 1 | 1 | 0% | 6,226 | 7,303 | +17% | 0 | 0 | — |
case-02 | fail→fail | 17,698 | 16,486 | -7% | 1 | 1 | 0% | 3,673 | 6,401 | +74% | 0 | 0 | — |
case-03 | fail→pass | 18,067 | 12,445 | -31% | 1 | 1 | 0% | 4,353 | 6,218 | +43% | 0 | 0 | — |
case-04 | pass→pass | 28,700 | 27,060 | -6% | 1 | 1 | 0% | 5,009 | 7,365 | +47% | 0 | 0 | — |
case-05 | pass→fail | 17,660 | 15,119 | -14% | 1 | 1 | 0% | 3,639 | 5,774 | +59% | 0 | 0 | — |
case-06 | pass→pass | 19,535 | 15,421 | -21% | 1 | 1 | 0% | 3,668 | 5,950 | +62% | 0 | 0 | — |
case-12 | fail→pass | 15,481 | 11,271 | -27% | 1 | 1 | 0% | 3,311 | 5,005 | +51% | 0 | 0 | — |
case-07 | pass→pass | 12,228 | 4,428 | -64% | 1 | 1 | 0% | 2,638 | 3,658 | +39% | 0 | 0 | — |
case-08 | fail→pass | 12,660 | 4,626 | -63% | 1 | 1 | 0% | 2,433 | 3,647 | +50% | 0 | 0 | — |
case-09 | fail→pass | 16,144 | 16,169 | +0% | 1 | 1 | 0% | 3,373 | 5,161 | +53% | 0 | 0 | — |
case-10 | fail→pass | 9,986 | 7,601 | -24% | 1 | 1 | 0% | 1,918 | 4,466 | +133% | 0 | 0 | — |
case-11 | fail→pass | 12,067 | 5,841 | -52% | 1 | 1 | 0% | 2,631 | 3,911 | +49% | 0 | 0 | — |
case-13 | fail→pass | 7,843 | 4,008 | -49% | 1 | 1 | 0% | 1,592 | 3,476 | +118% | 0 | 0 | — |
case-14 | pass→pass | 18,431 | 14,173 | -23% | 1 | 1 | 0% | 3,880 | 5,882 | +52% | 0 | 0 | — |
case-15 | fail→pass | 5,688 | 4,207 | -26% | 1 | 1 | 0% | 1,210 | 3,507 | +190% | 0 | 0 | — |
case-16 | fail→pass | 6,095 | 2,512 | -59% | 1 | 1 | 0% | 1,247 | 3,114 | +150% | 0 | 0 | — |
case-17 | fail→pass | 6,456 | 2,304 | -64% | 1 | 1 | 0% | 1,210 | 3,081 | +155% | 0 | 0 | — |
case-18 | fail→pass | 14,129 | 9,213 | -35% | 1 | 1 | 0% | 2,973 | 4,995 | +68% | 0 | 0 | — |
case-19 | fail→pass | 16,664 | 9,822 | -41% | 1 | 1 | 0% | 3,453 | 4,899 | +42% | 0 | 0 | — |
case-20 | fail→pass | 16,591 | 11,503 | -31% | 1 | 1 | 0% | 3,722 | 5,274 | +42% | 0 | 0 | — |
case-21 | fail→pass | 18,174 | 11,571 | -36% | 1 | 1 | 0% | 3,828 | 5,435 | +42% | 0 | 0 | — |
case-22 | fail→pass | 8,340 | 6,609 | -21% | 1 | 1 | 0% | 1,865 | 4,128 | +121% | 0 | 0 | — |
DecimalAI ran this skill against gemini-3.6-flash twice over the same eval suite — once with the skill loaded and once without — and compared the two runs case by case. 22 cases were attempted. The headline lift of +68 percentage points is the difference between those two pass rates over the 22 comparable cases. 1 case got worse with the skill loaded, and it is included in that figure.
Without the skill loaded, the model failed this case. With it loaded, the same prompt on the same model passed. This is one improved case from the latest verified run; every case, including any that regressed, is in the table above.
Other measured skills in the registry, with their headline benchmark lift.