What is the Resolution Engine?

The Resolution Engine is the heart of OVADARE’s conflict resolution framework. Once conflicts are detected, the engine evaluates them and generates actionable resolutions to ensure seamless agent collaboration. It operates by analyzing conflicts, applying resolution strategies, and communicating the results back to the agents or the orchestration platform.


Core Features of the Resolution Engine

1. Conflict Evaluation

The Resolution Engine processes conflicts identified by the Conflict Detector. Each conflict is analyzed based on:

  • The policies that were violated.
  • The agents involved.
  • The context and nature of the conflict.
from ovadare.conflicts.conflict import Conflict
from ovadare.conflicts.resolution_engine import ResolutionEngine

# Create a conflict
conflict = Conflict(
    related_agent_id="agent_A",
    violation_details="Unauthorized data sharing",
    action={"action": "share_data", "resource": "sensitive_info"}
)

# Initialize the Resolution Engine
resolution_engine = ResolutionEngine()

# Generate resolutions
resolutions = resolution_engine.generate_resolutions([conflict])
print("Generated resolutions:", resolutions)

2. Resolution Strategies

The Resolution Engine applies pre-defined or custom resolution strategies to conflicts. These strategies define how conflicts are resolved, such as restricting certain actions, modifying agent behavior, or escalating issues to a human operator.


3. Resolution Communication

Once a resolution is generated, the Resolution Engine communicates the outcome to:

  • The affected agents (to adjust their actions).
  • The orchestration platform (to update workflows).
from ovadare.conflicts.resolution_engine import ResolutionEngine
from ovadare.agents.agent_registry import AgentRegistry

# Create and register agents
registry = AgentRegistry()
agent = registry.get_agent("agent_A")

# Communicate a resolution
resolution = {
    "conflict_id": "conflict_123",
    "corrective_action": {
        "action": "restrict_data_sharing",
        "details": {"allowed_agents": ["agent_B"]}
    }
}

resolution_engine.apply_resolutions([resolution])
print(f"Resolution applied to agent {agent.agent_id}")

Example Workflow: Resolving Conflicts in Real-Time

Here’s an example of how the Resolution Engine operates:

  1. Conflict Detection: A conflict is detected by the Conflict Detector.
  2. Resolution Generation: The Resolution Engine generates a resolution.
  3. Action Communication: The resolution is communicated back to the agent or orchestration platform.
from ovadare.conflicts.conflict import Conflict
from ovadare.conflicts.resolution_engine import ResolutionEngine

# Initialize the Resolution Engine
resolution_engine = ResolutionEngine()

# Simulate a conflict
conflict = Conflict(
    related_agent_id="agent_A",
    violation_details="Unauthorized action attempted",
    action={"action": "delete_file", "resource": "protected_document"}
)

# Generate and apply resolution
resolutions = resolution_engine.generate_resolutions([conflict])
for resolution in resolutions:
    resolution_engine.apply_resolutions([resolution])
    print(f"Applied resolution: {resolution.to_dict()}")

Customizing the Resolution Engine

Developers can create custom resolution strategies to suit their specific workflows. For example:

  • Escalating unresolved conflicts to a human decision-maker.
  • Applying dynamic policies to address conflicts based on agent priorities.

Learn More