Lab build

Multi AI agent with web search

Chat agent that lets users pick a Groq Llama model and optionally enable Tavily web search.

Role
Builder, end to end
Group
LLMOps and AIOps
Services
AI & LLM systems · MLOps & cloud

What it does

A LangGraph ReAct agent runs on Groq-hosted Llama 3 models, with Tavily search attached as a tool only when the user enables it. A FastAPI backend validates the model name and serves a /chat endpoint, while a Streamlit front end collects the system prompt and query. A Jenkins pipeline runs SonarQube analysis, pushes the image to Amazon ECR and forces a new deployment on ECS Fargate.

What was built

  1. 01

    LangGraph create_react_agent wraps a Groq chat model and adds TavilySearchResults only when search is allowed.

  2. 02

    FastAPI /chat endpoint rejects models outside an allow-list of two Llama models with HTTP 400.

  3. 03

    One container starts the Uvicorn backend on port 9999 and the Streamlit UI on port 8501.

  4. 04

    Jenkins runs the SonarQube scanner on the repository before building and pushing the image to Amazon ECR.

  5. 05

    Deploy stage calls aws ecs update-service with force-new-deployment on the Fargate cluster.

The pipeline, layer by layer

Five layers, one pipeline.

  1. L1UI

    • Streamlit front end
  2. L2API

    • FastAPI /chat endpoint
    • Model allow-list
  3. L3Agent

    • LangGraph ReAct agent
    • Groq Llama 3
    • Tavily search tool
  4. L4CI/CD

    • Jenkins pipeline
    • SonarQube analysis
    • Amazon ECR
  5. L5Runtime

    • AWS ECS Fargate

Stack

  • LangGraph
  • LangChain
  • Groq
  • Llama 3
  • Tavily
  • FastAPI
  • Streamlit
  • Docker
  • Jenkins
  • SonarQube
  • Amazon ECR
  • AWS ECS Fargate

Next lab build · 03 / 46

Flipkart product assistant

Answers product questions from Flipkart reviews using AstraDB vector search and conversation-aware retrieval.

Previous: Medical RAG chatbot

Need a system like this in production? Tell us about it.