From 1a7fe9c81f6f7caaf06c0f176f46827eeb4e7c35 Mon Sep 17 00:00:00 2001 From: Jeff Tang Date: Tue, 10 Dec 2024 19:15:07 -0800 Subject: [PATCH] README update --- recipes/use_cases/email_agent/README.md | 35 +++++++++++-------------- 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/recipes/use_cases/email_agent/README.md b/recipes/use_cases/email_agent/README.md index eb99d7e8e..73a895e7a 100644 --- a/recipes/use_cases/email_agent/README.md +++ b/recipes/use_cases/email_agent/README.md @@ -1,8 +1,8 @@ -# Gmagent - A Llama Powered Gmail Agent +# Emagent - A Llama Powered Email Agent -This Gmagent app shows how to build a Gmail agent app powered by Llama 3.1 8B running locally via Ollama (for privacy concern since Gamgent is about your Gmail). We'll start with building from scratch a basic agent with custom tool calling natively supported in Llama 3.1. The end goal is to cover all components of a production-ready agent app, acting as an assistant to your Gmail, with great user experience: intuitive, engaging, efficient and reliable. +This Emagent app shows how to build a Email agent app powered by Llama 3.1 8B running locally via Ollama (for privacy concern since Emagent is about your email). We'll start with building from scratch a basic agent with custom tool calling natively supported in Llama 3.1. The end goal is to cover all components of a production-ready agent app, acting as an assistant to your email, with great user experience: intuitive, engaging, efficient and reliable. We'll use Gmail as an example but any email client API's can be used instead. -Currently implemented features of Gmagent include: +Currently implemented features of Emagent include: * search for emails and attachments * get email detail * reply to a specific email @@ -52,9 +52,9 @@ Yet another simple [summary](https://www.felicis.com/insight/the-agentic-web) by All in all (see [Resources](#resources) for even more info), agents are systems that take a high-level task, use an LLM as a reasoning and planning engine, with the help of contextual info and long-term memory if needed, to decide what actions to take, reflect and improve on the actions, and eventually execute those actions to accomplish the task. -It's time to see an agent app in action and enjoy some coding. Below is a preview of the questions or requests one may ask Gmagent: +It's time to see an agent app in action and enjoy some coding. Below is a preview of the questions or requests one may ask Emagent: -# Example Asks to Gmagent +# Example Asks to Emagent * do i have any emails with attachments? * what's the content of the email from LangSmith @@ -70,12 +70,7 @@ It's time to see an agent app in action and enjoy some coding. Below is a previe * how many emails do i have from xxx@gmail.com? * how about from yyy@gmail.com? -[Here](./examples_log.txt) is an example interaction log with Gmagent, with some screenshots of the interaction below (the user inputs and Gmagent outputs are after Your ask: and Gmagent: ; what's between ---- are Llama outputs and tool calling results): - -![](1.png) -![](2.png) -![](3.png) - +[Here](./examples_log.txt) is an example interaction log with Emagent. # Setup and Installation @@ -104,28 +99,28 @@ This will download a quantized version of Llama 3.1 of the size 4.7GB. First, create a Conda or virtual env: ``` -conda create -n gmagent python=3.10 -conda activate gmagent +conda create -n emagent python=3.10 +conda activate emagent ``` or ``` -python -m venv gmagent -source gmagent/bin/activate # on Linux, macOS: -source gmagent\Scripts\activate # on Windows +python -m venv emagent +source emagent/bin/activate # on Linux, macOS: +source emagent\Scripts\activate # on Windows ``` Then install the required Python libraries: ``` git clone https://github.com/meta-llama/llama-recipes -cd llama-recipes/recipes/use_cases/gmail_agent +cd llama-recipes/recipes/use_cases/email_agent pip install -r requirements.txt ``` -# Run Gmagent +# Run Emagent -To run Gmagent, you need to first copy the `credentials.json` file downloaded and renamed above in Step 6 of Enable Gmail API to the gmagent folder, then run: +To run Emagent, you need to first copy the `credentials.json` file downloaded and renamed above in Step 6 of Enable Gmail API to the emagent folder, then run: ``` -python main.py --user_email +python main.py --gmail ``` The first time you run it, you'll get a prompt like this;