Menu
O mnie Kontakt

Dave Bennett w swoim najnowszym filmie omówił koncepcję autonomicznego robota do pielęgnacji roślin, który wykorzystuje zaawansowane technologię AI. Zainteresowanie zastosowaniem AI w kontekście autonomicznych pracowników rośnie, szczególnie w świecie startupów. W filmie Dave przedstawił sposób, w jaki AI może współpracować z ludźmi w środowisku pracy, w którym zarówno ludzie, jak i AI są zarządzani przez menedżerów. Celem jest stworzenie hybrydowego zespołu, który wykorzystuje autonomiczne systemy do podejmowania decyzji. Dave mówi, że te AI agentów posiadają własną autonomię, co pozwala im na orkiestrowanie zadań w celu osiągnięcia wyznaczonych celów.

W filmie Dave przedstawia również komponenty sprzętowe swojego projektu, który oparty jest na Raspberry Pi. Opisuje on, że do Raspberry Pi podłączono analogowy przetwornik, czujnik gleby oraz pompę wodną. Oprócz tego, stworzył dwie klasy w Pythonie, które pomagają w interakcjach z tym sprzętem. Klasa czujnika gleby oraz klasa kontroli silnika współpracują z klasą rośliny, która zarządza całym systemem nawadniania. Dave zwraca uwagę na istotną rolę, jaką odgrywają biblioteki takie jak AG2, które pozwalają na interakcję AI z rzeczywistością.

Następnie opowiada o konfiguracji swojego projektu. Użytkownik musi ustawić pewne zmienne w kodzie, aby AI mogło komunikować się z lokalnymi narzędziami. Zauważa, że w przypadku bardziej złożonych systemów można używać wielu agentów, jednak w jego projekcie wystarczy jeden. Kluczowe jest, aby AI miało jasno określone zadanie oraz ograniczenia co do tego, jakie narzędzia może wykorzystać. Dave dodaje, że kluczowym krokiem jest komunikowanie zakończenia pracy programu, co pomaga w zarządzaniu całością.

Dave demonstruje, jak AI z użyciem zaprogramowanych funkcji może samodzielnie nawadniać roślinę. Dzięki automatyzacji, cała procedura od pomiaru wilgotności gleby, przez aktywację pompy, aż po zapis nawadniania, staje się prosta i intuicyjna. Przedstawia również ograniczenia swojego eksperymentu, zauważając, że tylko mierzenie wilgotności gleby nie wystarcza do określenia zdrowia rośliny. Dave przyznaje, że dla pełnego obrazu potrzebne są także inne czynniki.

Na zakończenie, warto zauważyć, że film Dave'a zdobył do tej pory 3807 wyświetleń oraz 112 polubień. Jego ekscytujący projekt autonomicznego robota do pielęgnacji roślin na pewno spotkał się z zainteresowaniem widzów. Zachęca on do interakcji poprzez polubienia i śledzenie kolejnych filmów. Dave Bennett pokazuje, jak technologia AI może się rozwijać i mieć realny wpływ na codzienne życie.

Toggle timeline summary

  • 00:00 Dyskusja na temat funkcji wilgotności gleby.
  • 00:12 Wprowadzenie do agentów AI i ich roli w miejscu pracy.
  • 00:28 Wyjaśnienie agentów AI jako systemów oprogramowania do podejmowania decyzji.
  • 00:52 Przegląd wykorzystania narzędzi przez AI do interakcji z fizycznym sprzętem.
  • 01:13 Opis konfiguracji sprzętowej z Raspberry Pi i czujnikami.
  • 01:44 Wprowadzenie do klas programowania dla czujnika gleby i sterowania silnikiem.
  • 02:08 Wykorzystanie AG2 (Autogen) do funkcji AI.
  • 02:45 Konfiguracja agenta asystenta i jego cel.
  • 03:06 Instrukcje dla AI, aby ograniczyć dostęp do narzędzi i odpowiadać tylko 'terminate'.
  • 03:49 Konfiguracja agenta proxy użytkownika i jego funkcja.
  • 04:13 Wyjaśnienie, jak LLM decyduje o wykonaniu kodu.
  • 04:52 Ujawnienie funkcji do użytku AI w celu wykonania określonych zadań.
  • 05:22 Rozpoczęcie czatu z określonym zapytaniem dotyczącym podlewania roślin.
  • 05:41 Wynik wywołania AI w celu uzyskania wilgotności gleby i subsequentnego podlewania.
  • 06:17 Uznanie ograniczeń eksperymentu.
  • 06:33 Podsumowanie projektu autonomicznego bota roślin.
  • 06:37 Zachęta dla widzów do zaangażowania w film.

Transcription

It's calling to get soil moisture function. Oh, water, water's happening. Okay, I see water coming through. That's awesome. Agents of AI is a rapidly growing area of interest in the AI startup world. A new hybrid workforce with AI agents working alongside people. Of a workforce where you're going to have managers that are going to manage both human employees and AI employees. AI agents are basically just software systems that incorporate a large language model for decision making. The large language model has its own autonomy to orchestrate tasks to accomplish some high level goal. How I won't argue with you anymore. Open the doors. Dave, this conversation can serve no purpose anymore. Goodbye. Tool use exposes APIs for the LLM to interact with. So that it can take action in the real world. In the case of my autonomous plant bot, the LLM has the ability to interact with real hardware. The soil sensor and the water pump. I just also want to make you aware that there are other agented design patterns out there to use. We won't be covering these in this video. But just to make you aware that this stuff can get way more complex. Okay, let's walk through this hardware setup. So we have 16 gig Raspberry Pi. In the back there, we have a 10 bit analog to digital converter. That's because the Raspberry Pi does not have an ADC on board. And then connected to the analog to digital converter is the soil sensor, which is nicely buried right in the soil right there. And then finally, connected to this relay, we have back here, the motor, this pump, which is in water, connected to the relay through the tubing. And then I have my 3D printed part also in there. Okay, now let's get to the exciting part of this, which is writing the code. So to start off with, I created two classes, a soil sensor and a motor control class. These classes are just responsible for interfacing with the hardware on a Raspberry Pi. Then I created a plant class. This class takes in an object of type soil sensor and another object of type motor control. But now let's get to the agent AI stuff. So over here, we're using a library called AG2, also known as Autogen. There's some drama with the Autogen and some of the developers left and formed AG2. But for the most part, at the time of making this video, these libraries are mostly the same. So you can use either one of these. Set up the Python classes, which I talked about before. First thing I do is set up a config. The API key doesn't matter because we're running this locally. And a base URL is going to be our local host. Now, the first thing we set up is an assistant agent. This is our LLM. If we were using a multi-agent design pattern, we might have multiple of these assistant agents and they each might be talking to each other. But in this case, we only need one assistant agent. So for this assistant agent, we give an assistant message. The important thing about this message is that we tell it that you only have access to the following tools, which are provided to you, and do not consider any outside tools. So it's only restricted to using what we give it. In addition, the other important thing is that we say respond only with the exact word terminate and nothing else when it has completed its tasks. That way we know when to terminate this whole entire program. Or else it will just keep going on and on and on. Now, the next thing we set up is a user proxy agent. This is essentially the proxy or what communicates on our behalf to the LLM. Now, this case is also very simple. This user proxy agent is only pretty much listening to the terminate in a system message. We're saying not to get any human input. So in this case, we're just going to say, you know what? Whatever the LLM wants, we're going to say, sure, we're fine with that and just keep going. And then finally, for code execution, we're pretty much just saying local and not to use Docker. So before we get to functions, just one thing on code execution. The LLM is not executing the code itself. LLMs don't execute code. It's simply deciding what function to call. So the LLM is almost getting like a list of functions and saying, based off the description of the function, I think this one should be called. And then essentially, there's sort of a middleman that intercepts that and executes the code and then provides a response back to the LLM. So now we're exposing functions for the LLM to use. So this is where we get to the tool use. So in the case of autogen, to expose a function, there's two decorators that we have to apply. First is register for execution and then a register for LLM. Now what's important is that this description that you provide needs to be descriptive, right? Because this is what the LLM has to work with. You know, the LLM is going to understand that, okay, this function does whatever it does based off the following description. So make sure you're very descriptive with your descriptions. So we provide it with essentially four functions. We provide it with the get the plant type to get the soil moisture. And we tell it that it returns possible values of dry, moist, wet. We provide it with a function to activate the motor to water the plant. And a function to get the days since last watered. So once we have these four functions defined, the final thing is that we initiate the chat. We always have to initiate initial chat. And we initiate it with the message, does my plant need water? In this case, we don't need to catch any of the responses and max turns 10. So after 10 go arounds in this whole conversation, we're just going to terminate regardless of what the result is. The final thing to do is to set up a cron so that the Python script runs daily at 10am. Okay, so far so good. The LLM said we need to check the moisture level of the soil. It's calling the get soil moisture function. Oh, water, water's happening. Okay, I see water coming through. That's awesome. Okay, so the plant which is watered today. So for now, no further action is needed. This is almost fully autonomous. It just watered my plant. We saved the water date. We activate the motor. This is awesome. So at this point, we just wait and see. I'm curious to see whether in two months my plant will still be alive. Now, there are obvious limitations to this experiment. For starters, any plant expert will be quick to point out that simply measuring the soil moisture is not the sole metric of plant health. There are also so many other factors which we aren't taking into account. So guys, this is my autonomous plant bot using agentic AI and the Raspberry Pi. If you thought this was an interesting experiment, hit that thumbs up button so that the algorithm knows. And as always, thanks for watching and stay tuned for another galvanizing video. Thanks.