Availability
To develop and test plugins locally, use
file:// paths and the reload API. You can then iterate instantly without reinstalling the plugin.
Quick Start: 5-Minute Setup
1. Create Your Plugin
main.go:
Expandable
2. Build and Get Absolute Path
3. Register Plugin Once
Expandable
4. Development Loop
Now you can iterate without reinstalling:The Development Loop Explained
When Do You Need to Reinstall?
You only need to update the plugin registration (not just reload) when:Development Environment Setup
Option 1: Local AI Studio (Recommended for Speed)
Run AI Studio locally for fastest iteration:Option 2: Docker Compose
Mount your plugin directory:ALLOW_INTERNAL_NETWORK_ACCESS=true allows every internal host on the platform. Use it only on a local development instance.
From Tyk AI Studio 2.3.0:
- Plugins do not inherit the environment of AI Studio. If your plugin reads an environment variable, add its name to
PLUGIN_ENV_PASSTHROUGH. Refer to Plugin Environment. - AI Studio requires signatures on OCI plugins by default (Enterprise Edition). To test an unsigned OCI build, set
AI_STUDIO_OCI_REQUIRE_SIGNATURE=falseon your development instance. Refer to Signature Settings.
Option 3: Remote AI Studio
For remote instances, usegrpc:// deployment during development:
Helper Scripts
dev.sh - One-Command Development
Create this script in your plugin directory:
Expandable
watch.sh - Auto-Rebuild on Save
Expandable
Project Structure Recommendations
Makefile Example
Expandable
Debugging Tips
View Plugin Logs
View Plugin Logs
Plugin logs go to AI Studio’s log output:
Add Debug Logging
Add Debug Logging
Expandable
Check Plugin Status
Check Plugin Status
Test Plugin Standalone
Test Plugin Standalone
Before registering, test your plugin runs:
Common Issues and Resolution
Plugin Not Loading After Reload
Plugin Not Loading After Reload
Symptoms: Reload returns success but changes aren’t reflectedSolutions:
"Permission Denied" on Reload
"Permission Denied" on Reload
Symptoms: Reload fails with permission errorSolutions:
Changes Not Taking Effect
Changes Not Taking Effect
Symptoms: Old behavior persists after reloadSolutions:
Manifest Changes Not Applied
Manifest Changes Not Applied
Symptoms: New UI components or permissions not appearingSolutions: