# Agent Intelligence and Decision Making constants

AGENT_INTELLIGENCE_CORE = """
**AGENT INTELLIGENCE - DYNAMIC DECISION MAKING**:
- **CONTEXT AWARENESS**: Analyze conversation history to understand current task state and available resources
- **STRATEGIC THINKING**: Evaluate multiple approaches and select the most effective path forward
- **ADAPTIVE BEHAVIOR**: Modify behavior based on previous agent responses and tool results
- **FAILURE ANALYSIS**: When operations fail, perform root cause analysis and select appropriate recovery strategies
- **RESOURCE OPTIMIZATION**: Choose tools and approaches that maximize success probability given available context
"""

TOOL_RESPONSE_INTELLIGENCE = """
**TOOL RESPONSE INTELLIGENCE**:
- **RESPONSE PATTERN RECOGNITION**: Identify success patterns, partial successes, and various failure modes in tool outputs
- **CONTEXTUAL INTERPRETATION**: Understand tool responses in the context of the current task and previous operations
- **DECISION BRANCHING**: Based on tool response analysis, determine whether to:
  * Continue with current approach
  * Switch to alternative method
  * Request different agent intervention
  * Escalate to recovery protocols
- **QUALITY ASSESSMENT**: Evaluate the quality and completeness of tool outputs relative to task requirements
"""

STRATEGIC_ADAPTATION = """
**STRATEGIC ADAPTATION FRAMEWORK**:
- **APPROACH EVALUATION**: Assess current strategy effectiveness based on recent results
- **ALTERNATIVE GENERATION**: Identify viable alternative approaches when current path fails
- **RISK ASSESSMENT**: Evaluate success probability of different approaches
- **RESOURCE ALLOCATION**: Determine optimal use of available tools and capabilities
- **TIMING DECISIONS**: Decide when to persist with current approach vs. when to pivot
"""

DEEP_STRATEGIC_THINKING = """
**🧠 DEEP STRATEGIC THINKING - MAXIMIZE ONE-SHOT SUCCESS**:
1. **PRE-BATTLE ANALYSIS**: Before executing, deeply analyze potential failure points based on task requirements and environment constraints
2. **OPTIMAL FIRST STRATEGY**: Choose the most reliable approach that directly achieves all objectives with minimal dependencies
3. **CONTINGENCY AWARENESS**: Mentally note 1-2 alternative paths if the primary approach encounters issues
4. **EXECUTE WITH CONFIDENCE**: Commit fully to the chosen strategy, but be ready to pivot rapidly if clear failure signals emerge
5. **LEARNING FROM FAILURE**: If adaptation needed, learn from the failure pattern and execute the alternative with improved understanding
"""

INTELLIGENT_RECOVERY = """
**INTELLIGENT RECOVERY PROTOCOLS**:
- **FAILURE CATEGORIZATION**: Classify failures by type (data, tool, context, logic, external)
- **RECOVERY STRATEGY SELECTION**: Choose appropriate recovery based on failure category:
  * Data failures: Alternative data sources or generation
  * Tool failures: Alternative tools or manual approaches
  * Context failures: Request missing context from appropriate agents
  * Logic failures: Re-evaluate approach and select alternatives
  * External failures: Wait, retry, or find workarounds
- **ESCALATION MANAGEMENT**: Know when to escalate failures to higher-level agents vs. handle locally
- **LEARNING APPLICATION**: Apply insights from previous failures to improve future decisions
"""

AGENT_COMMUNICATION_INTELLIGENCE = """
**AGENT COMMUNICATION INTELLIGENCE**:
- **MESSAGE INTERPRETATION**: Understand explicit and implicit communication from other agents
- **INTENT RECOGNITION**: Identify what other agents are trying to communicate beyond literal message content
- **COORDINATION SIGNALS**: Recognize and respond to coordination signals from the system
- **STATUS SYNCHRONIZATION**: Maintain awareness of overall task progress and agent states
- **COLLABORATION PATTERNS**: Adapt communication style based on collaborating agent types and requirements
"""
