Skip to main content

Roblox plugin for elizaOS - Python implementation for game communication

Project description

elizaOS Roblox Plugin - Python Implementation

Python implementation of the Roblox plugin for elizaOS, enabling game communication via the Roblox Open Cloud API.

Features

  • Messaging Service: Cross-server communication with Roblox games
  • DataStore: Persistent data storage operations
  • User Lookup: Get player information by ID or username
  • Experience Info: Retrieve universe/experience metadata
  • Dry Run Mode: Test without making actual API calls
  • Fully Typed: Complete type annotations with Pydantic models

Installation

pip install elizaos-plugin-roblox

Or with development dependencies:

pip install elizaos-plugin-roblox[dev]

Usage

import asyncio
from uuid import uuid4
from elizaos_plugin_roblox import RobloxConfig, RobloxService

async def main():
    # Create config from environment or manually
    config = RobloxConfig.from_env()
    # Or: RobloxConfig(api_key="your-key", universe_id="12345")

    # Create and start service
    async with RobloxService(config, uuid4(), "MyAgent") as service:
        # Send a message to the game
        await service.send_message("Hello from Eliza!")

        # Execute a game action
        await service.execute_action(
            "spawn_item",
            {"item": "sword", "rarity": "legendary"},
            target_player_ids=[12345678],
        )

asyncio.run(main())

Configuration

Environment Variables

Variable Required Description
ROBLOX_API_KEY Yes Roblox Open Cloud API key
ROBLOX_UNIVERSE_ID Yes Universe ID of the experience
ROBLOX_PLACE_ID No Specific place ID
ROBLOX_WEBHOOK_SECRET No Secret for webhook validation
ROBLOX_MESSAGING_TOPIC No Messaging topic (default: "eliza-agent")
ROBLOX_POLL_INTERVAL No Poll interval in seconds (default: 30)
ROBLOX_DRY_RUN No Enable dry run mode (default: false)

API Reference

RobloxClient

Low-level API client:

from elizaos_plugin_roblox import RobloxClient, RobloxConfig

async with RobloxClient(config) as client:
    # Messaging
    await client.publish_message("topic", data)
    await client.send_agent_message(message)

    # DataStore
    entry = await client.get_datastore_entry("store", "key")
    await client.set_datastore_entry("store", "key", value)
    await client.delete_datastore_entry("store", "key")

    # Users
    user = await client.get_user_by_id(12345678)
    user = await client.get_user_by_username("PlayerName")
    avatar = await client.get_avatar_url(12345678)

    # Experience
    info = await client.get_experience_info()

RobloxService

High-level service for elizaOS integration:

from elizaos_plugin_roblox import RobloxService

async with RobloxService(config, agent_id, "AgentName") as service:
    await service.send_message("Hello!")
    await service.execute_action("action_name", params)

Development

Setup

pip install -e ".[dev]"

Testing

pytest

Type Checking

mypy elizaos_plugin_roblox

Linting

ruff check .
ruff format .

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

elizaos_plugin_roblox-2.0.0a4.tar.gz (12.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

elizaos_plugin_roblox-2.0.0a4-py3-none-any.whl (16.2 kB view details)

Uploaded Python 3

File details

Details for the file elizaos_plugin_roblox-2.0.0a4.tar.gz.

File metadata

  • Download URL: elizaos_plugin_roblox-2.0.0a4.tar.gz
  • Upload date:
  • Size: 12.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for elizaos_plugin_roblox-2.0.0a4.tar.gz
Algorithm Hash digest
SHA256 c422e5dc943ac6cd001ab2f388489b35cb67a0b07255d8f33529452ad111edd9
MD5 ec1c7641a8455a7053de10c2715e444d
BLAKE2b-256 d5b5caf842ab0004e7b87df94425648b94b7869f28adaab69f707c3570983a9c

See more details on using hashes here.

File details

Details for the file elizaos_plugin_roblox-2.0.0a4-py3-none-any.whl.

File metadata

File hashes

Hashes for elizaos_plugin_roblox-2.0.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 342a404c3659ebef8801d3580d79285363f215e6a8399623c6ccc97c30d1a364
MD5 f8e3ad52dfa5457c5555e88215cef000
BLAKE2b-256 648d50644a6e6fcba4ac5508acb464c4e6d08d3b67017d19b7d36a65915d8e96

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page