Multi AI agent with web search
Chat agent that lets users pick a Groq Llama model and optionally enable Tavily web search.
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
- 01
LangGraph create_react_agent wraps a Groq chat model and adds TavilySearchResults only when search is allowed.
- 02
FastAPI /chat endpoint rejects models outside an allow-list of two Llama models with HTTP 400.
- 03
One container starts the Uvicorn backend on port 9999 and the Streamlit UI on port 8501.
- 04
Jenkins runs the SonarQube scanner on the repository before building and pushing the image to Amazon ECR.
- 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.
L1UI
- Streamlit front end
L2API
- FastAPI /chat endpoint
- Model allow-list
L3Agent
- LangGraph ReAct agent
- Groq Llama 3
- Tavily search tool
L4CI/CD
- Jenkins pipeline
- SonarQube analysis
- Amazon ECR
L5Runtime
- AWS ECS Fargate