Availability
Tyk AI Studio’s plugin system enables powerful extensibility across the entire platform through a Unified Plugin SDK. Built on HashiCorp’s go-plugin framework, plugins run as isolated processes with gRPC communication, providing security and fault tolerance.
Unified Plugin SDK
All plugins now use a single SDK (pkg/plugin_sdk) that works seamlessly in both AI Studio and Edge Gateway contexts. The SDK automatically detects the runtime environment and provides appropriate capabilities.
Key Features
- Single Import: One SDK works everywhere
- 10 Plugin Capabilities: Mix and match to build exactly what you need
- Runtime Detection: Automatic AI Studio vs Edge Gateway detection
- Service API Access: Built-in KV storage, logging, and management APIs
- Type-Safe: Clean Go interfaces, no manual proto handling
Plugin Capabilities
Plugins implement one or more of these 12 capabilities:Multi-Capability Plugins
A single plugin can implement multiple capabilities. For example, a rate limiter might:- Implement Post-Auth to check limits before request
- Implement Response to update counters after response
- Implement UI Provider to show rate limit dashboard
Plugin Types Overview
While all plugins use the unified SDK, they generally fall into three categories based on their primary use case:1. Edge Gateway Plugins
Edge Gateway plugins provide middleware hooks in the LLM proxy request/response pipeline using the unified SDK. Learn more →2. AI Studio UI Plugins
AI Studio UI plugins extend the dashboard with custom WebComponents, adding new pages, sidebars, and interactive features to the admin interface. These also use the unified SDK and can combine UI capabilities with middleware hooks. Learn more →3. AI Studio Agent Plugins
Experimental Feature: Agent plugins are currently experimental. The API and behavior may change in future releases.Agent plugins enable conversational AI experiences in the Chat Interface using the unified SDK. These plugins can wrap LLMs, add custom logic, integrate external services, and create sophisticated multi-turn conversations. Learn more →
4. Object Hooks Plugins
Object Hooks are a powerful AI Studio-only capability that allows plugins to intercept and control CRUD operations on key objects before they reach the database. This is particularly useful for validation, approval workflows, and policy enforcement. Learn more →Plugin Architecture
Monolithic Plugin Architecture
A single plugin binary can run in both AI Studio and the Edge Gateway, so long as the requisite interfaces are implemented and the requirements are clear in the manifest file. This means one plugin can provide UI extensions in Studio, middleware hooks in the gateway, and even use the event bus to communicate between its Studio and gateway components in near-real-time.Scheduled Tasks
Studio plugins can register scheduled tasks — periodic calls from the host to the plugin on a configurable interval. This enables long-running background jobs such as analytics analysis, compliance checks, log scanning, or data synchronization.Process Isolation
Plugins run as separate processes, communicating with the main platform via gRPC. This provides:- Security: Plugin crashes don’t affect the main platform
- Language Flexibility: While the gRPC protocol theoretically supports any language, only Go plugins have been tested in production. If you plan to write plugins in another language, expect to do additional integration work.
- Resource Management: Plugins can be restarted independently
- Version Independence: Update plugins without platform restarts
Communication Flow
Service API (AI Studio Plugins Only)
AI Studio UI and Agent plugins can access the Service API via a reverse gRPC broker connection: The Service API provides 100+ gRPC operations for managing LLMs, apps, tools, datasources, analytics, and more. Access is controlled via permission scopes declared in the plugin manifest. Learn more about Service API →Deployment Options
Plugins support three deployment methods:file://
Local filesystem plugins for development and testing:grpc://
Remote gRPC plugins running as network services:oci://
Container registry plugins (OCI artifacts):Upgrade Installed Plugins
To publish a plugin to a marketplace and release new versions, refer to Publish Plugins. From v2.2.0, AI Studio tracks the marketplace version of each plugin that you installed from the marketplace. After each marketplace sync, the Plugins page shows the installed version. It also shows an Update chip on each plugin that has a newer published version. AI Studio recognizes plugins that you installed before this version from their OCI reference, so you do not need to install them again. To upgrade a plugin, select Upgrade on the chip, the row menu, the plugin detail page, or the marketplace card of the plugin. Before you apply the upgrade, AI Studio shows:- The target version. You can also select a different published version, also an older one.
- The changelog of that version
- The new permissions that the version asks for. You must approve them to continue. AI Studio removes the permissions that the new version does not use.
- A warning if your current configuration does not match the settings of the new version. This warning does not block the upgrade.
plugins:write permission. AI Studio does not track plugins that you added from a local file or from a private registry that is not a marketplace source. To upgrade these plugins, edit their command.
Known Issues
- Reactivating a plugin does not restart its AI Studio part. After you turn a plugin off and on again, click Reload on the plugin, or call
POST /api/v1/plugins/{id}/reload. - Running Edge Gateways do not reload an in-place upgrade that uses a
file://command. Restart the Edge Gateways after the upgrade. Marketplace (OCI) upgrades change the checksum and reload as usual. - AI Studio does not enforce
min_studio_version. The marketplace shows the value, but you can install a plugin on an older AI Studio version. Check the minimum version before you install.
Permissions and Scopes
AI Studio plugins declare required permissions in their manifest:Getting Started
Choose Your Plugin Type
- Need to intercept/modify LLM requests? → Edge Gateway Plugin
- Building dashboard UI features? → AI Studio UI Plugin
- Creating conversational AI experiences? → AI Studio Agent Plugin
Development Workflow
- Choose your plugin type
- Read the specific plugin guide
- Review example plugins in
examples/plugins/andcommunity/plugins/ - Use the SDK to implement required interfaces
- Build and test with
file://deployment (see Development Workflow Guide for fast iteration) - Deploy with
grpc://oroci://for production
POST /api/v1/plugins/{id}/reload) to test changes instantly without reinstalling. See the Development Workflow Guide for the fastest iteration loop.
SDK Installation
All plugins use the unified SDK:microgateway/plugins/sdk or pkg/ai_studio_sdk), see the Migration Guide for upgrade instructions. From v2.2.1, the gateway plugin interfaces are in pkg/gatewayplugin, and the old microgateway/plugins paths forward to them.