The Reasoning Agent is a specialized cognitive sub-agent that provides advanced logical reasoning capabilities for augmentic development. It implements deductive, inductive, and abductive reasoning using LogicEngine and LLM-based reasoning.
The Reasoning Agent implements three types of logical reasoning:
cognitive_sub_agentagents/core/reasoning_agent.pyfrom agents.core.reasoning_agent import ReasoningAgent
from agents.core.belief_system import BeliefSystem
from agents.memory_agent import MemoryAgent
from agents.orchestration.coordinator_agent import CoordinatorAgent
Create reasoning agent
reasoning_agent = ReasoningAgent(
agent_id="reasoning_agent",
belief_system=belief_system,
coordinator_agent=coordinator_agent,
memory_agent=memory_agent
)
Initialize async components
await reasoning_agent._async_init()
Deductive reasoning
result = await reasoning_agent.deductive_reasoning(
premises=[
"All agents are intelligent",
"BDI agent is an agent"
],
conclusion_hint="What can we conclude about BDI agent?"
)
Inductive reasoning
result = await reasoning_agent.inductive_reasoning(
observations=[
"Agent A succeeded with approach X",
"Agent B succeeded with approach X",
"Agent C succeeded with approach X"
],
pattern_hint="What pattern emerges?"
)
Abductive reasoning
result = await reasoning_agent.abductive_reasoning(
observations=[
"System performance decreased",
"Memory usage increased",
"CPU usage increased"
],
possible_explanations=[
"Memory leak",
"Resource contention",
"Inefficient algorithm"
]
)
The Reasoning Agent is created on-demand by MastermindAgent for augmentic development tasks:
# MastermindAgent creates reasoning agent
result = await mastermind_agent._create_sub_agent(
agent_type="reasoning_agent",
agent_id="reasoning_001",
config={}
)
The Reasoning Agent uses LogicEngine for rule-based logical inference:
# LogicEngine provides:
- Rule-based inference
- Forward chaining
- Safe expression evaluation
- Socratic questioning support
{
"name": "mindX Reasoning Agent",
"description": "Specialized cognitive sub-agent for advanced logical reasoning (deductive, inductive, abductive)",
"image": "ipfs://[avatar_cid]",
"external_url": "https://mindx.internal/agents/core/reasoning_agent",
"attributes": [
{
"trait_type": "Agent Type",
"value": "cognitive_sub_agent"
},
{
"trait_type": "Capability",
"value": "Logical Reasoning"
},
{
"trait_type": "Reasoning Types",
"value": "Deductive, Inductive, Abductive"
},
{
"trait_type": "Lifecycle",
"value": "on_demand"
}
]
}