Symfony Package
SmartBotsBundle is a Symfony bundle that provides a fast and convenient way to integrate the SmartBots API into your PHP applications.
It allows you to manage Second Life bots and groups directly from your code — including sending IMs, inviting members, posting notices, translating group chats, and more.
Created by Luke Rowley
Features
Simple and lightweight integration of the SmartBots HTTP API
Support for multiple bots with individual credentials
Easy execution of bot and group commands from your Symfony services
Works out of the box with minimal configuration
Requirements
PHP 7.1+
Symfony 3.4+ / 4.0+ / 5.0+
A SmartBots Developer API Key (available via your SmartBots account)
Installation
With Symfony Flex
composer require kynno/smartbots-bundleWithout Symfony Flex
Install the bundle:
composer require kynno/smartbots-bundleEnable it in
config/bundles.php:
return [
// ...
Kynno\SmartBotsBundle\SmartBotsBundle::class => ['all' => true],
];Configuration
Add your API key and bot details to config/packages/smartbots.yaml:
kynno_smartbots:
api_key: "<your_api_key>"
bots:
Kynno:
name: "KynnoSystem Resident"
botSecret: "pwd"
Leekyn:
name: "Leekyn Resident"
botSecret: "pwd"Options explained:
api_key: Your SmartBots developer API keybots: A list of bots you want to controlEach bot entry includes:
name: The in-world bot’s full namebotSecret: The bot’s secret/password
You can define one or multiple bots. If no bot is explicitly chosen, the first configured bot will be used by default.
Usage
Inject the SmartBots service and start issuing commands:
<?php
// Send an IM with the default bot
$this->smartBots->im('Heyter Nitely', "Hey, it's working!");
// Or target a specific bot
$this->smartBots->getBot('Leekyn')->im('Heyter Nitely', "Hey, it's working with a specific bot!");Commands
All supported commands — including instant messages, group invites, notices, and more — are listed in the official API documentation: 👉 SmartBots HTTP API Commands
For examples of advanced usage, review the AbstractSmartBotsCommands.php class in the bundle source.