DevReal: Introducing the Bee AI Agent Platform, Max Maximilien
Recording: DevReal: Introducing the Bee AI Agent Platform, Max Maximilien
yeah thank you hopefully everybody can hear me so the next 25 minutes I want to try to introduce you to a framework but also kind of discuss uh AI agents at least the way I see it um there's a lot going on this is all going to be live so things might fail so forgive me um but we're not going to have time to debug it but hopefully we can retry and we can try maybe some cool quick debugging so let's see how do I present this uh okay unsure ah here we go slides show all right perfect so it won't be a lot of sides we're going to move to code or to the demonstration soon um so here's the agenda we'll start with a demo very quickly then I want to talk about a little bit of the context so basically telling you what you just saw because it's going to be very simple but I want to kind of deconstruct it and looking at the code and then we'll go into more code more demos and then we'll spend some time on why I think we got there because uh I was chatting with Alexi and him and I both did Graduate Studies and multi-agent systems but it was like 20 years ago and all of a sudden all of this stuff is kind of new again right and my perspective is there's there's a series of things that happen and for some people it might be boring so we'll go quick on that then we'll look at a third demo where it'll be a little bit more interesting and obviously we can do even more demos so you know I want to en encourage you to think of uh things that we want to do uh if you want to try to we can build something very quickly and then importantly I want to finish with where do we go next because everything I'm going to show you is open source um you can go and try it yourself obviously I don't have time to kind of like show you how to build it but it's on GitHub so you can just go and check it out and there's an active community so you can just ask question um and then also importantly there's a lot of changes happening right now so what I'm showing you is a bit in some ways old there's new stuff and I'll show you a little bit of the new stuff but we hopefully have a future talk uh to do uh some of the new stuff that we're building right now that I'm not showing you okay and I'll have some parting thoughts so let's go straight to demo so the first demo is actually the full platform running so this is a version of the bii platform running on uh IBM Cloud that we you can sign up for it but we're not accepting new sign up so my suggestion is you you run it yourself right you can run exactly what you see here but we're running this okay so just as an introduction of b um let's build an agent okay and we'll go into the code okay so I promise so we build a new agent uh you can start from scratch obviously this is a UI right to make it a little bit easy and nice so we'll call this agent you know Alexi um and then we can ask him some question and we can have do work for us uh he's kind of nice so ask him to do some stuff and then the cool thing is um you can give description and you can also uh provide additional stuff but we're going to add more to it so we're going to build a basic basic agent nothing like basically no um no no additional features okay all right so we save that agent let me see all right launch it as a chat okay so it's Alexi and we can ask it uh like for instance we can ask it something like um um I don't know like uh uh what is cloud flare since we're at Cloud flare um actually uh I mean I use cloud flare obviously way so it it basically will respond so it's kind of like a regular chat right uh so you think of it that way but you can do more interesting things with it uh because as you know the chats the basic chat model for an agent is uh it connects to an llm and obviously my query here went to the llm the llm was trained with a lot of data uh we're running a local version of IBM Granite so it's pretty much like similar to a Lama big big uh model but it doesn't have current stuff and it doesn't have you know information like for instance today in San Francisco was pretty nice we can ask it like what's the weather here right and you'd expect uh let me make the font bigger in San Francisco and because it's not trained with local information it it needs something right so it says here oh I don't know I can I use Python to do this okay you know that's that it use python to find it and it's going to actually try to invoke something to find it in Python and you can see it found something and you can actually ask it how did you find the answer and it will tell you the details of it and you can see this is the code that it ran that it ran to get the result right so it called wttr to get the result so that's kind of nice okay that's cool but could we ask it for something more interesting like for instance I live in San Jose okay so I'm going to leave from here to San Jose so I could ask it what is the distance from uh San Francisco to sose and you could see that it will actually go and try to calculate it and it's going to use Python KN the two Cs and try to do GE find and it's about 41 so it basically you can see it's it's the agent can interpret what you said and can use the tools that it has to come up with the answer and we have more tools so I'll show you a little bit more of those tools uh and you can build those agent play around with it you can save them and build pretty much an app this is all running on the browser because we have two version of the framework one in Python that's just released yesterday and one in JavaScript so what I'm showing you here is obviously JavaScript okay so let's go back to slides quickly just to kind of look at you know so what you just saw like kind of think of um a little bit of how would you code this if you were to manually do this so let's go back to slides and the basic idea is that the llm is the brain right for the agent and the Agents they are different kind of Agents but one type of Agents is the agent that reason act and reflect and basically all of this can be done with llms and you can be somewhat automatic uh autonomous reactive Dynamic like I didn't have to tell it how to compute the distance between here and San Jose it figured it out okay so it's actually uh doing some work but how would you code this and we have a nice video by the way if you're interested where Maya the project manager goes into the details of the agent but this is the code so this is how a basic agent for in in typescript would be written and you can see you import the B agent uh theama uh chat uh it has some memory because you can ask question and it will remember the previous question and we'll get into more of this you create your instance of the llm you pass it to the agent you pass your memory so that there's some kind of inmemory database and then you pass the tools right so in this case here we're passing a do doo Tool uh open m tool which gives you a lot more details about um weather and then you just pumpt the agent so you run it by prompting and then you're observing what it does and that's how we were able to show you like how did I come up with that answer right and then you can log the results so that's basic JavaScript really typescript so you know a little bit different uh the basic stack that you saw has that UI that's also everything is open source so it's all there um it's in under construction okay because what you see we have a python version now and that's not integrated into the stack so we're trying to figure out how to do that but the good thing is again you can come and help us if you're interested in this so the developer experience is evolving uh but generally the idea is that it's L&M agnostic backend agnostic um open AI compatible to the extent that you know they don't come back and say nobody can use your our API you know maybe they don't do that and then we wanted to be Enterprise ready right because at the end of the day a lot of our customers or Enterprise customers so we want to make this the open source version but ready to take it into Enterprises if that's what you're interested in obviously python was a big priority for us we just released it yesterday and uh we uh evolving the developer experience so I'm not going to show you the new experience because it just released yesterday but I'll show you this much which is that we do have a python version so let me show you that so obviously in Python you could do things at the command line or fun fun fun you can use Jupiter so I have a nice Jupiter notebook of a basic so I created this today where we can go we can walk step by step on building the same agent that you saw but this time in code right so obviously you you pip install the framework uh and a few other things if you want to then you import the basic stuff I already pip in so so I don't have to do it again I'm running the granite uh model here so I'll show you that um so it's running locally so this is basically uh AMA running Granite uh probably you can't read this but you can see it here right so I'm running it locally on my machine and then then uh we can create an agent no tools right then we can ask that agent some questions so obviously a question that doesn't need a tool is something like what's the capital of California and it will show show back uh Sacramento and and then print the results so let me run that too so there we go then you can of course you can ask it more question I'll that but I'll add a tool so this is the open Meto tool and then we'll ask it for the weather in San Francisco so you can see from this python code that um we can now talk to llm that is running locally uh to me so it's using uh the fact that I'm serving that uh llm to my local port and then it runs now obviously your local llms tend to be small so it but they have enough that they can do stuff like for instance they would know the capital of California but something like what's the temperature it wouldn't know that so without the tool it would just not be able to give you that answer okay so that's basically how you would write the python version of all this um so let's go back to slides so that's basically what I just showed you so a little bit not complex but just in Python but the what I was mentioning before is how did we get here right like so what's the context I think in the research Community people spent a lot of time doing multi-agent system this is like the 80s 7s the whole idea there is to basically program what we seeing today but it's very I I believe that it basically gets us to a model where similar to how when you get to work if you're a manager and you want work done you don't come and you procedurally tell everybody I want to step a b c like we write code right now right instead you have a team so let's say Alexi is in my team I come to Alexi and I say Alexi I'm your boss uh we need to get a AI agent Meetup setup and then he goes and figures it out right that's how we're going to get to I think in the future so for me agents are like that and then when you have a lot of people like let's say all of us here if we decided to do something interesting we'd probably have to find a leader would probably have to decide or divide into groups and then agree on how to achieve the the goal that we have that's where we're going okay that's my belief in multi-agent system so this has been studied for a long time but obviously to get there we needed things like apis and you know the the fact that when I asked it for the weather or like for instance I ask it for the distance between San Jose and California it didn't know like how could it know that like there's no database where you can just plug in those two Cs and get a result right you have to compute it and the computation is that it found a way to comput it then it realized oh San Jose and San Francisco are two cities and I need to find the the the the uh cordinates for those and then plug it into the formula and then get the results right that's how so if you if we go back to um because maybe I didn't show you this all right so like when I ask it for the distance right how did it get the answer right so it basically went and and computed The Distance by using this this library right can I ask a Qui question yeah sure how does it how did it know San Jose California and not San Jose bah because it's yeah because we're close I mean we it assumed that it's the closest city to where I am but here a good question like in theory we could have asked it could you could probably set it the context to say that I want a global computation for uh distances if you wanted to build an agent just for that the kind of computation that you would need right um so back to slides a little bit um obviously Cloud Computing Made all of this possible because you know to be able to run all these and train them and GPU acceleration because without that we wouldn't be able to reach the point where we' be able to have those kind of llms right and then obviously all the good stuff that happened in and uh llms which basically and for me it's some of these main um you know points which is people inventing gradi in descent which allows you to uh you know refine your model your ml models coming up with newal networks which essentially are basically a bunch of uh uh combined um uh linear equations and then eventually getting to a point where we realize that we could recognize images and then you know compose those newal networks and build what we have now as llm so this is a very quick slide to show you like how did we get here a little bit more details on that especially because of the fact that people spend a lot of time years and years thinking of how you know language models could become as powerful as they are today but things like double descent which allow you to essentially keep training those further and further and then of course Transformer breakthrough from Google and then these days with things like gen and rag right so this is all how we get there but obviously I showed you a be that not that interesting so could we do something more useful especially for Enterprises so let me show you an example that I think is a little bit better uh more interesting um so let me so one thing you can we can do is I have a bill of material so this is a uh spreadsheet with uh materials quantity manufacturer report number prices and so on and you can see it's like a CSV file but I'm loading it into uh numbers so what we can do is we can pass that to the B and ask it some question about uh the deal of material so let me find it so this is the CSV file you can see right so we can tell it for instance uh you know show me summary statistics of Bill of material and what what I'm hoping it does is that it reads that understands what I'm saying by bu you know summary statistics imported into uh uh numpy and then show me right but we could do something even more interesting um we can ask it uh show me a graph of the uh quantity uh of quantity in bills of materials and hopefully Alexi will give us a graph of that so you can see it's trying to plot it so it has to import pip turn plot and then hopefully uh extract that data and plot it so there we go boom so the idea is that you know all of a sudden you now have one agent but we want to also get to multi-agent systems right where you can combine these agents so that's the that's one of the things we're working on next which is to improve that with um next one um I will show you very quickly on the on the like if we if we go to um oops what is it this guy yes so this is the the code base uh this is the one so if you want to help us give us a star here um and then in the python part of it right this is a good you can see we have a bunch of notebooks so you can go and try that but we have a bunch of examples and then some of those examples shows you also how to do workflows so one nice example of a workflow very simple where you can um sorry the python there we go and you can write your code like this where you can add a bunch of Agents so you build your agents with the UI right now and test them and then you can combine them in code eventually you will have that also in the UI so that's uh something you can want to try for yourself okay have about five four minutes left let me um finish the slides and then I'll take some question and then we can go back and try other things so what where do we want to go okay because I think this is I think right now the framework is ready for you to go and try it and play around with it there are people doing really really cool stuff for instance I have a you know you can you somebody um built one where you can drop a um uh a uh presentation uh like a a paper sorry uh since we're in research and it will create the presentation for you so we created a bunch of those but one thing I want to show you uh before we go is the tools and how you can build tools um so let me do that first and then we'll go into the challenges okay so I have a tool ready um let me just copy it um there we go um and then we'll go and add it to the B so one thing you can do is you can enable those different tools that we mentioned so these are the sort of the agent details right then you can go and edit and add a new tool so here are the tools you can add a new tools basically tools are you know uh meaning so do El oops oh did I make a mistake on my python oh all right let's see all right I have another agent already with the tool so I'll go to that um so I think I did it here so we can go to the tools you can see different tools here and you can browse available tools eventually and we can uh add let me see what's going on here all right let's see there we go so one thing I can ask this um so if we go to the previous one right the Alexi and we ask it um an interesting question so like what is the meaning of life you will take and go to the lam and ask it and you come back with a interesting question right answer that is pretty complicated but if we ask the other one where I have a tool I'm hoping that it uses my tool which is to give meaning to anything and okay didn't because I didn't enable it so we can enable that tool sorry about that or did I use the which one I test agent yeah there we go so enable that one and what I want it to do is to use my tool to answer the question meaning of life right so I forgot to show you this this thing and then we can say yes use that so hopefully comes back oh it's not using the tool did it did I enable it yeah okay all right okay so it's keep it keeps bypassing my question all right explicitly tell it to use the Tool uh yeah yeah I can try that it like it tries to use the yeah but it should have entered it in a way that I didn't so I wanted it to say 42 so it did use it but it didn't put the result so we can figure out why so that's why the function at the end of the question didn't summarize it it didn't summarize it yeah that's true all right so let's go back to slides and finish up and then we can go more yeah we can ask questions yeah for sure for sure so obviously things we need to do are things like for instance coordination and orchestration so obviously finding tool reusing agent reusing tools that's key because as you can see these agents you got to kind of build them and try them and add tools to them and test them and so on and if El can do this we can definitely do some of those challenges right um I think there's a lot of ux and Social Challenges especially around discovering your agents the security of your data that's why you see us asking do you want us to use Python allowing it right that's important cuz without that it's going to be a huge problem if you have your agents in Enterprises and then they start querying the web and doing things that you don't expect how do you build trust in reputation that's important right so those are all things governance is a huge challenge right like you have all those tools how do you where do you get them how do you trust them the data the agents contracts for agents I think that's important so that agents actually do what you expect them to do um and then of course you know for me the key thing is going to be to finally realize that vision of multi-agent system but it's going to be by focusing on those engineering challenges right the llms will keep getting better but how do you program it how do you program it to do what you want and that's the challenge that's what I'm trying to get to so let me stop here and see if you have questions but we can go back to slides at any point in time and get some questions yes thanks so much I'm going to bring the mic to v wait yes um so why the what's the point of a multi-agent system why can't you just give more tools to One agent yes good question excellent excellent question so the way you see it confused with my simple addition of one tool and the fact that it could find the answer differently that's the reason that's one of the reasons but basically I think it B it's it's a lot of people are focusing on trying to do AGI right So eventually you could have an AGI and then you would build an agent with that AGI and then therefore you could just ask at everything I think there's a bunch of flaws to this the first thing is that there's going to be many agis that's one thing you could see that with deeps second is going to be calling that AGI is going to be expensive so why do you need an expensive agent to do trivial things like we just did you don't and even if you think of the work you do at an Enterprise most of the time you don't need a super intelligent person or agent so it's a lot cheaper to have a bunch of small agent and also I think importantly it's also you're going to get better results because what we've seen is when you start adding an agent that can do everything it starts getting it starts hallucinating all the time whereas when you have purpose-built agents because in each agent remember part of the reason I didn't get some of the results I wanted is because I didn't put the context but you can go in the agent and set the context that you want that agent will always do that so for instance um one of my demos is to show you uh you know summarization stuff for research we build an agent that just does that so whenever you need that kind of work you go to that agent it exactly mimics how we live in life no one person is super human we have a bunch of people work gets done by aggregating so that's the reason one more question so so ah yes yeah um what is the biggest challenge that you see uh Enterprise customers adopting AI agents everyone is building AI agents but um you know our Enterprise is Enterprise ready for it and what's the Gap and that's a good question I so there's a lot of things but you said what's the one thing um I feel that we I Alexi asked me a similar question earlier today and I'll use a part of the answer to him which is that we're at the very early stages of this where there's going to be hundreds of these Frameworks and thousands of these llms so the combination and the The Innovation is happening right now so in a Cambrian explosion and I think that enterprises will not want to commit on any one of them and the ones that you want to use need to be open source open governance and be welcoming to not only you using it but also you contributing to it and decide I want to do my own thing keep it myself right so that's the key I think that's the place where Enterprises are going and I think the Deep seek um sort of wakeup call for llm is exactly showing this right like everybody knew that was going to come and all of a sudden you saw it right that um open source version of llm is even better than what people thought and I think it's the same thing here so I think the value of this Frameworks is going to be the one that's open source that's most welcoming that's most open and that tries to embrace everything else so I would welcome you all to join us in this journey and if you want to help us uh build Bai uh you know it's it's all there so everything you saw here you could do it yourself but you have to deploy it on your own systems right obviously so all right I than good all right thank you question I'll be here I'll be here until the end yes and now next