Building Your Own GenAI Agent Application

Rate this content
Bookmark
Github

GenAI agents are one of the most promising directions for complex GenAI based applications. These agents can search the web, code, and carry complex tasks completely autonomously for the user. 

In this workshop we will learn the basics of GenAI agents. Define the basic terms and frameworks and understand how they differ from traditional use of LLMs.

We will understand prompting techniques for LLM agents and specifically the React prompting technique for AI agents (not to be confused with React the programming language). 

We will build, from scratch, our own GenAI agent that can interact with the user, perform web searches and code and execute in Javascript.

Table of contents:

- Introduction to GenAI agents

- Understanding the React framework

- Hands-on Building of simple GenAI agent

- Deployment of the Agent with streamlit

- Tips, and frameworks for developing GenAI agents

This workshop has been presented at React Summit US 2024, check out the latest edition of this React Conference.

FAQ

The chaining concept involves prompting LLMs to perform step-by-step reasoning to solve multi-step questions, enabling them to break down tasks into smaller subtasks and improve accuracy.

The workshop aimed to introduce participants to Gen AI and LLM agents, explain the React framework, and provide a hands-on experience in coding and deploying their own LLM agent using tools like web search and coding.

AI21 Labs believes that building trustworthy AI systems that can be integrated into enterprise workflows is crucial for gaining market success and providing real value to users and organizations.

Gen AI agents can use tools like web search and coding tools to perform tasks, allowing them to gather information and execute code as part of their multi-step reasoning process.

Companies like Salesforce, Anthropic, Google, and Microsoft are investing in developing Gen AI agents, each introducing products or models that enhance AI capabilities and integration.

The React framework is a prompting framework used in Gen AI to facilitate multi-step reasoning and decision-making by LLMs, allowing them to use external tools and perform actions iteratively until a task is completed.

AI21 Labs focuses on developing foundation models and AI systems that can be integrated within enterprise workflows to provide complex decision-making and adaptiveness.

The market for Gen AI agents is projected to grow from $5.4 billion to $50 billion by 2030, indicating significant growth potential in this field.

Unlike standard LLM prompting that involves single prompt and response, the React framework allows for iterative prompts and responses, enabling the use of multiple tools and complex reasoning processes.

Gen AI agents are AI systems that use large language models (LLMs) to perform tasks by breaking them down into smaller subtasks, often using external tools like web search or coding to achieve complex objectives.

Amit Mandelbaum
Amit Mandelbaum
Idan Rozin
Idan Rozin
87 min
11 Nov, 2024

Comments

Sign in or register to post your comment.
Video Summary and Transcription
Welcome to the Workshop on Gen AI and LLM Agents! The Gen AI market is growing rapidly, with big companies investing in agent development using no-code tools. Chaining is a key concept in building trustworthy and complex systems in the Gen AI market. OpenAI 01 is the first model to integrate chain of thought thinking. LLM agents use step-by-step reasoning to provide answers and require a different framework than chain of thought. The React framework is successful for working with LLM agents. The process of React prompting involves iterating over tools to find the final answer. The Google search API is used as a tool in the LLM agent. The agent class is implemented to collect responses and decide the next action. The prompt is tweaked to include previous history. The LLM agent uses multiple tools, including the Google search API and a JavaScript code runner. The agent can perform calculations and retrieve data from web searches. Recommended resources for building advanced multi-agent systems include Langchain and Microsoft Autogen framework.

1. Introduction to Gen AI and Workshop Overview

Short description:

Welcome everybody! I'm Amit Madelbaum, a senior tech lead at AI21 Labs. I develop foundation models and I'm also an angel investor at Victoria. Idan is a full stack engineer at AI21 Labs with a passion for AI applications and technologies.

So, welcome everybody. All right. So, a quick intro about ourselves. So, I'm Amit Madelbaum. I'm a senior tech lead at AI21 Labs, one of the, I think, most important AI companies in the world and probably the biggest one in Israel. I'm one of the few that develop foundation models, which we are going to use through this workshop. I'm also an angel investor at Victoria, which is a New York-based VC, formerly I was a co-founder in the area of Gen AI and director of AI at NVIDIA.

And Idan, he's a full stack engineer at AI21 Labs with high passion, as you're going to see, to AI applications and technologies.

2. Agenda and Workshop Overview

Short description:

Today's agenda includes a lecture on the introduction to Gen AI or LLM agents, followed by an explanation of the React framework. Then, there will be a hands-on workshop for coding and deploying LLM agents using the React prompting framework. We will also discuss ways to further your work with Gen AI agents and answer any questions you may have.

And in terms of agenda, what we're going to have today is around ten minutes of lecture about general introduction to Gen AI or LLM agents. And then around ten minutes explaining the React framework that we are going to use through this workshop. React, not react programming language, which this workshop is a part of, but React, the prompting framework of LLMs to work with agents.

And then around 40 to 50 minutes of a hands-on workshop on actually coding and deploying your very own LLM agent that can actually use tools like web search and coding to fulfill complex tasks, again, using the React prompting framework, which I will discuss. And then we'll have around five minutes at the end just discussing how you can take it further into your work and how you can get more technical details and frameworks to actually continue working with Gen AI agents.

And, obviously, we'll have time for questions. As you can see, this entire schedule covers around an hour and five minutes and we have around an hour and a half. So, obviously, we'll have some extra time for questions.

QnA

Watch more workshops on topic

AI on Demand: Serverless AI
DevOps.js Conf 2024DevOps.js Conf 2024
163 min
AI on Demand: Serverless AI
Top Content
Featured WorkshopFree
Nathan Disidore
Nathan Disidore
In this workshop, we discuss the merits of serverless architecture and how it can be applied to the AI space. We'll explore options around building serverless RAG applications for a more lambda-esque approach to AI. Next, we'll get hands on and build a sample CRUD app that allows you to store information and query it using an LLM with Workers AI, Vectorize, D1, and Cloudflare Workers.
AI for React Developers
React Advanced 2024React Advanced 2024
142 min
AI for React Developers
Featured Workshop
Eve Porcello
Eve Porcello
Knowledge of AI tooling is critical for future-proofing the careers of React developers, and the Vercel suite of AI tools is an approachable on-ramp. In this course, we’ll take a closer look at the Vercel AI SDK and how this can help React developers build streaming interfaces with JavaScript and Next.js. We’ll also incorporate additional 3rd party APIs to build and deploy a music visualization app.
Topics:- Creating a React Project with Next.js- Choosing a LLM- Customizing Streaming Interfaces- Building Routes- Creating and Generating Components - Using Hooks (useChat, useCompletion, useActions, etc)
Leveraging LLMs to Build Intuitive AI Experiences With JavaScript
JSNation 2024JSNation 2024
108 min
Leveraging LLMs to Build Intuitive AI Experiences With JavaScript
Featured Workshop
Roy Derks
Shivay Lamba
2 authors
Today every developer is using LLMs in different forms and shapes, from ChatGPT to code assistants like GitHub CoPilot. Following this, lots of products have introduced embedded AI capabilities, and in this workshop we will make LLMs understandable for web developers. And we'll get into coding your own AI-driven application. No prior experience in working with LLMs or machine learning is needed. Instead, we'll use web technologies such as JavaScript, React which you already know and love while also learning about some new libraries like OpenAI, Transformers.js
Llms Workshop: What They Are and How to Leverage Them
React Summit 2024React Summit 2024
66 min
Llms Workshop: What They Are and How to Leverage Them
Featured Workshop
Nathan Marrs
Haris Rozajac
2 authors
Join Nathan in this hands-on session where you will first learn at a high level what large language models (LLMs) are and how they work. Then dive into an interactive coding exercise where you will implement LLM functionality into a basic example application. During this exercise you will get a feel for key skills for working with LLMs in your own applications such as prompt engineering and exposure to OpenAI's API.
After this session you will have insights around what LLMs are and how they can practically be used to improve your own applications.
Table of contents: - Interactive demo implementing basic LLM powered features in a demo app- Discuss how to decide where to leverage LLMs in a product- Lessons learned around integrating with OpenAI / overview of OpenAI API- Best practices for prompt engineering- Common challenges specific to React (state management :D / good UX practices)
Working With OpenAI and Prompt Engineering for React Developers
React Advanced 2023React Advanced 2023
98 min
Working With OpenAI and Prompt Engineering for React Developers
Top Content
Workshop
Richard Moss
Richard Moss
In this workshop we'll take a tour of applied AI from the perspective of front end developers, zooming in on the emerging best practices when it comes to working with LLMs to build great products. This workshop is based on learnings from working with the OpenAI API from its debut last November to build out a working MVP which became PowerModeAI (A customer facing ideation and slide creation tool).
In the workshop they'll be a mix of presentation and hands on exercises to cover topics including:
- GPT fundamentals- Pitfalls of LLMs- Prompt engineering best practices and techniques- Using the playground effectively- Installing and configuring the OpenAI SDK- Approaches to working with the API and prompt management- Implementing the API to build an AI powered customer facing application- Fine tuning and embeddings- Emerging best practice on LLMOps
Building AI Applications for the Web
React Day Berlin 2023React Day Berlin 2023
98 min
Building AI Applications for the Web
Workshop
Roy Derks
Roy Derks
Today every developer is using LLMs in different forms and shapes. Lots of products have introduced embedded AI capabilities, and in this workshop you’ll learn how to build your own AI application. No experience in building LLMs or machine learning is needed. Instead, we’ll use web technologies such as JavaScript, React and GraphQL which you already know and love.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

Building a Voice-Enabled AI Assistant With Javascript
JSNation 2023JSNation 2023
21 min
Building a Voice-Enabled AI Assistant With Javascript
Top Content
This Talk discusses building a voice-activated AI assistant using web APIs and JavaScript. It covers using the Web Speech API for speech recognition and the speech synthesis API for text to speech. The speaker demonstrates how to communicate with the Open AI API and handle the response. The Talk also explores enabling speech recognition and addressing the user. The speaker concludes by mentioning the possibility of creating a product out of the project and using Tauri for native desktop-like experiences.
AI and Web Development: Hype or Reality
JSNation 2023JSNation 2023
24 min
AI and Web Development: Hype or Reality
Top Content
This talk explores the use of AI in web development, including tools like GitHub Copilot and Fig for CLI commands. AI can generate boilerplate code, provide context-aware solutions, and generate dummy data. It can also assist with CSS selectors and regexes, and be integrated into applications. AI is used to enhance the podcast experience by transcribing episodes and providing JSON data. The talk also discusses formatting AI output, crafting requests, and analyzing embeddings for similarity.
The Rise of the AI Engineer
React Summit US 2023React Summit US 2023
30 min
The Rise of the AI Engineer
Watch video: The Rise of the AI Engineer
The rise of AI engineers is driven by the demand for AI and the emergence of ML research and engineering organizations. Start-ups are leveraging AI through APIs, resulting in a time-to-market advantage. The future of AI engineering holds promising results, with a focus on AI UX and the role of AI agents. Equity in AI and the central problems of AI engineering require collective efforts to address. The day-to-day life of an AI engineer involves working on products or infrastructure and dealing with specialties and tools specific to the field.
The Ai-Assisted Developer Workflow: Build Faster and Smarter Today
JSNation US 2024JSNation US 2024
31 min
The Ai-Assisted Developer Workflow: Build Faster and Smarter Today
AI is transforming software engineering by using agents to help with coding. Agents can autonomously complete tasks and make decisions based on data. Collaborative AI and automation are opening new possibilities in code generation. Bolt is a powerful tool for troubleshooting, bug fixing, and authentication. Code generation tools like Copilot and Cursor provide support for selecting models and codebase awareness. Cline is a useful extension for website inspection and testing. Guidelines for coding with agents include defining requirements, choosing the right model, and frequent testing. Clear and concise instructions are crucial in AI-generated code. Experienced engineers are still necessary in understanding architecture and problem-solving. Energy consumption insights and sustainability are discussed in the Talk.
Web Apps of the Future With Web AI
JSNation 2024JSNation 2024
32 min
Web Apps of the Future With Web AI
Web AI in JavaScript allows for running machine learning models client-side in a web browser, offering advantages such as privacy, offline capabilities, low latency, and cost savings. Various AI models can be used for tasks like background blur, text toxicity detection, 3D data extraction, face mesh recognition, hand tracking, pose detection, and body segmentation. JavaScript libraries like MediaPipe LLM inference API and Visual Blocks facilitate the use of AI models. Web AI is in its early stages but has the potential to revolutionize web experiences and improve accessibility.
Code coverage with AI
TestJS Summit 2023TestJS Summit 2023
8 min
Code coverage with AI
Codium is a generative AI assistant for software development that offers code explanation, test generation, and collaboration features. It can generate tests for a GraphQL API in VS Code, improve code coverage, and even document tests. Codium allows analyzing specific code lines, generating tests based on existing ones, and answering code-related questions. It can also provide suggestions for code improvement, help with code refactoring, and assist with writing commit messages.