Ambient Agent 101 banner
langchain-ai langchain-ai

Ambient Agent 101

Communication community

Description

Learn about the fundamentals of LangGraph through building an ambient email agent

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Welcome to Ambient Agent 101!

Introduction

In this session, you will learn about the fundamentals of LangGraph through one of our notebooks. It builds up to an ["ambient"](https://blog.langchain.dev/introducing-ambient-agents/) agent that can manage your email with connection to the Gmail API. It's grouped into 4 sections in the notebook in `notebooks` , with accompanying code in the `src/email_assistant` directory. These section build from the basics of agents, to human-in-the-loop, and finally to memory. These all come together in an agent that we will deploy and evaluate, and the principles can be applied to other agents across a wide range of tasks.

This is a condensed version of LangChain Academy, and is intended to be run in a session with a LangChain engineer. If you're interested in going into more depth, or working through a tutorial on your own, check out LangChain Academy here! LangChain Academy has helpful pre-recorded videos from one of our LangChain engineers.

![overview](notebooks/img/overview.png)

Environment Setup

Clone the Ambient Agent 101 repo

git clone https://github.com/langchain-ai/langgraph-101.git

Python Version

  • Ensure you're using Python 3.11 or later.
  • This version is required for optimal compatibility with LangGraph.
python3 --version

API Keys

  • If you don't have an OpenAI API key, you can sign up here.
  • Sign up for LangSmith here.
  • Generate a LangSmith API key.

Set Environment Variables

  • Create a .env file in the root directory:
# Copy the .env.example file to .env
cp .env.example .env

Alternative Models Instructions

If you are using alternative models (e.g., Anthropic, Bedrock, AzureOpenAI) instead of OpenAI, there are a few things you need to do.

  • Set necessary environment variables in the `.env` file.

  • Navigate to [utils.py](/src/email_assistant/utils.py), and uncomment t