This project demonstrates the powerful capabilities of LangChain's Agent Inbox by implementing a sophisticated web search and research agent. The system showcases Agent Inbox's ability to handle complex multi-step workflows with human-in-the-loop interactions. The agent performs web searches using Tavily, filters results for relevance, and generates comprehensive summaries - all while providing human oversight at critical decision points through Agent Inbox's interrupt system. This demo highlights how Agent Inbox can orchestrate complex AI workflows that combine automated processing with strategic human intervention, making it ideal for research tasks that require both AI efficiency and human judgment.
- Multi-step Research Workflow: Creates research plans, generates search queries, performs web searches, and summarizes results
- Human-in-the-Loop: Interactive checkpoints at each critical decision point
- Intelligent Filtering: AI-powered relevance filtering of search results
- Web Search Integration: Uses Tavily for comprehensive web search capabilities
- Structured Output: Generates well-organized research summaries
# Create a new virtual environment
python -m venv .venv
# Activate the virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate# Install required packages
pip install -r requirements.txtCreate a .env file in the root directory with your API keys:
LANGSMITH_TRACING=true
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGSMITH_API_KEY=your_langsmith_api_key_here
OPENAI_API_KEY=your_openai_api_key_here
TAVILY_API_KEY=your_tavily_api_key_here# In the root directory of this project
langgraph dev# In a separate terminal, start Agent Inbox
cd agent-inbox
yarn build
yarn start- Open Agent Inbox in your browser
- Set the Deployment URL to:
http://127.0.0.1:2024 - Set the Graph ID to:
ambient - Save the configuration
- Navigate to LangGraph Studio to enter a question, or make an API call to
http://127.0.0.1:2024. API docs available athttp://127.0.0.1:2024/docs - Enter your research question
- From here, monitor your agent inbox for Human In the Loop Prompts to appear
- Review and approve each step of the research workflow
The agent will perform web searches, filter results for relevance, and generate summaries while allowing you to intervene and provide feedback at each critical decision point through Agent Inbox's human-in-the-loop capabilities.
ambient.py- Main graph definition and workflow logictools.py- Custom tools for web search and filteringprompts.py- Prompt templates for different workflow stagesutils.py- Utility functions for state management