bdi-mental-states
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseBDI Mental State Modeling
BDI心智状态建模
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.
使用正式的BDI本体模式将外部RDF上下文转换为Agent心智状态(信念、愿望、意图)。该Skill使Agent能够通过认知架构对上下文进行推理,支持多Agent系统中的审慎推理、可解释性和语义互操作性。
When to Activate
激活时机
Activate this skill when:
- Processing external RDF context into agent beliefs about world states
- Modeling rational agency with perception, deliberation, and action cycles
- Enabling explainability through traceable reasoning chains
- Implementing BDI frameworks (SEMAS, JADE, JADEX)
- Augmenting LLMs with formal cognitive structures (Logic Augmented Generation)
- Coordinating mental states across multi-agent platforms
- Tracking temporal evolution of beliefs, desires, and intentions
- Linking motivational states to action plans
在以下场景激活该Skill:
- 将外部RDF上下文处理为Agent对世界状态的信念
- 为理性智能体建模感知、审慎决策和行动周期
- 通过可追踪的推理链实现可解释性
- 实现BDI框架(SEMAS、JADE、JADEX)
- 用正式认知结构增强LLM(Logic Augmented Generation)
- 在多Agent平台间协同心智状态
- 追踪信念、愿望和意图的时间演化
- 将动机状态与行动计划关联
Core Concepts
核心概念
Mental Reality Architecture
心智现实架构
Mental States (Endurants): Persistent cognitive attributes
- : What the agent believes to be true about the world
Belief - : What the agent wishes to bring about
Desire - : What the agent commits to achieving
Intention
Mental Processes (Perdurants): Events that modify mental states
- : Forming/updating beliefs from perception
BeliefProcess - : Generating desires from beliefs
DesireProcess - : Committing to desires as actionable intentions
IntentionProcess
心智状态(持久实体):持续存在的认知属性
- :Agent认为世界真实存在的事物
Belief - :Agent希望达成的目标
Desire - :Agent承诺要实现的内容
Intention
心智过程(临时实体):修改心智状态的事件
- :通过感知形成/更新信念
BeliefProcess - :从信念生成愿望
DesireProcess - :将愿望转化为可执行的意图并做出承诺
IntentionProcess
Cognitive Chain Pattern
认知链模式
turtle
: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 .turtle
: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 .World State Grounding
世界状态锚定
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 .心智状态引用环境的结构化配置:
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 .Goal-Directed Planning
目标导向规划
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 .意图指定通过任务序列达成目标的计划:
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 .T2B2T Paradigm
T2B2T范式
Triples-to-Beliefs-to-Triples implements bidirectional flow between RDF knowledge graphs and internal mental states:
Phase 1: Triples-to-Beliefs
turtle
undefinedTriples-to-Beliefs-to-Triples实现了RDF知识图谱与内部心智状态之间的双向流转:
阶段1:三元组到信念
turtle
undefinedExternal RDF context triggers belief formation
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: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 .
**阶段2:信念到三元组**
```turtleMental deliberation produces new RDF output
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 .
undefined:Intention_pay a bdi:Intention ;
bdi:specifies :Plan_payment .
:PlanExecution_PE1 a bdi:PlanExecution ;
bdi:satisfies :Plan_payment ;
bdi:bringsAbout :WorldState_payment_complete .
undefinedNotation Selection by Level
按层级选择表示法
| 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 |
| C4层级 | 表示法 | 心智状态表示 |
|---|---|---|
| L1 上下文 | ArchiMate | Agent边界、外部感知源 |
| L2 容器 | ArchiMate | BDI推理引擎、信念存储、计划执行器 |
| L3 组件 | UML | 心智状态管理器、过程处理器 |
| L4 代码 | UML/RDF | 信念/愿望/意图类、本体实例 |
Justification and Explainability
合理性与可解释性
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" .心智实体与支持证据关联,实现可追踪的推理:
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" .Temporal Dimensions
时间维度
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:
sparql
SELECT ?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)
}心智状态在有限时间段内持续存在:
turtle
:Belief_B1 a bdi:Belief ;
bdi:hasValidity :TimeInterval_TI1 .
:TimeInterval_TI1 a bdi:TimeInterval ;
bdi:hasStartTime :TimeInstant_9am ;
bdi:hasEndTime :TimeInstant_11am .查询特定时刻活跃的心智状态:
sparql
SELECT ?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)
}Compositional Mental Entities
组合式心智实体
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 .复杂心智实体可分解为组成部分,支持选择性更新:
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
Update only location component
:BeliefProcess_update a bdi:BeliefProcess ;
bdi:modifies :Belief_meeting_location .
undefined:BeliefProcess_update a bdi:BeliefProcess ;
bdi:modifies :Belief_meeting_location .
undefinedIntegration Patterns
集成模式
Logic Augmented Generation (LAG)
Logic Augmented Generation (LAG)
Augment LLM outputs with ontological constraints:
python
def 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()用本体约束增强LLM输出:
python
def 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()SEMAS Rule Translation
SEMAS规则转换
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)].将BDI本体映射为可执行的产生式规则:
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)].Guidelines
指导原则
-
Model world states as configurations independent of agent perspectives, providing referential substrate for mental states.
-
Distinguish endurants (persistent mental states) from perdurants (temporal mental processes), aligning with DOLCE ontology.
-
Treat goals as descriptions rather than mental states, maintaining separation between cognitive and planning layers.
-
Userelations for meronymic structures enabling selective belief updates.
hasPart -
Associate every mental entity with temporal constructs viaor
atTime.hasValidity -
Use bidirectional property pairs (/
motivates,isMotivatedBy/generates) for flexible querying.isGeneratedBy -
Link mental entities toinstances for explainability and trust.
Justification -
Implement T2B2T through: (1) translate RDF to beliefs, (2) execute BDI reasoning, (3) project mental states back to RDF.
-
Define existential restrictions on mental processes (e.g.,).
BeliefProcess ⊑ ∃generates.Belief -
Reuse established ODPs (EventCore, Situation, TimeIndexedSituation, BasicPlan, Provenance) for interoperability.
-
将世界状态建模为独立于Agent视角的配置,为心智状态提供参考基础。
-
区分持久实体(持续存在的心智状态)与临时实体(随时间变化的心智过程),与DOLCE本体保持一致。
-
将目标视为描述而非心智状态,保持认知层与规划层的分离。
-
使用关系构建部分-整体结构,支持选择性信念更新。
hasPart -
通过或
atTime将每个心智实体与时间结构关联。hasValidity -
使用双向属性对(/
motivates、isMotivatedBy/generates)实现灵活查询。isGeneratedBy -
将心智实体与实例关联,提升可解释性与可信度。
Justification -
通过以下步骤实现T2B2T:(1) 将RDF转换为信念;(2) 执行BDI推理;(3) 将心智状态投影回RDF。
-
为心智过程定义存在性约束(例如)。
BeliefProcess ⊑ ∃generates.Belief -
重用已有的ODP(EventCore、Situation、TimeIndexedSituation、BasicPlan、Provenance)以实现互操作性。
Competency Questions
能力验证问题
Validate implementation against these SPARQL queries:
sparql
undefined通过以下SPARQL查询验证实现效果:
sparql
undefinedCQ1: What beliefs motivated formation of a given desire?
CQ1: 哪些信念推动了特定愿望的形成?
SELECT ?belief WHERE {
:Desire_D1 bdi:isMotivatedBy ?belief .
}
SELECT ?belief WHERE {
:Desire_D1 bdi:isMotivatedBy ?belief .
}
CQ2: Which desire does a particular intention fulfill?
CQ2: 特定意图满足了哪个愿望?
SELECT ?desire WHERE {
:Intention_I1 bdi:fulfils ?desire .
}
SELECT ?desire WHERE {
:Intention_I1 bdi:fulfils ?desire .
}
CQ3: Which mental process generated a belief?
CQ3: 哪个心智过程生成了特定信念?
SELECT ?process WHERE {
?process bdi:generates :Belief_B1 .
}
SELECT ?process WHERE {
?process bdi:generates :Belief_B1 .
}
CQ4: What is the ordered sequence of tasks in a plan?
CQ4: 计划中的任务有哪些有序序列?
SELECT ?task ?nextTask WHERE {
:Plan_P1 bdi:hasComponent ?task .
OPTIONAL { ?task bdi:precedes ?nextTask }
} ORDER BY ?task
undefinedSELECT ?task ?nextTask WHERE {
:Plan_P1 bdi:hasComponent ?task .
OPTIONAL { ?task bdi:precedes ?nextTask }
} ORDER BY ?task
undefinedAnti-Patterns
反模式
-
Conflating mental states with world states: Mental states reference world states, they are not world states themselves.
-
Missing temporal bounds: Every mental state should have validity intervals for diachronic reasoning.
-
Flat belief structures: Use compositional modeling withfor complex beliefs.
hasPart -
Implicit justifications: Always link mental entities to explicit justification instances.
-
Direct intention-to-action mapping: Intentions specify plans which contain tasks; actions execute tasks.
-
混淆心智状态与世界状态:心智状态是对世界状态的引用,而非世界状态本身。
-
缺少时间边界:每个心智状态都应具备有效性区间,以支持历时性推理。
-
扁平信念结构:对复杂信念使用组合式建模,结合关系。
hasPart -
隐含合理性依据:始终将心智实体与明确的实例关联。
Justification -
意图到动作的直接映射:意图指定包含任务的计划,动作负责执行任务。
Integration
集成场景
- RDF Processing: Apply after parsing external RDF context to construct cognitive representations
- Semantic Reasoning: Combine with ontology reasoning to infer implicit mental state relationships
- Multi-Agent Communication: Integrate with FIPA ACL for cross-platform belief sharing
- Temporal Context: Coordinate with temporal reasoning for mental state evolution
- Explainable AI: Feed into explanation systems tracing perception through deliberation to action
- Neuro-Symbolic AI: Apply in LAG pipelines to constrain LLM outputs with cognitive structures
- RDF处理:解析外部RDF上下文后应用,以构建认知表示
- 语义推理:与本体推理结合,推导出隐含的心智状态关系
- 多Agent通信:与FIPA ACL集成,实现跨平台信念共享
- 时间上下文:与时间推理协同,处理心智状态的演化
- 可解释AI:为解释系统提供数据,追踪从感知到审慎决策再到动作的完整流程
- 神经符号AI:在LAG流水线中应用,用认知结构约束LLM输出
References
参考资料
See folder for detailed documentation:
references/- - Core ontology patterns and class definitions
bdi-ontology-core.md - - Complete RDF/Turtle examples
rdf-examples.md - - Full competency question SPARQL queries
sparql-competency.md - - SEMAS, JADE, LAG integration patterns
framework-integration.md
Primary sources:
- Zuppiroli et al. "The Belief-Desire-Intention Ontology" (2025)
- Rao & Georgeff "BDI agents: From theory to practice" (1995)
- Bratman "Intention, plans, and practical reason" (1987)
详见文件夹中的详细文档:
references/- - 核心本体模式与类定义
bdi-ontology-core.md - - 完整的RDF/Turtle示例
rdf-examples.md - - 完整的能力验证问题SPARQL查询
sparql-competency.md - - SEMAS、JADE、LAG集成模式
framework-integration.md
主要来源:
- Zuppiroli等人《The Belief-Desire-Intention Ontology》(2025)
- Rao & Georgeff《BDI agents: From theory to practice》(1995)
- Bratman《Intention, plans, and practical reason》(1987)