Testing & Error Handling
Testing & Error Handling
Building a plugin is only half the work. Before you publish, you need to verify it works — and plan for what happens when it doesn’t.
Testing Your Plugins
How you test depends on what you built.
Testing Compound Actions
Compound actions have a Test button in the Agent Studio editor. Click it to:
- Enter sample input arguments
- Execute the compound action
- View step-by-step logs showing what happened at each expression
This is the fastest way to validate your logic before wiring the compound action into a plugin.
This is also how you test scheduled trigger plugins — since you can’t manually fire a schedule, test the compound action directly using the Test button.
Testing Script Actions
Script actions also have a Test button in the editor. Enter your input variables and run the script to verify the output before using it in a compound action.
Testing Conversational Plugins
Conversational plugins must be tested through the AI assistant — not through Agent Studio. After publishing your plugin:
- Open a chat with your AI assistant
- Type one of your triggering utterances (e.g., “Check my PTO balance”)
- Walk through the conversation flow — fill slots, confirm actions, verify responses
Plugins take approximately 10 seconds to deploy after publishing. If your plugin doesn’t trigger immediately, wait a moment and retry.
Testing Ambient Agents (Webhook-Triggered)
For webhook-triggered plugins:
- First, test your compound action using the Test button (see above)
- Then send a test webhook to your listener URL using cURL or a tool like Postman
- Check the plugin logs for execution results
For details on webhook security and listener configuration, see System Triggers.
Error Handling
HTTP Action Errors
When an HTTP action returns a non-2xx status code, the action fails. Common scenarios:
HTTP actions have a 60 second timeout. If your API is consistently slow, work with the API provider to optimize response times, or consider breaking the request into smaller calls.
Error Handling in Compound Actions
Use try_catch to handle failures gracefully:
You can filter by specific status codes using on_status_code, or catch all errors by omitting it.
Use raise to explicitly throw an error and exit the compound action when a precondition isn’t met.
Conversation Timeouts
Be aware of the execution time limits:
If an action might exceed 30 seconds, consider running it asynchronously — uncheck Wait for Completion on the action activity, or use delay_config in compound actions.
Debugging with Logs
After executing a plugin, check the Logs section in Agent Studio for detailed execution traces. Key log types:
- Action logs: Input/output for each action step
- Compound action logs: Step-by-step execution with status codes
- Webhook logs: Listener trigger events and payload data
For webhook-specific debugging, see Webhook Logs Troubleshooting Guide.
Checklist Before Publishing
Before making your plugin available to users:
- Tested the core action (HTTP or compound) with realistic input data
- Verified error handling — what happens if the API returns 400? 500?
- Checked response sizes — will the output trigger SDA (over 7K tokens)?
- Confirmed slot validation catches invalid input
- Tested with the AI assistant using natural language (for conversational plugins)
- Verified launch configuration restricts access appropriately
- Reviewed the Golden Rule — no two action activities back-to-back without a slot in between