Agricultural Data Query
Use Case: Build a Real-Time Agricultural Data Query Assistant
If you work in agriculture — as a farmer, wholesaler, retailer, or government policy maker — you may need to analyze and forecast market prices and trading trends for various agricultural products (such as rice, fruits, vegetables, livestock products, etc.). By integrating with the publicly available APIs from the Ministry of Agriculture, you can query real-time agricultural product transaction data to perform data analysis and improve decision-making efficiency.
Workflow
1. Create an Agricultural Product Transaction Query Tool
Obtain API Configuration
First, visit the API section of the Agricultural Data Open Platform to obtain the data integration source you need.
Here we use the agricultural product transaction market data as an example for building the tool. In the Parameters section, click the "Try it out" button, then click "Execute" to obtain the API configuration data.


Create an API Tool
Go to the MaiAgent platform, click "Tools" in the left sidebar, then click "Add Tool".

Enter the display name and tool name, select API as the tool type, and fill in the tool description.
For the API configuration below, you can take a screenshot of the API information interface on the Agricultural Data Open Platform and paste it into the MaiAgent Tool Creation Assistant to quickly obtain the API URL, HTTP method, headers, and parameter structure.

API URL example:
https://data.moa.gov.tw/api/v1/AgriProductsTransType/HTTP method example:
GETHeaders (JSON) example:
Parameter structure (JSON Schema) example:
2. Create an Agricultural Data Query AI Assistant
Create an AI Assistant
Go to the MaiAgent platform, click "AI Assistants" in the left sidebar, then click "Create AI Assistant".

Select "Agent" as the response mode and enter the role instructions.

Configure Tools for the AI Assistant
Select the "Tools" tab and click "+ Select Tool".

Select the agricultural product transaction query tool you just created and click Confirm.

3. Deploy the AI Assistant
Now you can ask questions directly through the AI assistant's chat interface to quickly query agricultural product transaction volumes, average price changes, and other information. Stay on top of market prices and trading trends in real time to facilitate further data analysis and improve decision-making efficiency!

You can also go to the "All Conversations" feature on the MaiAgent platform to view the tool invocation logs when the AI assistant responds.

Last updated
Was this helpful?
