Forget CrewAI & AutoGen, Build CUSTOM AI Agents!

Поделиться
HTML-код
  • Опубликовано: 3 июн 2024
  • If you are developing AI agents or multi-agent workflows, it is often better to create your own custom agents rather than relying on existing frameworks like CrewAI or Autogen. In this guide, I will demonstrate how I developed a simple custom web search agent in Python and explain why custom solutions are superior to the current one-size-fits-all frameworks available.
    Need to develop some AI? Let's chat: www.brainqub3.com/book-online
    Register your interest in the AI Engineering Take-off course: • Building Chatbots with...
    Hands-on project (build a basic RAG app): www.educative.io/projects/bui...
    Stay updated on AI, Data Science, and Large Language Models by following me on Medium: / johnadeojo
    GitHub repo: github.com/john-adeojo/custom...
    Function Calling Article: / how-to-use-openais-fun...
    Function Calling Video: • OpenAI Function Callin...
    Chapters
    Introduction: 00:00
    Agent Architecture: 01:10
    Python Code Walkthrough - Setup: 04:50
    Python Code Walkthrough - Prompts: 06:55
    Python Code Walkthrough - Web Search Tool: 11:15
    Python Code Walkthrough - Agent: 21:08
    Testing the Custom Agent: 28:48
    Why Build Custom: 38:15
  • НаукаНаука

Комментарии • 101

  • @rodrigoamora
    @rodrigoamora 10 дней назад +13

    I have used AutoGen, CrewAI and other tools. Honestly, they are not production ready. They are over engineered. What I've learned from building my own tools will be very useful for the future. Learn as much as you can building your own tools, its a lot simpler than most people think, just give it a shot.

    • @tonyppe
      @tonyppe 4 дня назад

      I have been contemplating this for the past few months. But I am still stuck getting around all this python and open source projects.
      It doesnt have to be so complicated. I can do a lot with a simple web ui that allows taking the output of one LLM and sending it to another (conversation).

  • @matten_zero
    @matten_zero 18 дней назад +8

    We need a framework that is very easy to use that is very clear qnd well documented. Right now unless you are a very very experienced dev its is hard to understand these frameworks. I now build my own functions from scratch (loaders, memory, tools) and just reuse them between projects. For one it helps me understand my code fully and know where to debug. Ive tossed the idea around of building a repo of LLM-related objects that are modular and that anyone can use and understand and customize further as they like.

  • @freedtmg16
    @freedtmg16 19 дней назад +15

    Dude I've come to the same conclusion like in the last week. The timing for this is on point.

    • @sheaspop
      @sheaspop 13 дней назад

      Same same. For browser based open ended tasks in particular

  • @darwinprod
    @darwinprod 20 дней назад +15

    This makes the most sense I've seen on the subject in a long time.

  • @CustomGPT.AIAcademy
    @CustomGPT.AIAcademy 19 дней назад +2

    Very Practical Approach. CrewAI is a distraction at the moment when people can spend less time and money just learning api and function calls

  • @arinco3817
    @arinco3817 19 дней назад +1

    This is so so good! I'm so into these agentic workflows myself, it's really cool to see how other people go about connecting things up

  • @technovangelist
    @technovangelist 10 дней назад +1

    So many on my channel and my live streams have also indicated this frustration with the agent frameworks. The function calling in ollama is pretty rock solid but many frameworks have problems with it so that’s frustrating too. Thanks for putting this video together.

  • @danielpaurat1783
    @danielpaurat1783 11 дней назад +1

    Your conclusion matches my experience in every point spot on! Well put into words.

  • @RayWrightRayrite
    @RayWrightRayrite 17 дней назад +1

    Thank you so much for this video!!❤❤❤. This is exactly what I was looking for. I will definitely check this out and see what results I get!

  • @MrAhsan99
    @MrAhsan99 День назад

    Man, you are dropping gems! Thanks for posting and sharing amazing content and tips.

  • @sobukwelu
    @sobukwelu 20 дней назад +2

    Thanks for creating an alternative to using these tools. And keep creating great content!

  • @taylormcclenny1416
    @taylormcclenny1416 19 дней назад +2

    Wow. Thanks for making this code available, my man! Great stuff.

  • @donconkey1
    @donconkey1 4 дня назад

    What a delight it was to discover your channel! You speak clearly and provide details at a pace that is easy to understand. Great job unpacking popular agent frameworks and custom agents. Excellent video, presentation, and materials. Thanks!

  • @TheFocusedCoder
    @TheFocusedCoder 20 дней назад +1

    Fantastic work here this is massive to see the process!

  • @yt-caio
    @yt-caio 20 дней назад +2

    I like your take regarding customization. I also felt that the moment you start customizing the mentioned frameworks it is a bit a hassle since you get constrained by their pre-defined workflow structure. I decided to make prototypes with langchain since it is more modular and has lots of features that works more like building blocks than a framework. Great content, cheers.

  • @ARCAED0X
    @ARCAED0X 18 дней назад

    Woooo great work datacentric. Following from my last comment on the previous video my idea of narrowing the problem space was correct. Also my predictions for Open AI's GTP4o release 😅. Time to build some custom optimised agentic workflows 🎉🥳

  • @Bana888
    @Bana888 20 дней назад +2

    Great rationalization and analysis. There's always pros and cons for both approaches. It's the convenience and quick ramp-up vs performance and targeted implementation. Would be great if you can somehow come up with a hybrid approach, i.e. just enough of a generic framework to ramp up but customize areas requiring more performance. Looking forward to your evaluation of AutoGen customization.

  • @robsoncoutinhoti
    @robsoncoutinhoti 8 дней назад

    Thank you, my brother, for sharing your knowledge. This video is very helpful for me because I'm creating a new feature and I'll use agents to accomplish my needs. This video provides me with many insights.

  • @augustus6660
    @augustus6660 17 дней назад +1

    Your content is simply incredible.

  • @NicholasPanek
    @NicholasPanek 5 дней назад

    Very well thought out and appreciated

  • @JulianHarris
    @JulianHarris 20 дней назад +4

    A great follow-up to this - as you’re creating input /output pairs could be to optimise the prompts by using DSPy with 5-6 combinations. AFAICT DSPy currently would need a model for each agent.

    • @Data-Centric
      @Data-Centric  19 дней назад +1

      I did something on DSPy a few months ago, it might be worth revisiting it to see what has changed with the framework.

    • @varunmehra5
      @varunmehra5 12 дней назад

      @@Data-Centric Please do share

  • @alexpippitt8015
    @alexpippitt8015 2 дня назад

    I dont make comments, usually. But this teaching video is wonderful! Excellent job coviering the tool and because you speak so clearly and at a speed I can easily understand, I subscribed. I too have tried the other frameworks and found them lacking. I am lookinng forward to setting up some tools to test. And because it's not quite ready, I am thinking about a creating a eval/measurement agent tool to collect the results. Thank you very much.

  • @jakeparker918
    @jakeparker918 10 дней назад

    Just started this video but looking forward to it. Definitely saw limitations due to the abstraction of CrewAI and Autogen. Recently learned about LangGraph but this looks like some nice next level customization.

  • @jenniferkanyunyuzi6693
    @jenniferkanyunyuzi6693 18 дней назад

    This is good. Thank you. I have immediately subscribed. Looking forward to more useful videos like this from your channed

  • @sanesanyo
    @sanesanyo 18 дней назад

    Good stuff mate. You got a new subscriber. Keep it up!!

  • @amusendame
    @amusendame 9 дней назад

    You provided great insights here. I think this is where phidata comes in also. It allows you do define prompts for each agent you create. However custom builds are always the best

  • @thepetewinn
    @thepetewinn 19 дней назад

    Great video I was just weighing up hand crafting agent workflows versus crew :)

  • @eagleeyedjoe0075
    @eagleeyedjoe0075 19 дней назад

    This is an excellent tutorial, thank you

  • @NoCodeFilmmaker
    @NoCodeFilmmaker 20 дней назад +2

    Awesome video and love the way you explain and code bro

  • @aimademerich
    @aimademerich 20 дней назад +4

    My new favorite channel!

  • @dieter6375
    @dieter6375 20 дней назад +2

    Great video! I'm still conflicted about whether to build agents myself (I'd use a state machine for the agents) or to use LangGraph, which handles much of the foundational work while still allowing for high customization of the agents.

  • @vastvitamins1966
    @vastvitamins1966 19 дней назад

    Great video thanks. Did you build the scaper from scratch if so what are some ways you think it could be better?

  • @yuzual9506
    @yuzual9506 19 дней назад

    Thanks for your project and your code. I want to use this kind agent in my new work. I will start as an assistant researcher engineer in my university, and help the documentalist, with agents.

  • @JohnBoen
    @JohnBoen 17 дней назад

    Exactly.
    Autogen - you have to put the agent interaction logic in the prompt.
    CrewAI lets you properly create a workflow, but it just is not how I would do it.
    That is kind of what I worked on this week. I'd made a decision to use LangGraph, and well...
    Thanks for showing me your ideas :)

  • @briangbhawaii
    @briangbhawaii 20 дней назад

    Thank you for doing this video. I was coming to the same conclusion as well. Great job! RE: Lower-level models have been garbage and expensive. I'm sure I'm using it wrong but it solved it with higher models.

  • @MrDonald911
    @MrDonald911 16 дней назад

    yes I realized the same thing long time ago with langchain to build RAGs.

  • @madhudson1
    @madhudson1 20 дней назад

    after some experimentation, I had exactly the same sentiment. Although I still use langchain. I do like langgraph though as i feel like you still retain a lot of control

  • @harshraj67
    @harshraj67 6 дней назад

    Great Video, is there any way to use groq api?

  • @benh8199
    @benh8199 20 дней назад +5

    There’s a competitor to autogen and crewai called Agency Swarm by VRSEN. I haven’t used it yet but the author claims you can customize all prompts, including the framework/hidden prompts. Would love to hear your evaluation/opinion about this framework and whether it’s a good hybrid in between autogen/crewai.

    • @JonathanLyon
      @JonathanLyon 20 дней назад +3

      agreed, I'd love John to evaluate Agency Swarm

    • @Data-Centric
      @Data-Centric  19 дней назад +7

      A few people have mentioned Agency Swarm and Lang Graph now. I'll see what I can do :)

    • @jarad4621
      @jarad4621 19 дней назад

      ​@@Data-Centric Thanks agent swarm please rather not langraph as its likely not production ready as it's langchain. A swarm lóoks amazing. Also check anything llm, very promising enables function cals for models that can't usually do that

    • @trezero
      @trezero 19 дней назад +5

      Agency swarm is not using open source though. You'll still be paying openAI for every task. There is little point in my opinion to compare open source frameworks like Autogen or this custom way of building agents as the large commercial pay as you go processes. The power of open source agents is really seen when combined with open source models so that you can have a completely secure, cost controlled, on prem, air gapped, solution. IMHO.

    • @benh8199
      @benh8199 19 дней назад +1

      @@trezero as per the authors latest video, agency swarm now allows you to use any LLM, including open source models, although he still recommends OpenAI

  • @jeffdavis5196
    @jeffdavis5196 5 дней назад

    Agreed, it seems all these frameworks are made from very simple code. That's not to say we can't look at the code in these frameworks and figure out how to do specific things, and see the prompts many of them have come up with to speed up the development of our own agents -- especially since they are all generally MIT licensed. Also, I'd have to say it seems like many of these frameworks encourage too much be done with the LLM's including many things that could be done with "classical" (lol) automation and machine learning techniques both faster and cheaper -- that seems to be commonplace among agent examples.

  • @petsol
    @petsol 20 дней назад +1

    Great video! I'm a little bit confused when you create a WebSearcher instance within a function of the WebSearcher object. What is the point of that, Why not just use self?

    • @Data-Centric
      @Data-Centric  19 дней назад

      I think you're right here, could just use self!

  • @vl231
    @vl231 19 дней назад

    Firstly Thank you for your Works here you make things easy to understand.secondly is there anyway we can talk only 5 min via discord or someother apps? Thank you again

  • @morease
    @morease 19 дней назад

    Reliable function calling is up to you when developing the tools the agent use. On a side note, you could just have used a boolean in your function and let the LLM figure it out instead of responding with yes or no ;)

    • @morease
      @morease 19 дней назад

      I implement “best of x tries” approach to get good quality outputs, and use a retry loop in case output validation fails…in that regards I like langchain’s output parser and am nog against mixing different parts of frameworks

  • @martintmv
    @martintmv 18 дней назад

    Great video

  • @SolidBuildersInc
    @SolidBuildersInc 19 дней назад

    I am very impressed with the Pure Python approach to building agents. Kudos
    With that being said, have you thought about how to allow the agents to be self constructed from a control sheet to define roles, task and outputs via .csv or .toml file?
    It seems that the more you understand the structure, the more feasable it is to automate the construction of the code, maybe via Flask.
    Thank you for sharing and for any feedback on this approach.....
    Why....?????
    Client Instant Gratification.
    It would be nice to listen to their needs and have a reasonable prototype to demo instantly.

  • @Dis-Trackted
    @Dis-Trackted День назад

    Great video! Does anyone know about a similar walkthrough for building AI Agents in JS/Typescript?

  • @jimbig3997
    @jimbig3997 19 дней назад

    So should I import a module called "BeautifulSoup" or a module called "crewai"? Which do I trust more not to compromise my system?

  • @laritaharrington1117
    @laritaharrington1117 19 дней назад

    Hello do you do any mentoring? I’ve trying to solve some workflows and I’m bound by my inferior knowledge of code. I know what I want to accomplish but coding isn’t my strength.

  • @juanpasalagua2402
    @juanpasalagua2402 13 дней назад

    Awesome!

  • @morease
    @morease 19 дней назад +1

    I’ve gone the custom road before, and have moved back to autogen now that they have a custom speaker selection function that allows all you need to control agent workflows, and it finally makes it work the way you want…did you try it?

    • @morease
      @morease 19 дней назад

      Ha, did not finish the video and just heard you say you didn’t…I suggest you try it!

  • @wowzerxx526
    @wowzerxx526 18 дней назад

    Love the work bro, no hate! But why would one develop something of this nature when you can just directly ask chat gpt 4 and will get the same solution?

  • @jasonb_
    @jasonb_ 17 дней назад +1

    You’re right, open source libs are helpful to get started but writing your own stuff is the only way.

    • @jordanallen9536
      @jordanallen9536 16 дней назад

      If you start from scratch every time, you'll be lucky to get anything meaningful done. If you do, maintenance will kill it. Frameworks and open source projects thrive for a reason. Only venture off when you're damn sure it's worth it

  • @maxh96-yanz77
    @maxh96-yanz77 15 дней назад

    we need clean and honest review rather that hype. Also for individual project open source and open LLM is more desireable . Could you please make video for this 🙏🙏🙏

  • @st.3m906
    @st.3m906 20 дней назад

    I agree 100%

  • @ntisithoj
    @ntisithoj 19 дней назад +1

    Great video! Thanks. I have tweaked the code to make it run locally using a model that supports function calling (NousResearch/Hermes-2-Pro-Llama-3-8B)... to avoid the crazy costs, as you have noted elsewhere. Unfortunately, the JSON returned in `generate_searches` is missing `choices[0]'.message'['tools_call']`. I have tried other models as well Ollama and LM_Studio. Is there a different way, if you happen to know, how to add tools to non-gpt models that specifically support function calls?

    • @Data-Centric
      @Data-Centric  18 дней назад +1

      Thanks for this. I suspect you will have to adapt the generate_searches function to return the search results from the JSON. Haven't looked into using this script with local models myself but that's my best guess.

    • @vispinet
      @vispinet День назад

      @@Data-Centric the problem is that the search results are not returned in the JSON. Unless I'm missing something...

    • @vispinet
      @vispinet День назад

      did you find a solution?

    • @ntisithoj
      @ntisithoj День назад

      @@vispinet Thank for replying. I don't have the project in front of me ATM, but, the app code was returnign JSON, no? I was just using the JSON that the app returned. I will look into it some more.

    • @ntisithoj
      @ntisithoj День назад

      @@vispinet No. I have gotten lost in CrewAI for a bit, which is a royal PITA, and why I was looking at data-Dentric's solution, but after some days of not being able to figure out how to access/manage the internal fucnctions to get the 'coices' field, and went back a Crew. Sadly, I am not at a level of understanding witrh it comes to AI and Python to solve such esoteric problems :(

  • @vaioslaschos
    @vaioslaschos 9 дней назад

    Is this really true for langchain as well? I thought is totally customizable.

  • @themax2go
    @themax2go 18 дней назад +1

    instead of "crafting" prompts and specific flow why not rather have all of that created using a "generative ai prompt engineer" and "workflow" agents that genetate those required components from a prompt and / or diagram

  • @MD0074707
    @MD0074707 19 дней назад

    Respect!

  • @aimademerich
    @aimademerich 20 дней назад

    Phenomenal

  • @Bakobiibizo
    @Bakobiibizo 19 дней назад

    agreed

  • @terbospeed
    @terbospeed 20 дней назад

    I wanted an apple pie so I had to invent the universe. After I tried looping LLM output back into itself I laughed, but still trying to figure out the next steps.

  • @themax2go
    @themax2go 18 дней назад

    why not run it using local llms and then no token costs...

    • @Data-Centric
      @Data-Centric  18 дней назад

      You planning on using Local LLMs in production then?

  • @mchl_mchl
    @mchl_mchl 20 дней назад

    Yeah also don't need to re-invent it - those frameworks are a great place to learn how those general use cases work on the backend.
    You can even paste that code into a gpt and learn how it works.
    Building "custom" is usually like 80% of something that already exists, and applying 20% custom code for specific use case.
    the prompt engineering, data ETL, and general problem solving / critical thinking is the hard part - imo

    • @mchl_mchl
      @mchl_mchl 20 дней назад

      Great video - Always love your mindset on these workflows!

  • @TestMyHomeChannel
    @TestMyHomeChannel 18 дней назад

    Great video. I love the simplicity of it. I however could not get it to complete the task. It only found the city and the date. But whatever changes I made, the integrator did not assign the weather forecasting task back to the planning agent. It always said you can go to accuweather and find the information yourself. Could you please advise? Thanks,

  • @JulianHarris
    @JulianHarris 20 дней назад

    Yeah thanks for doing the legwork on this. I might see a point to crewAI in future but a bit like Langchain it feels like it adds a lot of boilerplate and complexity for little gain. Particularly in this day and age where 50-90% of the code anyone writes is AI-copiloted anyway.

  • @NA18NA
    @NA18NA 18 дней назад

    👌🏾

  • @TheStubLord
    @TheStubLord 3 дня назад

    This is great but i am perplexed you are not using linux 😮

  • @jordanallen9536
    @jordanallen9536 17 дней назад

    Your title is completely misleading. I'm well aware of function calling and other features of various LLM APIs. How do I accommodate hierarchical processes, shared memory, and custom routing? Sure, I could build my own logic, but why "reinvent the wheel?" Your example gets nowhere close to the complexity that CrewAI is capable of. As a dev, it shows a complete lack of respect for the devs that built those frameworks. Unsubscribing.

  • @ankeethsuvarna1390
    @ankeethsuvarna1390 19 дней назад +1

    I like to mix both Code and No-code. Tool call can simply be an API call to a workflow in n8n, Make or Zapier. gpt-4o if cheap would be perfect model for this

  • @toromanow
    @toromanow 16 дней назад

    I'm not getting the same results. For your sample prompt, "What is the current weather forecast in the city where the next olympics will be held?" I get: "Final Response: The next Olympics, the 2024 Summer Olympics, will be held in Paris, France, from July 26 to August 11, 2024 (source: [Wikipedia](en.wikipedia.org/wiki/2024_Summer_Olympics)).
    Now, let's find the current weather forecast for Paris, France." (stops and exits right here)