query
and notify
capabilities (read more here). These methods allow you to interact with the provider’s API in more specific ways, enabling richer integrations and automation capabilities.
What are provider methods?
Developers define provider methods using thePROVIDER_METHODS
list in each provider class. They represent specific actions or queries that you can perform through the provider’s API. These methods extend the basic capabilities of providers beyond simple notifications and queries.

- Mute/unmute alerts
- Get detailed traces
- Search for specific metrics
- Modify monitoring configurations
Using provider methods
You can access provider methods through:- Keep’s platform interface via the alert action menu
- Keep’s smart AI assistant (for example, “get traces for this alert”)
- Keep’s API
- Keep’s workflows
Via UI
Methods appear in the alert action menu when available for the alert’s source provider:
The form is automatically populated with the parameters required by the
method, if they’re available in the alert.
Via AI assistant
Keep’s AI assistant can automatically discover and invoke provider methods based on natural language requests by understanding multiple contexts:
-
Alert Context: The AI understands:
- The alert’s source provider
- Alert metadata and attributes
- Related services and applications
- Current alert status and severity
-
Provider Context: The AI knows:
- Which providers you have connected to your account
- Available methods for each provider
- Required parameters and their types
- Method descriptions and capabilities
-
Historical Context: The AI learns from:
- Similar past incidents
- Previously successful method invocations
- Common patterns in alert resolution
- Identifies relevant provider methods
- Extracts required parameters from context
- Suggests appropriate actions based on the alert type
- Chains multiple methods for comprehensive investigation
Via API
Adding new provider methods
To add a new method to your provider:- Define the method in your provider class (must be an instance method):
- Add method metadata to
PROVIDER_METHODS
:
func_params
field is automatically populated by Keep through reflection of the method signature, so you don’t need to define it manually.
Provider methods must be instance methods (not static or class methods) of the provider class. The method signature is automatically inspected to generate UI forms and parameter validation.
Complete example
Here’s a complete example of a provider with custom methods:Method types
- view: Returns data for display (for example, getting traces, metrics)
- action: Performs an action (for example, muting an alert, creating a ticket)
Parameter types
Supported parameter types for provider methods:str
: String input fieldint
: Numeric input fieldfloat
: Decimal number input fieldbool
: Boolean checkboxdatetime
: Date/time pickerdict
: JSON object inputlist
: Array/list inputLiteral
: Dropdown with predefined valuesOptional[type]
: Optional parameter of the specified type
Auto-discovery
Keep automatically inspects provider classes to:- Discover available methods
- Extract parameter information
- Generate UI components
- Enable AI understanding of method capabilities
Best practices
- Clear Documentation: Provide detailed docstrings for methods
- Type Hints: Use Python type hints for parameters
- Error Handling: Return clear error messages
- Scopes: Define minimum required scopes
- Validation: Validate parameters before execution
Limitations
- Currently supports only synchronous methods
- The supported parameter types are limited to basic types
- Methods must be instance methods of the provider class
- Methods are automatically discovered through reflection
- Keep validates parameter types based on type hints