Skip to content

Commit 2e5d7cf

Browse files
feat: implement ReasoningAgent and DualBrainAgent with advanced reasoning capabilities
- Add ReasoningConfig class for configurable reasoning parameters - Add ActionState enum for flow control - Implement ReasoningAgent inheriting from Agent with: - Step-by-step reasoning with confidence scoring - Reasoning trace tracking - Configurable min/max steps and reasoning styles - Implement DualBrainAgent inheriting from Agent with: - Separate LLMs for conversation and reasoning - Dual-brain coordination for optimal problem-solving - Brain status monitoring and model switching - Add confidence scoring integration - Maintain backward compatibility with existing Agent class - Export new classes in agent module Addresses issue #968: Create ReasoningAgent inherited from Agent class 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Mervin Praison <[email protected]>
1 parent 9ae29b0 commit 2e5d7cf

File tree

5 files changed

+783
-1
lines changed

5 files changed

+783
-1
lines changed

src/praisonai-agents/praisonaiagents/__init__.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929
from .agent.agent import Agent
3030
from .agent.image_agent import ImageAgent
31+
from .agent.reasoning_agent import ReasoningAgent
32+
from .agent.dual_brain_agent import DualBrainAgent
3133
from .agents.agents import PraisonAIAgents
3234
from .task.task import Task
3335
from .tools.tools import Tools
@@ -39,6 +41,7 @@
3941
from .memory.memory import Memory
4042
from .guardrails import GuardrailResult, LLMGuardrail
4143
from .agent.handoff import Handoff, handoff, handoff_filters, RECOMMENDED_PROMPT_PREFIX, prompt_with_handoff_instructions
44+
from .reasoning import ReasoningConfig, ActionState, ReasoningStep, ReasoningTrace, ReasoningFlow, reason_step
4245
from .main import (
4346
TaskOutput,
4447
ReflectionOutput,
@@ -102,6 +105,8 @@ def disable_telemetry():
102105
__all__ = [
103106
'Agent',
104107
'ImageAgent',
108+
'ReasoningAgent',
109+
'DualBrainAgent',
105110
'PraisonAIAgents',
106111
'Agents',
107112
'Tools',
@@ -132,6 +137,12 @@ def disable_telemetry():
132137
'handoff_filters',
133138
'RECOMMENDED_PROMPT_PREFIX',
134139
'prompt_with_handoff_instructions',
140+
'ReasoningConfig',
141+
'ActionState',
142+
'ReasoningStep',
143+
'ReasoningTrace',
144+
'ReasoningFlow',
145+
'reason_step',
135146
'get_telemetry',
136147
'enable_telemetry',
137148
'disable_telemetry',

src/praisonai-agents/praisonaiagents/agent/__init__.py

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,18 @@
33
from .image_agent import ImageAgent
44
from .handoff import Handoff, handoff, handoff_filters, RECOMMENDED_PROMPT_PREFIX, prompt_with_handoff_instructions
55
from .router_agent import RouterAgent
6+
from .reasoning_agent import ReasoningAgent
7+
from .dual_brain_agent import DualBrainAgent
68

7-
__all__ = ['Agent', 'ImageAgent', 'Handoff', 'handoff', 'handoff_filters', 'RECOMMENDED_PROMPT_PREFIX', 'prompt_with_handoff_instructions', 'RouterAgent']
9+
__all__ = [
10+
'Agent',
11+
'ImageAgent',
12+
'Handoff',
13+
'handoff',
14+
'handoff_filters',
15+
'RECOMMENDED_PROMPT_PREFIX',
16+
'prompt_with_handoff_instructions',
17+
'RouterAgent',
18+
'ReasoningAgent',
19+
'DualBrainAgent'
20+
]

0 commit comments

Comments
 (0)