Solver Actions Handler
Guide on defining and registering actions within the MAOTO framework
Overview
When building a Solver, you can register actions to the MAOTO Marketplace. These actions define specific capabilities that a Solver can execute when handling tasks.
Required Parameters for an Action
Each action must include the following attributes:
-
name
- The name of the action. (TODO: must be unique?)
-
parameters
- Defines the input parameters required for the action to be executed.
- If required parameters are missing, the Solver can initiate an Information Request to request additional details from the Provider.
-
description
- A clear explanation of what the action does.
-
tags
- Keywords used by MAOTO to shortlist actions with relevant tasks. More information on tags can be found in the Subscription documentation.
-
cost
- The estimated cost to execute the action.
Dynamic Parameters & Cost Adjustments
All action parameters can be dynamically set by the Solver, making them adaptable to the task at hand.
Cost Dynamics
The cost of an action is not fixed and can be adjusted based on multiple factors:
- Task complexity – More complex tasks may require additional computation or processing.
- Execution time – Longer tasks may have higher costs.
- Resource utilization – If an action requires external API calls, processing power, or paid services, costs may increase.
Example: Ride Hailer Solver
In a ride-hailing scenario, the cost of an action (e.g., booking a ride) is highly case-specific.
- Factors such as distance, traffic conditions, surge pricing, and availability of drivers dynamically affect the cost.
- The Solver adapts pricing in real-time before placing a bid.
- Different ride-hailing providers (e.g., Uber, Lyft, etc.) may have different pricing structures, which the Solver can factor in before setting its final bid.
Scenario: Price Variation Based on External Factors
For instance, the price of a ride from Point A to Point B may vary due to:
- Time of day – Peak hours may lead to surge pricing.
- Traffic conditions – Higher congestion can increase trip time and costs.
- Availability of drivers – Fewer drivers lead to higher demand-based pricing.
The Solver can analyze these variables and dynamically adjust the bid price to ensure competitiveness and profit.
Completion Criteria
TODO: Add content