AgentStack
Browse Sign in
Browse Why AgentStack Sell Docs
Sign in
SKILL verified MIT Self-run

Bdi Mental States

skill-viktorbezdek-skillstack-bdi-mental-states · by viktorbezdek

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. NOT for multi-agent coordination or agent handoffs (use multi-agent-patterns), NOT for agent memor…

No reviews yet
0 installs
7 views
0.0% view→install

Install

$ agentstack add skill-viktorbezdek-skillstack-bdi-mental-states

✓ scanned · ✓ verified, works with Claude Code, Cursor, and more.

Security review

✓ Passed

No issues found. Passed automated security review. · v0.1.0 How review works →

  • Prompt-injection patterns
  • Secret / credential exfiltration
  • Dangerous shell & filesystem operations
  • Untrusted network calls
  • Known-malicious package signatures

What it can access

  • Network access No
  • Filesystem access No
  • Shell / process execution No
  • Environment & secrets No
  • Dynamic code execution No

From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.

View the full security report →

Verified badge

Passed review? Show it. Paste this badge into your README, it links to the public security report.

AgentStack Verified badge Links to your public security report.
[![AgentStack Verified](https://agentstack.voostack.com/badges/verified.svg)](https://agentstack.voostack.com/security/report/skill-viktorbezdek-skillstack-bdi-mental-states)

Reliability & compatibility

Security review passed
0 installs to date
no reviews yet
2mo ago

Declared compatibility

Claude CodeClaude Desktop

Compatibility is declared by the source manifest. End-to-end runtime verification is coming, see below.

Preview Execution monitoring

We're building live execution health for every listing: tool-call success rate, median latency, uptime, and last-checked timestamps, measured, not self-reported. It isn't live yet, so we don't show numbers we can't stand behind.

How agent discovery & health will work →
Are you the author of Bdi Mental States? Claim this listing to set pricing, connect Stripe payouts, and keep 70% of every sale.
Sign up to claim

About

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.

Core insight: BDI modeling gives agents traceable reasoning chains -- every belief links to a justification, every desire to motivating beliefs, every intention to fulfilling desires.

When to Activate

  • 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

Decision Tree: BDI Modeling Approach

What is the primary goal?
+-- Explainability and traceability --> Full BDI ontology with Justification instances
+-- Bidirectional RDF integration --> T2B2T paradigm (Triples-to-Beliefs-to-Triples)
+-- LLM augmentation with constraints --> Logic Augmented Generation (LAG)
+-- Executable agent behavior --> SEMAS rule translation from BDI to production rules
+-- All of the above --> Combine approaches; each addresses different concern

Core Concepts

Mental Reality Architecture

Mental States (Endurants): Persistent cognitive attributes

  • Belief: What the agent believes to be true about the world
  • Desire: What the agent wishes to bring about
  • Intention: What the agent commits to achieving

Mental Processes (Perdurants): Events that modify mental states

  • BeliefProcess: Forming/updating beliefs from perception
  • DesireProcess: Generating desires from beliefs
  • IntentionProcess: Committing to desires as actionable intentions

Cognitive Chain Pattern

: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:

: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:

: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

Triples-to-Beliefs-to-Triples implements bidirectional flow between RDF knowledge graphs and internal mental states:

Phase 1: Triples-to-Beliefs -- 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 -- 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 .

Notation 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 |

Justification and Explainability

:Belief_B1 a bdi:Belief ;
    bdi:isJustifiedBy :Justification_J1 .

:Justification_J1 a bdi:Justification ;
    rdfs:comment "Official announcement received via email" .

Temporal Dimensions

: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:

SELECT ?mentalState WHERE {
    ?mentalState bdi:hasValidity ?interval .
    ?interval bdi:hasStartTime ?start ;
              bdi:hasEndTime ?end .
    FILTER(?start = "2025-01-04T10:00:00"^^xsd:dateTime)
}

Compositional Mental Entities

Complex mental entities decompose into constituent parts for selective updates:

: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 .

Integration Patterns

Logic Augmented Generation (LAG)

Augment LLM outputs with ontological constraints:

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

Map BDI ontology to executable production rules:

% 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)].

Anti-Patterns

| Anti-Pattern | Problem | Solution | |-------------|---------|----------| | Conflating mental states with world states | Mental states reference world states, they are not world states themselves | Always link beliefs to WorldState instances via refersTo | | Missing temporal bounds | Cannot reason about when beliefs are valid | Every mental state should have validity intervals via hasValidity | | Flat belief structures | Cannot update parts of complex beliefs independently | Use compositional modeling with hasPart | | Implicit justifications | No traceability for why agents believe something | Always link mental entities to explicit Justification instances | | Direct intention-to-action mapping | Bypasses plan structure, loses task ordering | Intentions specify plans which contain tasks; actions execute tasks | | Unidirectional property chains | Cannot query in both directions (e.g., "what does this belief motivate?") | Use bidirectional property pairs (motivates/isMotivatedBy) | | Goals as mental states | Goals are descriptions, not cognitive states | Treat goals as separate descriptions; maintain separation between cognitive and planning layers |

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

Guidelines

  1. Model world states as configurations independent of agent perspectives
  2. Distinguish endurants (persistent mental states) from perdurants (temporal mental processes)
  3. Treat goals as descriptions rather than mental states
  4. Use hasPart relations for meronymic structures enabling selective updates
  5. Associate every mental entity with temporal constructs via atTime or hasValidity
  6. Use bidirectional property pairs for flexible querying
  7. Link mental entities to Justification instances for explainability
  8. Implement T2B2T for bidirectional RDF integration
  9. Define existential restrictions on mental processes (e.g., BeliefProcess ⊑ ∃generates.Belief)
  10. Reuse established ODPs (EventCore, Situation, TimeIndexedSituation, BasicPlan, Provenance) for interoperability

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

See references/ folder for detailed documentation:

  • bdi-ontology-core.md - Core ontology patterns and class definitions
  • rdf-examples.md - Complete RDF/Turtle examples
  • sparql-competency.md - Full competency question SPARQL queries
  • framework-integration.md - SEMAS, JADE, LAG integration patterns

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)

Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

Install and usage instructions live in the source repository linked above.

Reviews

No reviews yet, be the first.

Versions

  • v0.1.0 Imported from the upstream source.