AI Engineer Beginner Project 1: Agentic Behavior (Full Code)

Поділитися
Вставка
  • Опубліковано 7 сер 2024
  • To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/AllAboutAI . You’ll also get 20% off an annual premium subscription
    👊 Become a member and get access to GitHub and Code:
    / allaboutai
    🤖 AI Engineer Course:
    scrimba.com/learn/aiengineer?...
    📧 Join the newsletter:
    www.allabtai.com/newsletter/
    🌐 My website:
    www.allabtai.com
    In this video I share a ai engineer beginners project where you can create a agentic behavior using two llm apis and adding text-to-speech and adjusting the prompts to your needs and intereste
    00:00 Agentic Behavior Project
    02:00 Brilliant
    03:18 Full Code
    15:00 Testing the code
    19:17 Conclusion
    This video was sponsored by Brilliant
  • Наука та технологія

КОМЕНТАРІ • 38

  • @AllAboutAI
    @AllAboutAI  4 місяці тому +1

    Brilliant: To try everything Brilliant has to offer-free-for a full 30 days, visit brilliant.org/AllAboutAI . You’ll also get 20% off an annual premium subscription

    • @RowanSheridan
      @RowanSheridan 4 місяці тому

      Bot replying to your own posts 😂

  • @kamelirzouni4730
    @kamelirzouni4730 4 місяці тому +2

    Another fascinating project! I really appreciate the integration of agents' thought processes, adding an explanatory layer to their interactions. Exploring creative interactions in unresolved areas could be intriguing.

    • @AllAboutAI
      @AllAboutAI  4 місяці тому +1

      thnx :) yeah, i really enjoyed playing around with this. i'm just exploring some ideas for how ai systems could have more natural and thoughtful conversations in the future. lots of interesting avenues to explore there! let me know if you have any other questions.

  • @xspydazx
    @xspydazx 8 годин тому

    now you can save the audio to a dataset for training a model on audio conversations : your first chat audio dataset!
    Nice one !
    I like your codes as they are very simple ! and it shows that you do not need to make complex systems to make something work ... Plus they are always fun too !
    I think they were not supposed to be reading each others thoughts ?
    Just the responses : maybe you should have chopped the thoughts out of the next posting to the messages ( extra step ) then they would be talking like us and not sharing thier thoughts with each other but keeping them in : becasue they did not want ot fix the code lol..

  • @user-ru1qz1bo2q
    @user-ru1qz1bo2q 4 місяці тому +3

    This is very helpful, Kris! I've been wanting to play around with building agents but the 3rd party options (Langchain, Autogen, CrewAI, etc.) are all exceedingly over-complicated, the code is deeply obscured and obfuscated and the dependency requirements tend to be quite extreme. Most importantly, they don't generally work at all well with smaller local models, and since the only way to adapt them would be through adjustments to the underlying prompts (which are obscured below multiple layers of unintelligible code) we need a solution that gives us direct access to what is going on under the bonnet. Your example is very basic, but can provide a jumping off point for developing customized and functional agent systems. Thank you!!

    • @AllAboutAI
      @AllAboutAI  4 місяці тому +2

      thnx a lot mate, really appreciate the feedback :) yeah i know what you mean, a lot of the existing options can be pretty over-engineered. that's why i wanted to share something a bit more basic and approachable, where you have more control over the inner workings. i'm glad you found it helpful as a starting point. let me know if you have any other questions!

  • @JolionVT
    @JolionVT 4 місяці тому +3

    This already gonna be a banger

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      thnx mate :) im really excited to see what people come up with using this! let me know if you have any other questions.

  • @AEnoob
    @AEnoob 4 місяці тому

    Was waiting for some beginner projects ty

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      thnx :) i have some beginner friendly projects in the member section. but i might do a vid on the channel soon too, stay tuned!

  • @micbab-vg2mu
    @micbab-vg2mu 4 місяці тому

    Great video -thank you:)

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      thnx a lot :) glad you enjoyed it! be sure to check out the community github if you become a member, lots more fun stuff there :)

  • @TheHistoryCode125
    @TheHistoryCode125 4 місяці тому

    This video is a beginner AI project on creating "agentic behavior" by having two AI agents autonomously interact with each other. The creator uses Python, OpenAI's GPT-4, Anthropic's Claude, and 11 Labs' text-to-speech, but you can use any models. The key steps are: 1) Set up API keys/clients 2) Define text-to-speech and audio playback functions 3) Create agent chat functions that take user input, a "system message" to define the agent's personality, and a memory of the conversation 4) In the main function, get user input for conversation topics and max messages, update the agents' system messages, and kick off the conversation with an initial message 5) Loop through the agents having a back-and-forth conversation, using the chat functions and updating their memories each turn, until the max messages is reached. The video doesn't go in-depth on optimizing the prompts, handling errors, or creating an actual two-way infinite conversation loop. It's more of a simple demo of the concept than a complete, production-ready system.

    • @AllAboutAI
      @AllAboutAI  4 місяці тому +1

      thanks for the detailed breakdown, sounds like an interesting project! as mentioned in the video, i've put the code up on the community github for members. if you become a member, just send me an email at kris@allabtai.com and i'll get you set up with access. would love to hear your thoughts on how to expand and improve the system!

  • @N_Wisdom
    @N_Wisdom 4 місяці тому

    your are very Genius

    • @AllAboutAI
      @AllAboutAI  4 місяці тому +1

      thnx a lot, but i still have a lot to learn :) happy to keep sharing my experiments though!

  • @YT_Jx
    @YT_Jx 4 місяці тому +1

    Hmm, Kris, why did you cut off the agents when they started critiquing your code? hehe

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      haha yeah, i guess i should have let them go on a bit more :) but i wanted to keep it short and sweet for the vid. no worries tho, the full code with all the agent interaction will be up on the github for members!

  • @KolTregaskes
    @KolTregaskes 4 місяці тому

    16:25 It sounds like they are each hearing each other thoughts, the male AI thought the female AI might not like the AI topic before she said it out loud to him. Perhaps edit the prompt so each agent thinks independently of each other?

    • @AllAboutAI
      @AllAboutAI  4 місяці тому +1

      yeah, i agree. the thoughts component is a bit too explicit atm. i think making them more independent could be better. i'll explore that in a future update. thanks for the feedback!

  • @camcamkiller
    @camcamkiller 4 місяці тому +1

    The link to your discord is broke :(

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      aw man, that sucks :( if you become a channel member, i'll get you set up on the discord asap!

  • @yannolaf
    @yannolaf 4 місяці тому

    마지막 대화가 어떻게 이어졌을지 관심이 쏠렸을 것이다. :)

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      thanks :) yeah i was really curious to see how that conversation would go as well! i tried to set up some interesting topics for mike and annie to discuss. but you can customize the prompts to get all kinds of different interactions. i'm looking forward to seeing what other users come up with too!

  • @ZombieRPGee
    @ZombieRPGee 4 місяці тому

    Love your videos! I suggest you change your channel name to 'The Bearded Swede' :P

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      haha, i like your sense of humor! although i'm actually Norwegian, not a Swede ;) but thanks, the bearded part is definitely accurate! glad you're enjoying the videos, and looking forward to continuing to make more content for the community!

  • @ASchnacky
    @ASchnacky 3 місяці тому

    the green convo is narcissistic trying to manipulate the other into their fantasy while the yellow convo thinks the green actually cares about their interest lol

  • @elyakimlev
    @elyakimlev 4 місяці тому

    Where are the agents here? These are just normal chat bots with their own contexts talking to each other.
    I thought you were going to introduce LangChain and web browsing agents or coding agents or other agents that supplement the basic LLM capabilities.

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      hey mate, thanks for the feedback! this is just a simple demo i threw together to showcase the idea of having two ai "agents" have a back-and-forth conversation. i wanted to keep it pretty straightforward for this video, but you're absolutely right that there's tons of scope to build more advanced systems using things like langchain, web browsing, coding, and so on. that's definitely something i want to explore more in the future. for now, i just wanted to put out a basic example to get people thinking about the potential. but i appreciate the suggestion, and i'll make sure to look into incorporating more advanced agent capabilities in future projects! let me know if you have any other ideas.

    • @playthisnote
      @playthisnote 4 місяці тому

      Heh two agents are the same as two request!

  • @amandamate9117
    @amandamate9117 4 місяці тому +1

    was so obvious that with time you will use a cap lol

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      thnx:) i try to keep it casual usually, but can always mix it up! let me know if you have any other feedback.

  • @playthisnote
    @playthisnote 4 місяці тому

    Kinda need a before and after thoughts not just after.

    • @AllAboutAI
      @AllAboutAI  4 місяці тому

      yeah, i can see that would be helpful. i'll try to add some more of the before thoughts in future demos. thanks for the feedback! :)

  • @fnice1971
    @fnice1971 4 місяці тому

    Can you see if you can get AutoDev to work? interested in this.