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

2024 ж. 16 Мам.
7 767 Рет қаралды

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

Пікірлер
  • 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

    @AllAboutAI@AllAboutAIАй бұрын
    • Bot replying to your own posts 😂

      @RowanSheridan@RowanSheridanАй бұрын
  • 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!!

    @user-ru1qz1bo2q@user-ru1qz1bo2qАй бұрын
    • 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!

      @AllAboutAI@AllAboutAIАй бұрын
  • 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.

    @kamelirzouni4730@kamelirzouni4730Ай бұрын
    • 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.

      @AllAboutAI@AllAboutAIАй бұрын
  • This already gonna be a banger

    @JolionVT@JolionVTАй бұрын
    • thnx mate :) im really excited to see what people come up with using this! let me know if you have any other questions.

      @AllAboutAI@AllAboutAIАй бұрын
  • Was waiting for some beginner projects ty

    @AEnoob@AEnoobАй бұрын
    • thnx :) i have some beginner friendly projects in the member section. but i might do a vid on the channel soon too, stay tuned!

      @AllAboutAI@AllAboutAIАй бұрын
  • Great video -thank you:)

    @micbab-vg2mu@micbab-vg2muАй бұрын
    • 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 :)

      @AllAboutAI@AllAboutAIАй бұрын
  • 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.

    @TheHistoryCode125@TheHistoryCode125Ай бұрын
    • 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!

      @AllAboutAI@AllAboutAIАй бұрын
  • your are very Genius

    @N_Wisdom@N_WisdomАй бұрын
    • thnx a lot, but i still have a lot to learn :) happy to keep sharing my experiments though!

      @AllAboutAI@AllAboutAIАй бұрын
  • 마지막 대화가 어떻게 이어졌을지 관심이 쏠렸을 것이다. :)

    @yannolaf@yannolafАй бұрын
    • 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!

      @AllAboutAI@AllAboutAIАй бұрын
  • The link to your discord is broke :(

    @camcamkiller@camcamkillerАй бұрын
    • aw man, that sucks :( if you become a channel member, i'll get you set up on the discord asap!

      @AllAboutAI@AllAboutAIАй бұрын
  • 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?

    @KolTregaskes@KolTregaskesАй бұрын
    • 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!

      @AllAboutAI@AllAboutAIАй бұрын
  • Hmm, Kris, why did you cut off the agents when they started critiquing your code? hehe

    @YT_Jx@YT_JxАй бұрын
    • 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!

      @AllAboutAI@AllAboutAIАй бұрын
  • Love your videos! I suggest you change your channel name to 'The Bearded Swede' :P

    @ZombieRPGee@ZombieRPGeeАй бұрын
    • 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!

      @AllAboutAI@AllAboutAIАй бұрын
  • 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.

    @elyakimlev@elyakimlevАй бұрын
    • 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.

      @AllAboutAI@AllAboutAIАй бұрын
    • Heh two agents are the same as two request!

      @playthisnote@playthisnoteАй бұрын
  • 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

    @ASchnacky@ASchnacky22 күн бұрын
  • was so obvious that with time you will use a cap lol

    @amandamate9117@amandamate9117Ай бұрын
    • thnx:) i try to keep it casual usually, but can always mix it up! let me know if you have any other feedback.

      @AllAboutAI@AllAboutAIАй бұрын
  • Kinda need a before and after thoughts not just after.

    @playthisnote@playthisnoteАй бұрын
    • 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! :)

      @AllAboutAI@AllAboutAIАй бұрын
  • Can you see if you can get AutoDev to work? interested in this.

    @fnice1971@fnice1971Ай бұрын
KZhead