A pest nest identification AI agent from a failed bee vacuum

October 5, 2026

Inspired to develop this local AI agent after failing to remove a yellowjacket nest with my custom bee vacuum due to my lack of knowledge :)

Keywords
Brands
Hardware
  • 1Dragonwing IQ-9075 EVK
  • 1Bambu Lab A1 Combo
  • 1M2 Screws, Nuts, and Washers
  • 1Samsung VC07T35 Cylinder Vacuum Cleaner

Description

If you are familiar with my project tutorials, you may know that I enjoy developing multidisciplinary proof-of-concept research projects that focus on solving real-world problems. Usually, it takes a long time for me to complete a project since I prefer designing custom mechanical parts, PCBs, and firmware from the ground up to be able to control all experiment parameters. Nonetheless, this project was an impromptu idea born out of a failed solution while I was trying to get rid of a pest infestation on my balcony. In this project, I wanted to showcase how a lack of knowledge and experience may lead to a painful and costly mistake, and how employing AI-oriented assistance can help prevent mistakes by providing educated guesses on potential culprits and emphasizing contacting experts for nest removal.

Nearly two months ago, I noticed bee-like pest activity near a small opening outside the wall insulation in my balcony. After some superficial research on species that prefer wall insulation and seeing a bumblebee flying over the flowers on my balcony, I falsely deduced that the pest nest belonged to a bumblebee colony. Thus, I did not give much credence to the increasing colony size and decided to design a custom 3D-printable bee trap, inspired by honey bee vacuums, to safely relocate the nest. As I thought I could create an easily replicable device to help people facing a similar problem, I decided to design my bee trap as an add-on accessory to my Samsung cylinder vacuum cleaner. In this regard, I gradually worked on my bee vacuum and designed it to be attachable between the cleaner hose and the hose connection adapter. I heavily focused on the device's modularity and redirecting the negative pressure and airflow (suction) to safely collect bees.

However, I have made a huge mistake by focusing on the results and ignoring my lack of knowledge about pest species. I realized my mistake as I was searching for bumblebees' airflow resistance to design a safe bee vacuum inner frame. Thanks to a random but lucky article inspection, I came to the conclusion that the flight patterns of the species residing in my balcony do not correspond to those of bees but rather to those of wasps. Considering the wall insulation nest, they were more likely yellowjackets. Once I went out to investigate the nest up close to confirm my new assumption, I could not even get near it; the colony had become too aggressive. The only thing I could do was to squeeze a plastic bag near the opening via a broom to protect myself. Since I utilized this balcony area as storage and only inspected the nest behind a window, I did not notice this aggressiveness and threat.

After realizing this was a pest infestation, I decided to speed up developing my bee vacuum and remove the nest immediately. I even purchased a beekeeping hoodie :) Unfortunately, again due to my lack of knowledge and experience, I made colossally wrong assumptions about the nest population and size. Once I tried to remove the pest nest with my bee vacuum, hundreds of yellowjackets swarmed and stung me three times. Thankfully, I was wearing the hoodie and did not show any allergic symptoms. Thus, my experiment did not cause any serious health issues; the only positive result I got from this experiment was a funny video documenting how yellowjackets successfully repelled me :)

At this point, this infestation stopped being an experiment on a custom bee vacuum and became a dangerous threat to me and my neighbours. Thus, I immediately contacted a professional firm to eliminate the yellowjacket infestation. They applied chemical treatment and needed to break the wall insulation to remove the whole nest. Little did I know, the insulation company left a huge void between the panels, throwing all of my nest size estimations out of the window.

After this painful yet enlightening experience, I still wanted to publish my 3D-printable bee vacuum since it can work perfectly for more docile species such as bumblebees, in the case that the user has the appropriate protection gear and attire. Nevertheless, I also wanted to examine and share how I could employ AI to develop a simple solution to safely investigate potential pest species and their threat levels, leading the user to take action early and contact experts with scrutinizing articles not by chance but by contrivance. After mulling over different AI-oriented solutions, I decided to develop a VLM-enabled AI agent and assign a simple web interface to the agent for user interactions.

The web interface allows the user to upload videos of outside nest activity, select frames from the video, and pass the selected frame to the AI agent. The web interface also lets the user enter assumptions about pest species based on the monitored nest activity. Then, the AI agent utilizes a vision-language model to analyze the nest activity and deduce the pest species shown in the provided frame. After getting the VLM inference result, the agent searches the internet to collect information about the VLM-detected pest species and nest type. If the user provided assumptions, the agent also reviews the viability of these deductions based on its web-scraped research. Finally, the agent generates a PDF report file based on the web-extracted information, including potential pest culprits, species threat levels, colony behaviour, and the importance of contacting experts according to the predicted species.

Since I did not want to develop a complex AI agent pipeline, requiring paid subscriptions or high-end components, I decided to utilize the Dragonwing IQ-9075 EVK to:

  • run the AI agent (smolagents),
  • run large language models and vision-language models locally via Ollama,
  • host the web interface via the Flask lightweight web framework.

After testing the AI agent and asking about my situation, it immediately suggested the infestation might be caused by paper wasps or yellowjackets. After specifying the wall insulation removal, the agent strongly suggested yellowjacket activity and the necessity of contacting professionals :) So the results clearly state that I would probably be able to solve my infestation problem in less than a week instead of enabling it to span nearly two and a half months if I were not ignorant of my inexperience and focused on developing a solution to gain more information, capitalizing on the open-source AI tools.

As discussed, I developed this AI agent to showcase how AI can provide tailored pest infestation reports, combining VLMs and LLMs, to help the user notice dangerous species and emphasize contacting experts instead of DIY solutions to prevent hazardous situations that could pose health risks. Of course, I cannot stress enough that this is a proof-of-concept project and is meant to encourage users to avoid DIY solutions in the case of dangerous pest species. If you notice colony aggressiveness or erratic pest behaviour, please do not trust any information, including but not limited to AI solutions, and directly contact experts for removal. You can develop needle-induced allergies at any time, even if you have been stung before and did not show symptoms. So, please do not be foolish like me, jumping to conclusions about developing a custom nest removal gadget, and conduct extensive research about potential risks with AI agent assistance or not 😊


Designing and printing the cleaner-compatible bee vacuum

#️⃣ First, I deliberately took measurements of the hose and the hose connection adapter of my Samsung VC07T35 cylinder vacuum cleaner. There are multiple versions of this cleaner with slightly different dust container designs; nonetheless, the bee vacuum parts should fit since all versions share the same hose and connector dimensions.

#️⃣ The main body of the bee vacumm consists of three parts: the intake cover (top), the bee trap (middle), and the exhaust container (bottom). To make the main body assembly effortless, I designed these parts with mating threaded screws.

#️⃣ To connect the cleaner hose to the intake cover, I designed a two-part case for the hose end, securing the hose via its plastic ring. The case parts can be connected via self-tapping M2 holes. Once the parts are connected, they reveal the male mating threaded screw, enabling the case to be attached to the intake cover via the corresponding female threaded screw.

#️⃣ I designed a mesh with a specific shape to disperse negative pressure (suction) as the air moves from the bee trap to the exhaust container. The mesh is attachable to the bottom of the bee trap via self-tapping M2 holes. As mentioned, I designed the mesh to soften the applied pressure since I falsely deduced that I was dealing with a bumblebee nest due to my faulty assumptions.

#️⃣ I added a friction-fit cylindrical joint to the exhaust container that connects to the hose connection adapter of the vacuum cleaner. To avoid any debris from falling into the cleaner's dust container, I designed a two-part exhaust filter frame, which works by adding a filter medium or cloth between the frame parts while attaching them to the cylindrical joint via self-tapping M2 holes.

project_image_1
project_image_2
project_image_3
project_image_4
project_image_5
project_image_6
project_image_7
project_image_8
project_image_9
project_image_10
project_image_11
project_image_12
project_image_13
project_image_14

As a frame of reference for those who aim to replicate or improve this bee vacuum gadget, I shared the STL files of all components individually as open source in the project GitHub repository.

🎨 I sliced all the exported STL files in Bambu Studio and printed them using my Bambu Lab A1 Combo. In accordance with the bee theme, I utilized these PLA filaments while printing 3D parts:

  • eSun ePLA-HS Grey
  • eSun PLA+ Beige

#️⃣ For all parts, I enabled tree support with critical regions only to prevent sagging on connection points.

#️⃣ Since the bee trap has a cylindrical bottom and does not have enough surface area to provide sufficient adhesion considering its height, I enabled 2-layer raft and increased the raft size (initial layer expansion) to 10 mm.

#️⃣ Other than these modifications, I utilized the default settings for all components.

project_image_15
project_image_16
project_image_17
project_image_18
project_image_19
project_image_20
project_image_21
project_image_22
project_image_23
project_image_24
project_image_25
project_image_26

Assembling the cleaner-compatible bee vacuum

#️⃣ First, I attached the mesh to the bottom of the bee trap via M2 screws. In addition to softening the negative pressure produced by the vacuum cleaner, the mesh also stops the captured pests from entering the exhaust container.

#️⃣ Since a yellowjacket worker can pass through 4 mm holes in diameter, I specifically designed the mesh to have 3.50 mm holes to trap yellowjackets safely. Yellowjackets are one of the smallest wasp species and are similar to honey bees. Thus, in theory, the bee trap should work on most bee-like pests. Of course, please conduct proper research if you want to utilize this bee vacuum on pests.

project_image_27
project_image_28
project_image_29
project_image_30
project_image_31
project_image_32
project_image_33

#️⃣ Then, I secured a fine cloth between the two parts of the exhaust frame and connected the frame to the cylindrical joint of the exhaust container via M2 screws.

project_image_34
project_image_35
project_image_36
project_image_37
project_image_38
project_image_39
project_image_40

#️⃣ I fastened the hose connection adapter of the vacuum cleaner to the exhaust container via its friction-fit cylindrical joint.

project_image_41
project_image_42
project_image_43

#️⃣ I attached two parts of the hose case to the cleaner's hose end, securing its plastic ring via the built-in grooves. Then, I reinforced the case connection with M2 screws, revealing the male mating threaded screw.

project_image_44
project_image_45
project_image_46
project_image_47
project_image_48
project_image_49

#️⃣ I fastened the hose case to the intake cover via the built-in mating threaded screws.

project_image_50
project_image_51
project_image_52

#️⃣ Then, I combined all parts of the main bee vacuum body (the intake cover, the bee trap, and the exhaust container) using the corresponding mating threaded screws.

project_image_53
project_image_54
project_image_55
project_image_56
project_image_57

#️⃣ Finally, I affixed the hose connection adapter to the VC07T35 cylinder vacuum cleaner.

project_image_58
project_image_59

Failed yellowjacket nest removal attempt with the custom bee vacuum

As discussed in the introduction, after completing the bee vacuum assembly, I immediately moved on to removing the yellowjacket nest. I initially planned to collect worker yellowjackets slowly and left the bee vacuum at the nest entrance for 20 - 30 minutes before applying treatment. I was going to utilize soapy water to treat the nest since I knew the wall insulation was not too thick, which was installed only on the outside of the building. Since I needed to squeeze a plastic bag due to the colony's aggressiveness in my earliest attempt to inspect the nest, and lost some time due to the inaccurate bumblebee nest assumption, I assumed the colony had become even more aggressive and purchased a beekeeping hoodie.

I wore the beekeeping hoodie and protective gloves before starting the removal procedure. As you can clearly see on my face, I was still skeptical and unsure of my removal decision 😀

project_image_60

You can inspect the whole removal process in the project demonstration video. But, as mentioned earlier, I made extremely wrong assumptions about the yellowjacket nest size and population, leading me to get swarmed by hundreds of yellowjackets and stung three times. Thankfully, I was wearing the beekeeping hoodie, and yellowjackets could only sting through the gloves, which were not rated for beekeeping.

I pointed the camera at the nest entrance to capture the removal process. Thus, the yellowjackets in the video frames are not even half of the attackers; most of them flew above the balcony ceiling.

project_image_61
project_image_62
project_image_63
project_image_64
project_image_65

After this failed attempt, I immediately contacted a professional firm to remove the yellowjacket nest since it had become a threat to my neighbours and me at this point. They applied chemical treatment and needed to break the wall insulation to terminate the nest.

Then, the main cause of my faulty nest size assumptions was revealed; the insulation company left a huge void between two balcony walls, in which yellowjackets were freely roaming after entering the small crack on the insulation surface near the water drainage.

project_image_66

After the yellowjacket nest was removed successfully, I opened the bee vacuum to check the collected yellowjackets and was surprised that the bee vacuum was able to trap more yellowjackets than I expected, considering the very limited application period :) There are white paper balls in the bee trap since I used them to test the suction power before running the bee vacuum on the nest.

project_image_67
project_image_68
project_image_69
project_image_70

Developing the pest reporting AI agent on the Dragonwing IQ-9075 EVK

As discussed, after handling the yellowjacket nest removal, I decided to develop an AI agent to showcase how an AI-oriented solution would have helped me identify pest species and correct my faulty assumptions with targeted web research.

As I wanted to enable the AI agent to analyze frames from videos displaying outside nest activity to conduct more precise web research, I needed to employ a vision-language model. Nonetheless, in accordance with the AI agent architecture, a vision-language model cannot process images directly as the agent's brain. Thus, a large language model should manage operations and run the provided vision-language model via the compatible APIs as a tool. In this regard, the large language model uses the VLM inference output to improve its input (prompt) to conduct more precise web research.

Since I wanted to assign a simple web interface to enable the user to pass frames to the AI agent and decided to run the interface on a lightweight Flask server, I created a separate virtual environment containing all AI agent operations.

#️⃣ First, I installed the required libraries to create a virtual Python environment in the root folder of the web interface.

#️⃣ Then, I activated the virtual Python environment in the root folder and installed Flask.

cd nest_ai_interface
sudo apt install python3-venv
python3 -m venv venv
source venv/bin/activate
pip install Flask
project_image_71
project_image_72
project_image_73

#️⃣ Then, I started to experiment with different AI agent frameworks and open-source platforms for managing large language models.

#️⃣ First, I wanted to try the Hermes AI agent since I enjoyed developing with it in my previous mini-figurine cataloger project. For the LLM framework, I decided to test the Qualcomm Docker Compose container (OpenAI-compatible), which was already installed since I used it in my latest VLM-assisted ceiling fan project.

#️⃣ I tried installing additional models from the Qualcomm AI Hub, changing model configurations, adjusting Docker container configurations, etc. However, I could not make this combination work since the AI Hub models are exported to capitalize on the IQ-9075 chip's Hexagon NPU and have context sizes of 2048 to 4096. Also, the Hermes framework's extensive tool base makes running the agent on edge devices quite taxing.

sudo apt update
sudo apt install -y git curl python3 python3-pip python3-venv

curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash

source ~/.bashrc

hermes --version

hermes model
project_image_74
project_image_75
project_image_76
docker-compose -f docker-compose-qcs9100-ubuntu.yaml up
project_image_77
project_image_78
project_image_79
project_image_80
project_image_81
project_image_82
project_image_83
project_image_84
project_image_85
project_image_86
project_image_87

#️⃣ After testing with the Hermes AI agent, I decided to change my approach and utilize a Python-based AI agent framework, which lets the user program agent tools as functions and gives more control over tool outputs to achieve deterministic results, such as identifying pest species and behaviours by analyzing frames via vision-language models. After inspecting the documentation of various frameworks, I decided to utilize smolagents provided by Hugging Face.

pip install --upgrade pip setuptools

pip install "smolagents[toolkit]"

pip install "smolagents[litellm]"
project_image_88
project_image_89
project_image_90

#️⃣ Again, I tried using the Qualcomm Docker Compose container at first since I had already installed multiple LLMs and VLMs from the Qualcomm AI Hub. Nonetheless, even though the smolagents framework is designed to run economically with small-context models, the context sizes of NPU-only models were still a bottleneck in creating a capable and reliable pest reporting web-enabled AI agent. Thus, I decided to abandon the Docker Compose container altogether and install the Ollama platform to run LLMs and VLMs. Although Ollama cannot run models directly on the NPU, the IQ-9075 EVK has a powerful Octa-core Kryo CPU and a capable Adreno GPU. Thus, the EVK can run models flawlessly with Ollama and handle increased context sizes easily, which are required to complete AI agent tasks.

#️⃣ First, I tried the llama3.2:3b LLM as the agent operator and the llama3.2-vision:11b VLM to analyze images.

curl -fsSL https://ollama.com/install.sh | sh

ollama pull llama3.2:3b

ollama pull llama3.2-vision:11b
project_image_91

#️⃣ Then, I started to develop the pest reporting AI agent's Python backend and the Flask web interface. Since this was a very simple backend and interface, managing only one function, I heavily relied on Google Gemini to program the files quickly. As I was programming the files, I tested them on the EVK simultaneously. Gemini was able to code well; I only needed to make small corrections to the files.

#️⃣ Since I wanted to enable the AI agent to generate PDF report files and utilize vision-language models as tools, I directed Gemini to create code files accordingly and installed the required packages on the EVK manually.

pip install reportlab pillow ollama
project_image_92

#️⃣ While testing the Python backend, I noticed that llama3.2:3b was prone to hallucinating and calling the wrong tool names. Thus, I installed qwen2.5:7b, which is a more advanced large language model and can adapt to agent tool operations easily.

#️⃣ Furthermore, I noticed that llama3.2-vision:11b requires Ollama version 0.40+ due to its architecture. Since the latest bundled Ollama version is 0.34.4 for the IQ-9075 EVK, I decided to utilize an older VLM — llava:7b.

ollama pull qwen2.5:7b

ollama pull llava:7b
project_image_93

📁 app.py and index.html

As mentioned, since programming the AI agent features was a mundane task, I completely programmed both code files with Google Gemini :) Thus, I did not write detailed code documentation like my previous projects; you can review both code files thoroughly on the project GitHub repository — app.py and index.html.

Nevertheless, I would like to share the agent's instructions to clarify its operations and tool usage.

        agent_prompt = f"""
        CRITICAL TOOL INSTRUCTION:
        - Do NOT output Python code blocks or import any packages.
        - Every tool call MUST strictly follow this exact JSON structure:
          {{"name": "tool_name", "arguments": {{"arg_name": "value"}}}}

        AVAILABLE TOOLS:
        1. analyze_image(image_path: str, prompt: str)
        2. web_search(query: str)
        3. generate_pdf_report(filename: str, title: str, summary: str, details: str, image_path: str)

        TASK PARAMETERS:
        User Pest Hypothesis: "{user_guess}"
        Local Image Path: "{image_path}"

        STEPS TO RUN:
        Step 1: Call `analyze_image` for '{image_path}' to confirm or correct the user hypothesis ("{user_guess}").
        Step 2: Call `web_search` to search for insect dust treatment procedures AND specific criteria for when to call a professional exterminator.
        Step 3: Call `generate_pdf_report` saving to '{pdf_name}'. Summarize visual findings vs user hypothesis, safe insect dust steps, and explicit criteria for when professional extermination is required. Include '{image_path}'.
        """
project_image_94
project_image_95
project_image_96
project_image_97
project_image_98
project_image_99
project_image_100

🖥️ I arranged the root folder structure in accordance with the specific folder hierarchy required by the Flask web framework.

  • /reports
  • /static
    • icon.png
  • /templates
    • index.html
  • /uploads
  • /venv
  • app.py
project_image_101
project_image_102
project_image_103
project_image_104
project_image_105
project_image_106
project_image_107

Outcome: Employing the AI agent to analyze nest activity from videos and obtain a PDF report about potential pest species

🐝🤖🔎 Once the Python backend of the smolagents AI agent and the Flask web interface (virtual environment) is initiated in the terminal, the user can access the web interface on port 5000.

cd nest_ai_interface

source venv/bin/activate

python3 app.py
project_image_108
project_image_109
project_image_110
project_image_111

🐝🤖🔎 The web interface allows the user to upload videos displaying outside pest nest activity, select a frame using the progress bar (slider), and pass the selected frame to the Python backend directly.

🐝🤖🔎 The web interface also lets the user enter assumptions about the pest nest, such as predicted species, nest size, colony population, etc., which enables the AI agent to review the user's deductions about the infestation and provide a more comprehensive report.

project_image_112
project_image_113
project_image_114
project_image_115

🐝🤖🔎 Once the Python backend receives the selected video frame, the smolagents AI agent utilizes the provided vision-language model as a tool via the Ollama API to analyze the pest activity in the frame.

🐝🤖🔎 Then, based on the VLM output, the AI agent conducts a web search to collect information about the VLM-suggested pest species and when to call experts according to the pest threat level. In addition to frame analysis, the AI agent also reviews the user assumptions about the pest nest to show whether they conform to the web-scraped pest information.

🐝🤖🔎 Finally, the AI agent compiles a PDF report file from the collected information and the given frame, and allows the user to download the report through the web interface.

project_image_116
project_image_117
project_image_118
project_image_119
project_image_120
project_image_121
project_image_122
project_image_123
project_image_124
project_image_125
project_image_126
project_image_127
project_image_128
project_image_129
project_image_130

🐝🤖🔎 In this regard, the user can generate reports on multiple frames with multiple hypotheses to form an educated opinion and treatment strategy, leading to contacting professionals sooner rather than later.

project_image_131
project_image_132
project_image_133

Project GitHub Repository

The project's GitHub repository provides:

  • AI agent Python backend (smolagents)
  • Flask web interface (w/ assets)
  • Mechanical components (STL)

Schematics

Project diagram generated by Google Gemini.

project_image_134

Code

Select File

  • app.py
  • index.html

Custom assets

See on other platforms