{"id":"flipbook-labs/agent-gateway","name":"agent-gateway","scope":"flipbook-labs","platform":"roblox","description":"Action registry and agent gateway for Roblox Studio plugins","version":"0.2.0","latest":"0.2.0","versions":["0.2.0"],"license":"MIT","licenseRating":"safe","licenseCaveats":[],"licenseVerified":true,"dependencies":{"jsdotlua/jest":{"version":"^3.10.0","alias":"Jest"},"jsdotlua/jest-globals":{"version":"^3.10.0","alias":"JestGlobals"}},"integrity":"67c395411b3b7c47576682a0579e0b52519410aac25225cb1eba61bee815d512","likes":0,"downloads":0,"install":"forest install flipbook-labs/agent-gateway","url":"https://forest.dev/p/roblox/flipbook-labs/agent-gateway","files":"https://api.forest.dev/ai/package/roblox/flipbook-labs/agent-gateway/files","readme":"# AgentGateway\n\n[![CI](https://github.com/flipbook-labs/agent-gateway/actions/workflows/ci.yml/badge.svg)](https://github.com/flipbook-labs/agent-gateway/actions/workflows/ci.yml)\n\nAgentGateway is a Roblox library for defining actions an agent can perform with a plugin in Studio through a small, MCP-inspired gateway.\n\n## Installation\n\n### Wally\n\n```toml\n[dependencies]\nAgentGateway = \"flipbook-labs/agent-gateway@x.x.x\"\n```\n\n## Usage\n\nDefine your plugin's actions, register them, and stand up a gateway. Registered actions are discoverable and invokable by in-Studio agents.\n\n```lua\nlocal AgentGateway = require(path.to.AgentGateway)\n\ntype Context = { plugin: Plugin }\n\nlocal config: AgentGateway.Config = {\n\tname = \"MyPluginGateway\",\n\tprotocolVersion = 1,\n}\n\nlocal context: Context = { plugin = plugin }\n\nlocal actions: { AgentGateway.Action<Context> } = {\n\t{\n\t\tname = \"insertPart\",\n\t\ttitle = \"Insert Part\",\n\t\tdescription = \"Insert a new anchored Part into the Workspace.\",\n\t\tinputSchema = {\n\t\t\ttype = \"object\",\n\t\t\tproperties = {\n\t\t\t\tname = { type = \"string\", description = \"Name for the new Part\" },\n\t\t\t},\n\t\t},\n\t\trun = function(ctx, params)\n\t\t\tlocal part = Instance.new(\"Part\")\n\t\t\tpart.Anchored = true\n\t\t\tpart.Parent = workspace\n\t\t\treturn { name = part.Name }\n\t\tend,\n\t},\n}\n\nlocal registry = AgentGateway.createActionRegistry(config, context, actions)\nlocal cleanup = AgentGateway.createGateway(registry, config)\n\nplugin.Unloading:Connect(cleanup)\n```\n\nAn agent then talks to the gateway `BindableFunction` (parented to `CoreGui` by default):\n\n```lua\nlocal gateway = game:GetService(\"CoreGui\").MyPluginGateway\n\n-- Discover available actions\ngateway:Invoke({ method = \"list\" })\n\n-- Invoke one\ngateway:Invoke({ method = \"call\", action = \"insertPart\", params = { name = \"AgentPart\" } })\n```\n\nFor a complete, runnable plugin see [`examples/agent-plugin`](examples/agent-plugin).\n\n## License\n\nThe contents of this repository are available under the MIT License. For full license text, see [LICENSE](LICENSE).\n","readmeTruncated":false}