Token导航 LogoToken导航TokenDH.com
AI 工具只读github未标认证来源可访问clear审计提醒

bdi-mental-statesBDI 精神状态

Agent Skill

bdi-mental-states 用于处理 GitHub 仓库、Issue、Pull Request 和代码协作信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要围绕仓库状态、代码变更或协作事项进行整理时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

1,616

周安装

66

GitHub Stars

711

下载量

523
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

3

许可证

MIT

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:bdi-mental-states(BDI 精神状态)
来源仓库:https://github.com/guanyang/antigravity-skills
仓库路径:skills/bdi-mental-states
安装命令:
npx skills add https://github.com/guanyang/antigravity-skills --skill bdi-mental-states
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。不同来源提供的安装方式可能略有差异;本站展示可直接复制的安装命令,安装前请核对来源页面。

skills.shnpx skills
npx skills add https://github.com/guanyang/antigravity-skills --skill bdi-mental-states

简介

bdi-mental-states 将 RDF 上下文转化为 Agent 的信念、愿望与意图模型,支持理性决策。

  • 基于 BDI 认知架构实现感知、 deliberation 与行动循环,增强多智能体系统互操作性。
  • 适用于需要解释性推理或语义集成的复杂代理环境。
  • 激活时需传入结构化上下文,输出为可追踪的 reasoned chain。
  • 适用宿主包括 Codex、Claude、Cursor、Gemini CLI,接入前应确认版本、权限和运行环境要求。

SKILL.md

BDI Mental State Modeling

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.

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

Core Concepts

Mental Reality Architecture

Separate mental states into two ontological categories because BDI reasoning requires distinguishing what persists from what happens:

Mental States (Endurants) -- model these as persistent cognitive attributes that hold over time intervals:

  • Belief: Represent what the agent holds true about the world. Ground every belief in a world state reference.
  • Desire: Represent what the agent wishes to bring about. Link each desire back to the beliefs that motivate it.
  • Intention: Represent what the agent commits to achieving. An intention must fulfil a desire and specify a plan.

Mental Processes (Perdurants) -- model these as events that create or modify mental states, because tracking causal transitions enables explainability:

  • BeliefProcess: Triggers belief formation/update from perception. Always connect to a generating world state.
  • DesireProcess: Generates desires from existing beliefs. Preserves the motivational chain.
  • IntentionProcess: Commits to selected desires as actionable intentions.

Cognitive Chain Pattern

Wire beliefs, desires, and intentions into directed chains using bidirectional properties (motivates/isMotivatedBy, fulfils/isFulfilledBy) because this enables both forward reasoning (what should the agent do?) and backward tracing (why did the agent act?):

: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

Always ground mental states in world state references rather than free-text descriptions, because ungrounded beliefs break semantic querying and cross-agent interoperability:

: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

Connect intentions to plans via bdi:specifies, and decompose plans into ordered task sequences using bdi:precedes, because this separation allows plan reuse across different intentions while keeping execution order explicit:

: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

Implement Triples-to-Beliefs-to-Triples as a bidirectional pipeline because agents must both consume external RDF context and produce new RDF assertions. Structure every T2B2T implementation in two explicit phases:

Phase 1: Triples-to-Beliefs -- Translate incoming RDF triples into belief instances. Use bdi:triggers to connect the external world state to a BeliefProcess, and bdi:generates to produce the resulting belief. This preserves provenance from source data through to internal cognition:

: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 -- After BDI deliberation selects an intention and executes a plan, project the results back into RDF using bdi:bringsAbout. This closes the loop so downstream systems can consume agent outputs as standard linked data:

:Intention_pay a bdi:Intention ;
    bdi:specifies :Plan_payment .

:PlanExecution_PE1 a bdi:PlanExecution ;
    bdi:satisfies :Plan_payment ;
    bdi:bringsAbout :WorldState_payment_complete .

Notation Selection by Level

Choose notation based on the C4 abstraction level being modeled, because mixing notations at the wrong level obscures rather than clarifies the cognitive architecture:

C4 LevelNotationMental State Representation
L1 ContextArchiMateAgent boundaries, external perception sources
L2 ContainerArchiMateBDI reasoning engine, belief store, plan executor
L3 ComponentUMLMental state managers, process handlers
L4 CodeUML/RDFBelief/Desire/Intention classes, ontology instances

Justification and Explainability

Attach bdi:Justification instances to every mental entity using bdi:isJustifiedBy, because unjustified mental states make agent reasoning opaque and untraceable. Each justification should capture the evidence or rule that produced the mental state:

: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

Assign validity intervals to every mental state using bdi:hasValidity with TimeInterval instances, because beliefs without temporal bounds cannot be garbage-collected or conflict-checked during diachronic reasoning:

: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 a specific moment using SPARQL temporal filters. Use this pattern to resolve conflicts when multiple beliefs about the same world state overlap in time:

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

Decompose complex beliefs into constituent parts using bdi:hasPart relations, because monolithic beliefs force full replacement on partial updates. Structure composite beliefs so that each sub-belief can be independently updated, queried, or invalidated:

: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 without touching time
:BeliefProcess_update a bdi:BeliefProcess ;
    bdi:modifies :Belief_meeting_location .

Integration Patterns

Logic Augmented Generation (LAG)

Use LAG to constrain LLM outputs with ontological structure, because unconstrained generation produces triples that violate BDI class restrictions. Serialize the ontology into the prompt context, then validate generated triples against it before accepting them:

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

Translate BDI ontology patterns into executable production rules when deploying to rule-based agent platforms. Map each cognitive chain link (belief-to-desire, desire-to-intention) to a HEAD/CONDITIONALS/TAIL rule, because this preserves the deliberative semantics while enabling runtime execution:

% 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

  1. Model world states as configurations independent of agent perspectives, providing referential substrate for mental states.
  2. Distinguish endurants (persistent mental states) from perdurants (temporal mental processes), aligning with DOLCE ontology.
  3. Treat goals as descriptions rather than mental states, maintaining separation between cognitive and planning layers.
  4. Use hasPart relations for meronymic structures enabling selective belief updates.
  5. Associate every mental entity with temporal constructs via atTime or hasValidity.
  6. Use bidirectional property pairs (motivates/isMotivatedBy, generates/isGeneratedBy) for flexible querying.
  7. Link mental entities to Justification instances for explainability and trust.
  8. Implement T2B2T through: (1) translate RDF to beliefs, (2) execute BDI reasoning, (3) project mental states back to RDF.
  9. Define existential restrictions on mental processes (e.g., BeliefProcess ⊑ ∃generates.Belief).
  10. Reuse established ODPs (EventCore, Situation, TimeIndexedSituation, BasicPlan, Provenance) for interoperability.

Competency Questions

Validate implementation against these SPARQL queries:

# 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

Gotchas

  1. Conflating mental states with world states: Mental states reference world states via bdi:refersTo, they are not world states themselves. Mixing them collapses the perception-cognition boundary and breaks SPARQL queries that filter by type.
  2. Missing temporal bounds: Every mental state needs validity intervals for diachronic reasoning. Without them, stale beliefs persist indefinitely and conflict detection becomes impossible.
  3. Flat belief structures: Use compositional modeling with hasPart for complex beliefs. Monolithic beliefs force full replacement when only one attribute changes.
  4. Implicit justifications: Always link mental entities to explicit Justification instances. Unjustified mental states cannot be audited or traced.
  5. Direct intention-to-action mapping: Intentions specify plans which contain tasks; actions execute tasks. Skipping the plan layer removes the ability to reuse, reorder, or share execution strategies.
  6. Ontology over-complexity: Start with 5-10 core classes and properties (Belief, Desire, Intention, WorldState, Plan, plus key relations). Expanding the ontology prematurely inflates prompt context and slows SPARQL queries without improving reasoning quality.
  7. Reasoning cost explosion: Keep belief chains to 3 levels or fewer (belief -> desire -> intention). Deeper chains become prohibitively expensive for LLM inference and rarely improve decision quality over shallower alternatives.

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

References

Internal references:

  • BDI Ontology Core - Read when: implementing BDI class hierarchies or defining ontology properties from scratch
  • RDF Examples - Read when: writing Turtle serializations of mental states or debugging triple structure
  • SPARQL Competency Queries - Read when: validating an implementation against competency questions or building custom queries
  • Framework Integration - Read when: deploying BDI models to SEMAS, JADE, or LAG pipelines

Primary sources:

  • Zuppiroli et al. "The Belief-Desire-Intention Ontology" (2025) — Read when: implementing formal BDI class hierarchies or validating ontology alignment
  • Rao & Georgeff "BDI agents: From theory to practice" (1995) — Read when: understanding the theoretical foundations of practical reasoning agents
  • Bratman "Intention, plans, and practical reason" (1987) — Read when: grounding implementation decisions in the philosophical basis of intentionality

Skill Metadata

Created: 2026-01-07 Last Updated: 2026-03-17 Author: Agent Skills for Context Engineering Contributors Version: 2.0.0

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

04

需要参考平台分布和安装热度时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Antigravity

32.67%
按下载量换算171

mcpjam

25.55%
按下载量换算134

kiro-cli

16.91%
按下载量换算88

Gemini CLI

11.84%
按下载量换算62

windsurf

7.69%
按下载量换算40

zencoder

3.23%
按下载量换算17

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

可疑

权限和风险

只读

该 Skill 主要提供规则、说明或参考内容,本身偏只读;真正读写文件、联网或执行命令仍取决于宿主 Agent 的任务。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。

来源信息

继续浏览同类 Skills