# Load Balancer Distributor AI Agent Connect

> Deterministic simulation engine for evaluating load balancing algorithms.

## Overview
- **Category:** infrastructure
- **Price:** Free
- **Endpoint:** https://edge.vinkius.com/vk_preview_KCXzjL1n1FNfWHHWFAVxbFcDYFozUrH0lKsAXp1Y/ai-agent-connect
- **Tags:** load-balancing, deterministic, simulation, algorithms, agents

## Description

This MCP server provides a deterministic simulation engine to evaluate how various load-balancing algorithms distribute weighted tasks across a pool of agents. Use `simulate_distribution` to calculate exact task-to-agent assignments and performance metrics like load variance and saturation. You can also use `get_agent_status` to inspect agent utilization or `validate_system_constraints` to verify if a distribution plan is feasible without exceeding agent capacities.

## Tools

### simulate_distribution
Calculates the exact assignment of tasks to agents using a specific algorithm and returns performance metrics

### validate_system_constraints
Checks if a proposed set of tasks can be distributed without any agent exceeding its absolute capacity

### get_agent_status
Provides a snapshot of the current state of all agents to prepare for a simulation

## Prompt Examples

**Prompt:** 
```
Simulate a distribution using round_robin for these agents: [{'id': 'a1', 'capacity': 100, 'currentLoad': 10, 'latencyMs': 5}] and these tasks: [{'id': 't1', 'weight': 20, 'affinityKey': 'k1'}]
```

**Response:** 
```
{ "assignments": [ { "taskId": "t1", "agentId": "a1" } ], "loadVariance": 0, "maxLoadRatio": 0.3, "affinityPreservation": 100, "isSaturated": false }
```

**Prompt:** 
```
Check the status of agent 'a1'.
```

**Response:** 
```
{ "agentId": "a1", "utilization": 0.1, "totalLoad": 10 }
```

**Prompt:** 
```
Is it feasible to assign a task with weight 95 to an agent with capacity 100 and current load 10 using least_connections?
```

**Response:** 
```
{ "isFeasible": false, "bottleneckAgentId": "a1" }
```

## Frequently Asked Questions

**What algorithms are supported?**
The engine supports round_robin, weighted_round_robin, least_connections, consistent_hash, and power_of_two_choices.

**How is saturation determined?**
A saturation flag is triggered if any agent's total load (existing load plus new task weights) exceeds 90% of its maximum capacity.

**Can I check if a distribution is feasible?**
Yes, use the `validate_system_constraints` tool to check if a proposed set of tasks can be distributed without exceeding any agent's absolute capacity.
