diff --git a/app/Agents/AgentsCaller/AskAgentTool.php b/app/Agents/AgentsCaller/AskAgentTool.php index cc0c16f..2f557b0 100644 --- a/app/Agents/AgentsCaller/AskAgentTool.php +++ b/app/Agents/AgentsCaller/AskAgentTool.php @@ -4,11 +4,11 @@ namespace App\Agents\AgentsCaller; -use App\Agents\PhpTool; use LLM\Agents\AgentExecutor\ExecutorInterface; use LLM\Agents\LLM\Prompt\Chat\ToolCallResultMessage; use LLM\Agents\LLM\Response\ToolCalledResponse; use LLM\Agents\PromptGenerator\Context; +use LLM\Agents\Tool\PhpTool; use LLM\Agents\Tool\ToolExecutor; /** diff --git a/app/Agents/CodeReviewer/ListProjectTool.php b/app/Agents/CodeReviewer/ListProjectTool.php index 9d3de9f..5d900f2 100644 --- a/app/Agents/CodeReviewer/ListProjectTool.php +++ b/app/Agents/CodeReviewer/ListProjectTool.php @@ -4,7 +4,7 @@ namespace App\Agents\CodeReviewer; -use App\Agents\PhpTool; +use LLM\Agents\Tool\PhpTool; /** * @extends PhpTool diff --git a/app/Agents/CodeReviewer/ReadFileTool.php b/app/Agents/CodeReviewer/ReadFileTool.php index a2ba660..992f02f 100644 --- a/app/Agents/CodeReviewer/ReadFileTool.php +++ b/app/Agents/CodeReviewer/ReadFileTool.php @@ -4,7 +4,7 @@ namespace App\Agents\CodeReviewer; -use App\Agents\PhpTool; +use LLM\Agents\Tool\PhpTool; /** * @extends PhpTool diff --git a/app/Agents/CodeReviewer/ReviewTool.php b/app/Agents/CodeReviewer/ReviewTool.php index c7b232e..82d3306 100644 --- a/app/Agents/CodeReviewer/ReviewTool.php +++ b/app/Agents/CodeReviewer/ReviewTool.php @@ -4,7 +4,7 @@ namespace App\Agents\CodeReviewer; -use App\Agents\PhpTool; +use LLM\Agents\Tool\PhpTool; /** * @extends PhpTool diff --git a/app/Agents/Delivery/GetDeliveryDateTool.php b/app/Agents/Delivery/GetDeliveryDateTool.php index 3d2c136..ff5c940 100644 --- a/app/Agents/Delivery/GetDeliveryDateTool.php +++ b/app/Agents/Delivery/GetDeliveryDateTool.php @@ -4,11 +4,11 @@ namespace App\Agents\Delivery; -use App\Agents\PhpTool; use Carbon\Carbon; +use LLM\Agents\Tool\PhpTool; /** - * @extends PhpTool + * @extends PhpTool */ final class GetDeliveryDateTool extends PhpTool { diff --git a/app/Agents/Delivery/GetOrderNumberTool.php b/app/Agents/Delivery/GetOrderNumberTool.php index 4f44af7..e73f450 100644 --- a/app/Agents/Delivery/GetOrderNumberTool.php +++ b/app/Agents/Delivery/GetOrderNumberTool.php @@ -4,10 +4,10 @@ namespace App\Agents\Delivery; -use App\Agents\PhpTool; +use LLM\Agents\Tool\PhpTool; /** - * @extends PhpTool + * @extends PhpTool */ final class GetOrderNumberTool extends PhpTool { diff --git a/app/Agents/Delivery/GetProfileTool.php b/app/Agents/Delivery/GetProfileTool.php index be0b252..980a733 100644 --- a/app/Agents/Delivery/GetProfileTool.php +++ b/app/Agents/Delivery/GetProfileTool.php @@ -4,10 +4,10 @@ namespace App\Agents\Delivery; -use App\Agents\PhpTool; +use LLM\Agents\Tool\PhpTool; /** - * @extends PhpTool + * @extends PhpTool */ final class GetProfileTool extends PhpTool { diff --git a/app/Agents/DynamicMemoryTool/DynamicMemoryTool.php b/app/Agents/DynamicMemoryTool/DynamicMemoryTool.php index c615519..0e80a68 100644 --- a/app/Agents/DynamicMemoryTool/DynamicMemoryTool.php +++ b/app/Agents/DynamicMemoryTool/DynamicMemoryTool.php @@ -4,9 +4,9 @@ namespace App\Agents\DynamicMemoryTool; -use App\Agents\PhpTool; use LLM\Agents\Solution\MetadataType; use LLM\Agents\Solution\SolutionMetadata; +use LLM\Agents\Tool\PhpTool; use Ramsey\Uuid\Uuid; final class DynamicMemoryTool extends PhpTool diff --git a/app/Agents/PhpTool.php b/app/Agents/PhpTool.php deleted file mode 100644 index 03f895c..0000000 --- a/app/Agents/PhpTool.php +++ /dev/null @@ -1,20 +0,0 @@ - - */ -abstract class PhpTool extends Tool -{ - public function getLanguage(): ToolLanguage - { - return ToolLanguage::PHP; - } -} diff --git a/app/Agents/SmartHomeControl/ControlDeviceInput.php b/app/Agents/SmartHomeControl/ControlDeviceInput.php deleted file mode 100644 index 9267f04..0000000 --- a/app/Agents/SmartHomeControl/ControlDeviceInput.php +++ /dev/null @@ -1,25 +0,0 @@ - - */ - #[Field(title: 'Parameters', description: 'Additional parameters for the action. If the action does not require parameters, this field should be an empty array')] - public array $params, - ) {} -} diff --git a/app/Agents/SmartHomeControl/ControlDeviceTool.php b/app/Agents/SmartHomeControl/ControlDeviceTool.php deleted file mode 100644 index 5f1c4e5..0000000 --- a/app/Agents/SmartHomeControl/ControlDeviceTool.php +++ /dev/null @@ -1,41 +0,0 @@ - - */ -final class ControlDeviceTool extends PhpTool -{ - public const NAME = 'control_device'; - - public function __construct( - private readonly SmartHomeSystem $smartHome, - ) { - parent::__construct( - name: self::NAME, - inputSchema: ControlDeviceInput::class, - description: 'Controls a specific device by performing the specified action with given parameters.', - ); - } - - public function execute(object $input): string - { - try { - $result = $this->smartHome->controlDevice($input->deviceId, $input->action, $input->params); - - return json_encode([ - 'id' => $input->deviceId, - 'action' => $input->action->value, - 'result' => $result, - ]); - } catch (\InvalidArgumentException $e) { - return json_encode(['error' => $e->getMessage()]); - } - } -} diff --git a/app/Agents/SmartHomeControl/DeviceAction.php b/app/Agents/SmartHomeControl/DeviceAction.php deleted file mode 100644 index fcfd326..0000000 --- a/app/Agents/SmartHomeControl/DeviceAction.php +++ /dev/null @@ -1,18 +0,0 @@ - - */ -final class GetDeviceDetailsTool extends PhpTool -{ - public const NAME = 'get_device_details'; - - public function __construct( - private readonly SmartHomeSystem $smartHome, - ) { - parent::__construct( - name: self::NAME, - inputSchema: GetDeviceDetailsInput::class, - description: 'Retrieves detailed information about a specific device.', - ); - } - - public function execute(object $input): string - { - $device = $this->smartHome->getDevice($input->deviceId); - - if (!$device) { - return json_encode(['error' => 'Device not found']); - } - - return json_encode([ - 'id' => $device->id, - 'name' => $device->name, - 'room' => $device->room, - 'type' => get_class($device), - 'params' => $device->getDetails(), - 'controlSchema' => $device->getControlSchema(), - ]); - } -} diff --git a/app/Agents/SmartHomeControl/GetRoomListInput.php b/app/Agents/SmartHomeControl/GetRoomListInput.php deleted file mode 100644 index 91b90ec..0000000 --- a/app/Agents/SmartHomeControl/GetRoomListInput.php +++ /dev/null @@ -1,17 +0,0 @@ - - */ -final class GetRoomListTool extends PhpTool -{ - public const NAME = 'get_room_list'; - - public function __construct( - private readonly SmartHomeSystem $smartHome, - ) { - parent::__construct( - name: self::NAME, - inputSchema: GetRoomListInput::class, - description: 'Retrieves a list of all room names in the smart home system.', - ); - } - - public function execute(object $input): string - { - $rooms = $this->smartHome->getRoomList(); - - return \json_encode([ - 'rooms' => $rooms, - ]); - } -} diff --git a/app/Agents/SmartHomeControl/ListRoomDevicesInput.php b/app/Agents/SmartHomeControl/ListRoomDevicesInput.php deleted file mode 100644 index 5abea7a..0000000 --- a/app/Agents/SmartHomeControl/ListRoomDevicesInput.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -final class ListRoomDevicesTool extends PhpTool -{ - public const NAME = 'list_room_devices'; - - public function __construct( - private readonly SmartHomeSystem $smartHome, - ) { - parent::__construct( - name: self::NAME, - inputSchema: ListRoomDevicesInput::class, - description: 'Lists all smart devices in a specified room.', - ); - } - - public function execute(object $input): string - { - $devices = $this->smartHome->getRoomDevices($input->roomName); - $deviceList = []; - - foreach ($devices as $device) { - $deviceList[] = [ - 'id' => $device->id, - 'name' => $device->name, - 'type' => get_class($device), - 'status' => $device->getStatus() ? 'on' : 'off', - 'params' => $device->getDetails(), - 'controlSchema' => $device->getControlSchema(), - ]; - } - - return json_encode([ - 'room' => $input->roomName, - 'devices' => $deviceList, - ]); - } -} diff --git a/app/Agents/SmartHomeControl/SmartHome/Devices/Light.php b/app/Agents/SmartHomeControl/SmartHome/Devices/Light.php deleted file mode 100644 index 69c0b23..0000000 --- a/app/Agents/SmartHomeControl/SmartHome/Devices/Light.php +++ /dev/null @@ -1,80 +0,0 @@ -brightness = max(0, min(100, $level)); - $this->status = $this->brightness > 0; - } - - public function setColor(?string $color): void - { - $this->color = $color; - } - - public function getDetails(): array - { - return [ - 'type' => $this->type, - 'status' => $this->status ? 'on' : 'off', - 'brightness' => $this->brightness, - 'color' => $this->color, - ]; - } - - public function getControlSchema(): array - { - return [ - 'type' => 'object', - 'properties' => [ - 'action' => [ - 'type' => 'string', - 'enum' => [ - DeviceAction::TurnOn->value, - DeviceAction::TurnOff->value, - DeviceAction::SetBrightness->value, - DeviceAction::SetColor->value, - ], - ], - 'brightness' => [ - 'type' => 'integer', - 'minimum' => 0, - 'maximum' => 100, - ], - 'color' => [ - 'type' => 'string', - ], - ], - 'required' => ['action'], - ]; - } - - public function executeAction(DeviceAction $action, array $params): static - { - match ($action) { - DeviceAction::SetBrightness => $this->setBrightness($params['brightness']), - DeviceAction::SetColor => $this->setColor($params['color']), - default => parent::executeAction($action, $params) - }; - - return $this; - } -} diff --git a/app/Agents/SmartHomeControl/SmartHome/Devices/SmartAppliance.php b/app/Agents/SmartHomeControl/SmartHome/Devices/SmartAppliance.php deleted file mode 100644 index dbf7672..0000000 --- a/app/Agents/SmartHomeControl/SmartHome/Devices/SmartAppliance.php +++ /dev/null @@ -1,128 +0,0 @@ -attributes[$key] = $value; - } - - /** - * @param array $attributes - */ - public function setAttributes(array $attributes): void - { - foreach ($attributes as $attribute) { - $this->setAttribute($attribute->name, $attribute->value); - } - } - - public function getAttribute(string $key) - { - return $this->attributes[$key] ?? null; - } - - public function getDetails(): array - { - return array_merge( - $this->attributes, - [ - 'status' => $this->status ? 'on' : 'off', - 'type' => $this->type, - ], - ); - } - - public function getControlSchema(): array - { - $schema = [ - 'type' => 'object', - 'properties' => [ - 'action' => [ - 'type' => 'string', - 'enum' => [ - DeviceAction::TurnOn->value, - DeviceAction::TurnOff->value, - DeviceAction::SetAttribute->value, - ], - ], - 'params' => [ - 'type' => 'object', - 'properties' => [ - 'name' => [ - 'type' => 'string', - ], - 'value' => [ - 'type' => ['string', 'number', 'boolean'], - ], - ], - 'required' => ['name', 'value',], - ], - ], - 'required' => ['action'], - ]; - - // Add specific schemas based on the appliance type - switch ($this->type) { - case 'fireplace': - $schema['properties']['intensity'] = [ - 'type' => 'integer', - 'minimum' => 1, - 'maximum' => 5, - ]; - break; - case 'speaker': - $schema['properties']['volume'] = [ - 'type' => 'integer', - 'minimum' => 0, - 'maximum' => 100, - ]; - $schema['properties']['radio_station'] = [ - 'type' => 'string', - 'enum' => ['rock', 'pop', 'jazz', 'classical', 'news', 'talk', 'sports'], - ]; - $schema['properties']['playback'] = [ - 'type' => 'string', - 'enum' => ['play', 'pause', 'stop', 'next', 'previous'], - ]; - break; - case 'fan': - $schema['properties']['speed'] = [ - 'type' => 'integer', - 'minimum' => 0, - 'maximum' => 5, - ]; - break; - } - - return $schema; - } - - public function executeAction(DeviceAction $action, array $params): static - { - match ($action) { - DeviceAction::SetAttribute => $this->setAttributes($params), - default => parent::executeAction($action, $params), - }; - - return $this; - } -} diff --git a/app/Agents/SmartHomeControl/SmartHome/Devices/SmartDevice.php b/app/Agents/SmartHomeControl/SmartHome/Devices/SmartDevice.php deleted file mode 100644 index 5cc5a66..0000000 --- a/app/Agents/SmartHomeControl/SmartHome/Devices/SmartDevice.php +++ /dev/null @@ -1,47 +0,0 @@ -status = true; - } - - public function turnOff(): void - { - $this->status = false; - } - - public function getStatus(): bool - { - return $this->status; - } - - abstract public function getDetails(): array; - - abstract public function getControlSchema(): array; - - public function executeAction(DeviceAction $action, array $params): static - { - match ($action) { - DeviceAction::TurnOn => $this->turnOn(), - DeviceAction::TurnOff => $this->turnOff(), - default => throw new \InvalidArgumentException("Unsupported action: {$action->value}"), - }; - - return $this; - } -} diff --git a/app/Agents/SmartHomeControl/SmartHome/Devices/TV.php b/app/Agents/SmartHomeControl/SmartHome/Devices/TV.php deleted file mode 100644 index 448f947..0000000 --- a/app/Agents/SmartHomeControl/SmartHome/Devices/TV.php +++ /dev/null @@ -1,78 +0,0 @@ -volume = max(0, min(100, $volume)); - } - - public function setInput(string $input): void - { - $this->input = $input; - } - - public function getDetails(): array - { - return [ - 'status' => $this->status ? 'on' : 'off', - 'volume' => $this->volume, - 'input' => $this->input, - ]; - } - - public function getControlSchema(): array - { - return [ - 'type' => 'object', - 'properties' => [ - 'action' => [ - 'type' => 'string', - 'enum' => [ - DeviceAction::TurnOn->value, - DeviceAction::TurnOff->value, - DeviceAction::SetVolume->value, - DeviceAction::SetInput->value, - ], - ], - 'volume' => [ - 'type' => 'integer', - 'minimum' => 0, - 'maximum' => 100, - ], - 'input' => [ - 'type' => 'string', - 'enum' => ['HDMI 1', 'HDMI 2', 'HDMI 3', 'TV', 'AV'], - ], - ], - 'required' => ['action'], - ]; - } - - public function executeAction(DeviceAction $action, array $params): static - { - match ($action) { - DeviceAction::SetVolume => $this->setVolume($params['volume']), - DeviceAction::SetInput => $this->setInput($params['input']), - default => parent::executeAction($action, $params), - }; - - return $this; - } -} diff --git a/app/Agents/SmartHomeControl/SmartHome/Devices/Thermostat.php b/app/Agents/SmartHomeControl/SmartHome/Devices/Thermostat.php deleted file mode 100644 index a28e2cc..0000000 --- a/app/Agents/SmartHomeControl/SmartHome/Devices/Thermostat.php +++ /dev/null @@ -1,78 +0,0 @@ -temperature = $temperature; - } - - public function setMode(string $mode): void - { - $this->mode = $mode; - } - - public function getDetails(): array - { - return [ - 'status' => $this->status ? 'on' : 'off', - 'temperature' => $this->temperature, - 'mode' => $this->mode, - ]; - } - - public function getControlSchema(): array - { - return [ - 'type' => 'object', - 'properties' => [ - 'action' => [ - 'type' => 'string', - 'enum' => [ - DeviceAction::TurnOn->value, - DeviceAction::TurnOff->value, - DeviceAction::SetTemperature->value, - DeviceAction::SetMode->value, - ], - ], - 'temperature' => [ - 'type' => 'integer', - 'minimum' => 60, - 'maximum' => 90, - ], - 'mode' => [ - 'type' => 'string', - 'enum' => ['auto', 'cool', 'heat', 'fan'], - ], - ], - 'required' => ['action'], - ]; - } - - public function executeAction(DeviceAction $action, array $params): static - { - match ($action) { - DeviceAction::SetTemperature => $this->setTemperature($params['temperature']), - DeviceAction::SetMode => $this->setMode($params['mode']), - default => parent::executeAction($action, $params), - }; - - return $this; - } -} diff --git a/app/Agents/SmartHomeControl/SmartHome/SmartHomeSystem.php b/app/Agents/SmartHomeControl/SmartHome/SmartHomeSystem.php deleted file mode 100644 index 0649e3f..0000000 --- a/app/Agents/SmartHomeControl/SmartHome/SmartHomeSystem.php +++ /dev/null @@ -1,83 +0,0 @@ - */ - private array $devices = []; - - public function __construct( - private readonly CacheInterface $cache, - ) {} - - public function addDevice(SmartDevice $device): void - { - $this->devices[$device->id] = $device; - } - - public function getDevice(string $id): ?SmartDevice - { - $device = $this->cache->get('device_' . $id, $this->devices[$id] ?? null); - - return $device; - } - - public function getRoomList(): array - { - $rooms = \array_unique(\array_map(fn($device) => $device->room, $this->devices)); - \sort($rooms); - return $rooms; - } - - public function getRoomDevices(string $room): array - { - return \array_filter($this->getCachedDevices(), static fn($device): bool => $device->room === $room); - } - - private function getCachedDevices(): array - { - $devices = []; - foreach ($this->devices as $id => $device) { - $devices[$id] = $this->getDevice($id); - } - - return \array_filter($devices); - } - - public function controlDevice(string $id, DeviceAction $action, array $params = []): array - { - $device = $this->getDevice($id); - if ($device === null) { - return ['error' => 'Device not found']; - } - - $this->cache->set( - 'device_' . $id, - $device->executeAction($action, $params), - CarbonInterval::hour(), - ); - - $this->cache->set('last_action', \time(), CarbonInterval::hour()); - - return [ - 'id' => $device->id, - 'name' => $device->name, - 'room' => $device->room, - 'type' => \get_class($device), - 'params' => $device->getDetails(), - ]; - } - - public function getLastActionTime(): ?int - { - return $this->cache->get('last_action') ?? null; - } -} diff --git a/app/Agents/SmartHomeControl/SmartHomeControlAgent.php b/app/Agents/SmartHomeControl/SmartHomeControlAgent.php deleted file mode 100644 index fc00f31..0000000 --- a/app/Agents/SmartHomeControl/SmartHomeControlAgent.php +++ /dev/null @@ -1,112 +0,0 @@ -addMetadata( - new SolutionMetadata( - type: MetadataType::Memory, - key: 'room_validation', - content: 'Important! Before request devices in any room, use the get_room_list tool to know correct room names.', - ), - new SolutionMetadata( - type: MetadataType::Memory, - key: 'energy_efficiency', - content: 'Remember to suggest energy-efficient settings when appropriate.', - ), - new SolutionMetadata( - type: MetadataType::Memory, - key: 'device_status', - content: 'Important! Check device status before performing any action. Because a state can be changed by another user or system.', - ), - new SolutionMetadata( - type: MetadataType::Memory, - key: 'home_name', - content: 'We are currently in the "Home" home.', - ), - new SolutionMetadata( - type: MetadataType::Memory, - key: 'store_important_memory', - content: 'Store important information in memory for future reference. For example if user tells that he likes some specific setting, store it in memory.', - ), - - new SolutionMetadata( - type: MetadataType::Configuration, - key: Option::MaxTokens->value, - content: 3000, - ), - - new SolutionMetadata( - type: MetadataType::Prompt, - key: 'query_devices', - content: 'What devices are in the living room?', - ), - new SolutionMetadata( - type: MetadataType::Prompt, - key: 'control_light', - content: 'Turn on the lights in the bedroom.', - ), - new SolutionMetadata( - type: MetadataType::Prompt, - key: 'control_fireplace', - content: 'Set the fireplace in the living room to medium intensity.', - ), - new SolutionMetadata( - type: MetadataType::Prompt, - key: 'control_tv', - content: 'Today is rainy. I\'m in the living room and in a bad mood, could you do something to cheer me up?', - ), - new SolutionMetadata( - type: MetadataType::Prompt, - key: 'check_device_status', - content: 'Is the kitchen light on?', - ), - new SolutionMetadata( - type: MetadataType::Prompt, - key: 'control_multiple_devices', - content: 'Turn off all devices in the master bedroom.', - ), - ); - - $model = new Model(model: OpenAIModel::Gpt4oMini->value); - $aggregate->addAssociation($model); - - $aggregate->addAssociation(new ToolLink(name: ListRoomDevicesTool::NAME)); - $aggregate->addAssociation(new ToolLink(name: GetDeviceDetailsTool::NAME)); - $aggregate->addAssociation(new ToolLink(name: ControlDeviceTool::NAME)); - $aggregate->addAssociation(new ToolLink(name: GetRoomListTool::NAME)); - $aggregate->addAssociation(new ToolLink(name: DynamicMemoryTool::NAME)); - - return $aggregate; - } -} diff --git a/app/Agents/SmartHomeControl/SmartHomeControlAgentFactory.php b/app/Agents/SmartHomeControl/SmartHomeControlAgentFactory.php deleted file mode 100644 index 951968e..0000000 --- a/app/Agents/SmartHomeControl/SmartHomeControlAgentFactory.php +++ /dev/null @@ -1,16 +0,0 @@ - + * @extends PhpTool */ final class TaskCreateTool extends PhpTool { diff --git a/app/Providers/SmartHomeServiceProvider.php b/app/Providers/SmartHomeServiceProvider.php index 67ab01e..58f68a6 100644 --- a/app/Providers/SmartHomeServiceProvider.php +++ b/app/Providers/SmartHomeServiceProvider.php @@ -4,13 +4,13 @@ namespace App\Providers; -use App\Agents\SmartHomeControl\SmartHome\Devices\Light; -use App\Agents\SmartHomeControl\SmartHome\Devices\SmartAppliance; -use App\Agents\SmartHomeControl\SmartHome\Devices\Thermostat; -use App\Agents\SmartHomeControl\SmartHome\Devices\TV; -use App\Agents\SmartHomeControl\SmartHome\SmartHomeSystem; use Illuminate\Contracts\Foundation\Application; use Illuminate\Support\ServiceProvider; +use LLM\Agents\Agent\SmartHomeControl\SmartHome\Devices\Light; +use LLM\Agents\Agent\SmartHomeControl\SmartHome\Devices\SmartAppliance; +use LLM\Agents\Agent\SmartHomeControl\SmartHome\Devices\Thermostat; +use LLM\Agents\Agent\SmartHomeControl\SmartHome\Devices\TV; +use LLM\Agents\Agent\SmartHomeControl\SmartHome\SmartHomeSystem; use Psr\SimpleCache\CacheInterface; final class SmartHomeServiceProvider extends ServiceProvider diff --git a/composer.json b/composer.json index 07e1349..4b5d924 100644 --- a/composer.json +++ b/composer.json @@ -7,13 +7,14 @@ "require": { "php": "^8.2", "laravel/framework": "^11.9", - "llm-agents/agent-site-status-checker": "^1.0", - "llm-agents/agent-symfony-console": "^1.0", - "llm-agents/agents": "^1.3", - "llm-agents/cli-chat": "^1.2", - "llm-agents/prompt-generator": "^1.1", - "llm-agents/json-schema-mapper": "^1.0", - "llm-agents/openai-client": "^1.0", + "llm-agents/agent-site-status-checker": "^1.1", + "llm-agents/agent-symfony-console": "^1.1", + "llm-agents/agent-smart-home-control":"^1.1", + "llm-agents/agents": "^1.5", + "llm-agents/cli-chat": "^1.3", + "llm-agents/prompt-generator": "^1.2", + "llm-agents/json-schema-mapper": "^1.1", + "llm-agents/openai-client": "^1.3", "openai-php/laravel": "^0.10.1" }, "require-dev": { diff --git a/config/agents.php b/config/agents.php index 4acab8f..e6dea88 100644 --- a/config/agents.php +++ b/config/agents.php @@ -3,11 +3,10 @@ declare(strict_types=1); -use App\Agents\CodeReviewer\CodeReviewAgentFactory; use App\Agents\Delivery\DeliveryAgentFactory; -use App\Agents\SmartHomeControl\SmartHomeControlAgentFactory; use App\Agents\TaskSplitter\TaskSplitterAgentFactory; use LLM\Agents\Agent\SiteStatusChecker; +use LLM\Agents\Agent\SmartHomeControl\SmartHomeControlAgentFactory; return [ 'agents' => [ @@ -36,10 +35,10 @@ // Smart Home Control - \App\Agents\SmartHomeControl\ControlDeviceTool::class, - \App\Agents\SmartHomeControl\GetDeviceDetailsTool::class, - \App\Agents\SmartHomeControl\GetRoomListTool::class, - \App\Agents\SmartHomeControl\ListRoomDevicesTool::class, + \LLM\Agents\Agent\SmartHomeControl\ControlDeviceTool::class, + \LLM\Agents\Agent\SmartHomeControl\GetDeviceDetailsTool::class, + \LLM\Agents\Agent\SmartHomeControl\GetRoomListTool::class, + \LLM\Agents\Agent\SmartHomeControl\ListRoomDevicesTool::class, // Task splitter \App\Agents\TaskSplitter\TaskCreateTool::class,