Product Engineering for an AgTech Manufacturer

logostar
*instinctools
  • Score Awaiting client review
    n/a
  • Date Published
  • Reading Time 10-Minute Read
Product-Engineering-For-an-AgTech-Manufacturer-1

How developing a frictionless web app empowered an agricultural startup to bring the idea of a real-time AI-powered monitoring system to life.

The Challenge

There are industries, such as agriculture, that alongside tough market conditions, have to grapple with the pressure of qualified labor shortages.

Our client is an example of an innovative AgTech startup that is rewiring modern farming — SpexAI offers automated AI-powered plant monitoring services for large US and Canadian greenhouses specializing in medical cannabis production. The canabis is used for medical purposes only and contains no more that 0.3% of THC according to USDA-ARS, 2021 (US) and Cannabis Act, 2018 (Canada)

The client’s goal was to streamline the plant care process in several aspects:

  • Replace manual labor with automation to save a sizable chunk of farm employees’ time.
  • Substitute a lack of workforce for intelligent sensors.
  • Spot problem plants in the early stages of mildew, botrytis, or pest infestation through accurate and detailed real-time health tracking.
  • Detect plants with unsafe levels of THC due to hyperspectral imaging analysis, as in the US and Canada plants exceeding the 0.3% total THC level have to be destroyed, causing tremendous financial loss to farmers.
  • Back up harvest predictions and decision-making with accurate up-to-date analytics instead of guesswork to avoid year-end surprises.

Before reaching out to us, the client had already had:

  • BlueIOT® tags that identify each plant
  • A robot – Hugin, harmlessly collecting data from the plants
  • AI – Odin – for analyzing the data

However, there was no software that could receive the data from the AI-powered robot and visualize it in a detailed yet easy-to-grasp form for the end users – farmers. The client needed a web app, and creating such a solution became the purpose of our project.

Instinctools’ dedicated team had to craft:

  • A frontend capable of displaying maps of farms with 2,000+ plants.
  • A backend able to process up to 1,000 requests from the frontend in a second.
  • Visualization of the map itself to see the data collected by Hugin (smart sensor) and analyzed by Odin (AI) in a simple and intuitive format.
  • A user-friendly visual design for the web app.

The Solution

The client’s end goal was not just to get a Minimum Viable Product (MVP) but also to de-risk the product launch as much as possible. They decided to move incrementally, from the proof of concept (PoC) to prototype to a robust MVP.

Besides implementing the changes driven by the farmers’ feedback on the prototype, we went the extra mile by crafting a solid MVP and making the app more feature-rich and appealing to investors and users.

PoC and Prototype

We assembled a core team consisting of a business analyst, product designer, and software architect to more effectively deal with the project requirements and limitations from the get-go.

Puzzling Over the Map of Plants

Identifying the best way to visualize a farm’s map and finding the most suitable library to implement this concept on a technical level was the major head-scratcher of the whole project.

Since access to every plant was a prerequisite, our dedicated team devised a grid map with large cells, where a cell equals a plant.

For the technical implementation of the project, we chose D3.js — a JavaScript library for bespoke data visualization, as it allows:

  • drawing a map with 10,000–15,000* cells quickly (the amount we needed for the MVP)
  • painting cells in specific colors
  • illustrating different parameters (health status, cannabinoids, environment) in layers
  • showing pop-ups with detailed information about plants.

The Best Way to Transfer the Original Farm Map Structure to the App

At this stage, we faced another question — what is the best way for our frontend and backend developers to receive the configuration of the farm? This issue could be solved by using a tool for software solution structure visualization. The client entrusted us with finding the most beneficial option available.

In Visio, Miro, Lucidchart, and other popular tools, monthly subscription costs $5–8 for a user. We managed to find a more affordable solution – draw.io – that costs $5 per month for ten users.

The Most Appropriate Framework for the Back End

According to the client’s requirements, the web app’s back end had to handle up to 1,000 requests from the front end per second. Therefore, we suggested using the asynchronous framework FastAPI, designed specifically for building high-performing web applications. FastAPI was also the best bet, as it is:

  • fast to code*
  • fully compatible with the declarative language JSON Schema, which allows for confident validation and annotation of JSON files, understandable for our web app’s front end
  • compatible with OAuth 2.0 protocol, which simplifies signing in for end users while ensuring the security of the process.

* According to the FastAPI documentation, the framework provides developers with the possibility to speed up the features development process by about 200% to 300%.

What User Functionality Was Provided in the Prototype?

Ability to log in and sign in with Google and Microsoft credentials.

Digital twin of a greenhouse.

Access to key data on each plant.

Information visualization on the plants’ health status and their cannabinoids level at the scale of a whole greenhouse, updated once a day.

MVP

The app’s prototype was successfully tested on a Canadian farmer’s greenhouse. Farm employees’ feedback revealed how to improve the application, which we did at the MVP development stage. Instinctools’ team upgraded the UX, fine-tuned and expanded the solution’s functionality. So what has been enhanced?

The Scale and View of the Map 

As having a top-level view was mandatory for managing the whole greenhouse, we suggested reducing the map’s scale and adding the ability to zoom it up to 500%, considering the client’s ambition to cover the farms with 10,000–15,000 plants and several greenhouses.

As you can see on the mock-up, we’ve added gray cells to show free spots. If a plant is transplanted, the system automatically reflects it in a new cell as Hugin (a smart sensor) reads its BlueIOT tag at the new location, and the former cell of this plant becomes gray indicating a vacant place.

Enhanced UX

Whereas in the prototype users could only see cannabinoid levels for a single plant, now this parameter is visible at the scale of an entire farm.

Data Collected About Plants

We’ve added tracking of mildew, botrytis, and pests that affect plants’ health status and updated the logic for determining healthy/diseased plants. Now, if a plant has at least one of the problematic parameters, it will be marked by the system as unhealthy.

In a nutshell, when a user moves the cursor over the plant, they now see a hover with the following data:

  • Last numbers of the Plant ID
  • TCH index
  • CBD index
  • Botrytis presence
  • Mildew presence
  • Pest presence

Ability to See Statistics for a Chosen Area

While in the prototype, it was possible to view statistics only for individual plants by clicking on them. In the MVP, users can select any area on the map and check up-to-the-minute data about it. This functionality works in the same way for all map layers.

Check-Boxes on Several Tracking Layers Simultaneously

With multiple filters required, setting the filtering was one of the project’s tough calls. Partially, this was solved simply by colors. But the client wanted to add another layer – ‘Environment’ – to check how humidity and temperature influence plants’ health status and cannabinoids level.

They also wanted to allow end users to visualize a combination of parameters from the different map layers. This was tricky both in terms of graphics and technical implementation. We solved the issue using heat maps overlaid on the farm’s map. Now the map has two layers: plants and environment

Real-Time Data Updates

As the temperature and humidity in the greenhouse can change more than once during a day and influence the plant’s condition, updating data once a day carries a probability of inaccuracy in analytics. Therefore, we ensured that Hugin (the smart sensor) was constantly collecting data and Odin (AI) analyzing it so employees could access up-to-date data any time.

MVP Evolution

The MVP version of the app was successfully tested on the Canadian investor’s farm. Yet, we went the extra mile and suggested several features to make the software even more beneficial for farmers and put SpexAI on track to high profit.

Ability to View the Greenhouse History

Users can access retrospectives of an entire farm, its highlighted area, or an individual plant to check how its health status and cannabinoids level changed over time. With data from previous periods, farmers can better plan the following season.

Leaving Notes on the Map

Farm staff who tested the app’s prototype mentioned that leaving notes about plants on the map would be convenient. With such an approach, if an employee working during one shift discovers that certain plants require special attention, they can leave notes for employees working during other shifts to notice deviations straight away.

Multiple Greenhouses Within One Account

Although the solution was tested on a farm with one large greenhouse, the client expected that in the future, the application would be used by farmers with multiple greenhouses, so we built in such functionality.

This feature came in very handy as, thanks to the elaborated MVP, the client has found farmers with several greenhouses for 10,000 and 15,000 plants.

Different Roles Within the App

There were no different roles in the app’s prototype version. However, its architecture allowed implementing this logic down the road. Therefore, we designed two initial roles for MVP — greenhouse managers and farm owners with different levels of access to data and depth of the reports:

  • Greenhouse managers can only check the greenhouse they are responsible for, but they have highly granular reports.
  • Farm owners can view all greenhouses and all farms, but they have top-level data in their reports.

The Result

Before

  • Absence of a specialized tech solution for the safe monitoring and analysis of the plants’ state in greenhouses
  • Lack of top-level view of a whole farm and the ability to drill down into greenhouses areas and separate plants
  • Inability to provide real-time monitoring of the farm
  • Decision-making based on personal insights and guesswork
  • Failure to spot plants with non-safe THC levels before they have to be disposed of
  • Incapability to track the history of plants’ condition to predict future changes

After

  • Easy-to-grasp actionable insights based on leaf-level images from crop monitoring
  • The very first solution for harmless monitoring and analyzing the state of medical cannabis plants in greenhouses
  • Interactive multi-layered greenhouse map
  • Holistic data about plants’ condition in real-time
  • Decreased number of plants requiring eradication due to THC excesses thanks to predicting the cannabinoid level during growth
  • Greenhouse history at the fingertips empowers farmers to make accurate hypotheses about possible changes ahead