Skip to main content

Availability

Plugins are available in the Community and Enterprise Editions. Plugins extend Tyk AI Studio and the Edge Gateway through a Unified Plugin SDK. The SDK is built on the HashiCorp go-plugin framework. Plugins run as separate processes and communicate with the host over gRPC.

Unified Plugin SDK

All plugins use a single SDK (pkg/plugin_sdk) that works in AI Studio and in the Edge Gateway. The SDK detects the runtime environment and provides the capabilities of that environment.

Key Features

  • Single Import: One SDK works everywhere
  • Plugin Capabilities: Combine the capabilities that 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 capabilities:

Multi-Capability Plugins

A single plugin can implement more than one capability. For example, a rate limiter can:
  • 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

All plugins use the unified SDK. Their primary use case puts them in one of four categories:

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 let plugins intercept and control CRUD operations on key objects before they reach the database. Object hooks run only in AI Studio. Use them 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. It must implement the interfaces of each, and declare its requirements in the manifest. One plugin can provide UI extensions in AI Studio and middleware hooks in the gateway. It can also use the event bus to communicate between its AI Studio and gateway components in near-real-time.

Scheduled Tasks

AI Studio plugins can register scheduled tasks. A scheduled task is a periodic call from the host to the plugin, on a configurable interval. Use scheduled tasks for 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:
  • Fault Isolation: Plugin crashes do not affect the main platform. Process isolation is not a sandbox. A plugin runs with the privileges of its host and can open network connections. Refer to Plugin Security.
  • 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: You can restart each plugin independently. After you turn a plugin off and on again, AI Studio does not restart its AI Studio part. Click Reload on the plugin, or call POST /api/v1/plugins/{id}/reload.
  • Version Independence: Update plugins without platform restarts
Plugins can also run as standalone gRPC services in a sidecar or elsewhere on the network, rather than as local sub-processes. Refer to Plugin Deployment.

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 more than 100 gRPC operations to manage LLMs, Apps, tools, data sources, analytics, and more. The permission scopes in the plugin manifest control access. 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):
Learn more about deployment →

Upgrade Installed Plugins

To publish a plugin to a marketplace and release new versions, refer to Publish Plugins. 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. 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 select a different published version, including 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.
An upgrade replaces only the plugin binary. The plugin keeps its configuration and data: KV data, agents, LLM associations, schedules, the Apps that use its resources, and the permissions granted on it. If the new version does not start, AI Studio restores the previous version and shows the reason. If the plugin also runs on Edge Gateways, AI Studio marks them as pending after the upgrade. They load the new version with the next configuration push.
  • Marketplace (OCI) upgrades change the checksum and reload as usual.
  • Running Edge Gateways do not reload an in-place upgrade that uses a file:// command. Restart the Edge Gateways after the upgrade.
Upgrades need the 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. AI Studio does not enforce the minimum version of a plugin. Refer to Minimum Versions.

Permissions and Scopes

AI Studio plugins declare required permissions in their manifest:
An administrator approves the declared scopes when they install the plugin. From Tyk AI Studio 2.3.0, AI Studio refuses each Service API call outside the approved scopes with PermissionDenied. Refer to Scopes and Administrator Approval. Learn more about manifests →

Getting Started

Choose Your Plugin Type

  1. Need to intercept/modify LLM requests? → Edge Gateway Plugin
  2. Building dashboard UI features? → AI Studio UI Plugin
  3. Creating conversational AI experiences? → AI Studio Agent Plugin

Development Workflow

  1. Choose your plugin type
  2. Read the specific plugin guide
  3. Review example plugins in examples/plugins/ and community/plugins/
  4. Use the SDK to implement required interfaces
  5. Build and test with file:// deployment. For fast iteration, refer to Development Workflow Guide.
  6. Deploy with grpc:// or oci:// for production
Pro tip: Use the reload API (POST /api/v1/plugins/{id}/reload) to test changes without reinstalling.

SDK Installation

All plugins use the unified SDK:
Note: If you have existing plugins using the old SDKs (microgateway/plugins/sdk or pkg/ai_studio_sdk), see the Migration Guide for upgrade instructions. The gateway plugin interfaces are in pkg/gatewayplugin, and the old microgateway/plugins paths forward to them.