A production-style agentic RAG system that resolves customer support issues end-to-end β answering policy questions, looking up live order data, and escalating to a human when needed.
Features β’ Architecture β’ Tech Stack β’ Getting Started β’ Demo
- π§ Agentic RAG β combines retrieval-augmented generation with tool-calling so the agent grounds every answer in real data
- π¦ Live order lookups β fetches order status, tracking, and item details, gated on customer email verification
- π Knowledge-grounded answers β semantic search over FAQ, refund policy, and shipping policy docs via FAISS
- π« Smart escalation β automatically creates a human support ticket when confidence is low or the customer requests it
- β‘ Powered by Groq β blazing fast LLM inference using Llama 3.3 70B, completely free
- π₯οΈ Streamlit UI + CLI β run as a beautiful chat app or directly in the terminal
User Message
β
βΌ
βββββββββββββββββββββββββββββββββββ
β LangGraph ReAct Agent β
β (Groq Β· Llama 3.3 70B) β
ββββββββββββββ¬βββββββββββββββββββββ
β picks the right tool
ββββββββββ΄ββββββββββ
β β
βΌ βΌ
βββββββββββββββ ββββββββββββββββββββ
β lookup_orderβ β kb_search / β
β orders.json β βrefund_policy_ β
β email-gated β βsearch β FAISS β
βββββββββββββββ ββββββββββββββββββββ
β β
ββββββββββ¬ββββββββββ
β
βΌ
βββββββββββββββ
βcreate_ticketβ β escalation
βtickets.json β
βββββββββββββββ
β
βΌ
Final Response
| Tool | What it does |
|---|---|
lookup_order |
Fetches order status, items, totals, tracking β gated on customer email |
kb_search |
Semantic search across FAQ + all policy docs |
refund_policy_search |
Targeted search restricted to refund & returns policy |
create_ticket |
Opens a human support ticket and escalates the conversation |
| Layer | Technology |
|---|---|
| Agent Framework | LangChain + LangGraph (ReAct agent) |
| LLM | Groq β Llama 3.3 70B Versatile (free) |
| Embeddings | HuggingFace β all-MiniLM-L6-v2 (local, free) |
| Vector Store | FAISS (local) |
| UI | Streamlit |
| Language | Python 3.10+ |
- Python 3.10+
- A free Groq API key β no credit card needed
git clone https://github.com/YOUR_USERNAME/dummycart-support-agent.git
cd dummycart-support-agentpython -m venv .venv
# Mac/Linux
source .venv/bin/activate
# Windows
.venv\Scripts\Activate.ps1pip install -e .cp env.example .envEdit .env and add your Groq API key:
GROQ_API_KEY=your_groq_api_key_here
GROQ_MODEL=llama-3.3-70b-versatile
python ingest.pyStreamlit UI:
streamlit run app.pyTerminal CLI:
python main.py"Check order DC-10234, my email is alex@example.com"
"What's the status of DC-10235? Email: priya@example.com"
"Can you track my order DC-10236? Email: jordan@example.com"
"What's your refund policy?"
"How long does shipping take?"
"Can I cancel my order?"
"What payment methods do you accept?"
"My package arrived broken, I need help"
"I think someone used my card to place an order"
"I want to speak to a human agent"
"Where's order DC-10234 (alex@example.com)? Can I still cancel it?"
"What's the return policy for damaged items? My order DC-10236 arrived broken"
dummycart-support-agent/
βββ agent.py # LangGraph ReAct agent + system prompt
βββ tools.py # lookup_order, kb_search, refund_policy_search, create_ticket
βββ ingest.py # Builds FAISS index from data/*.md
βββ app.py # Streamlit chat UI
βββ main.py # Terminal CLI
βββ data/
β βββ faq.md
β βββ refund_policy.md
β βββ shipping_policy.md
β βββ orders.json # Sample order database
β βββ tickets.json # Tickets created by the agent
βββ kb_index/ # FAISS index (auto-created by ingest.py)
βββ pyproject.toml
βββ env.example
βββ .gitignore
- Swap
data/orders.jsonfor a real database query - Replace FAISS with a managed vector DB (Qdrant, Pinecone) β only
ingest.pychanges - Add tools:
update_shipping_address,issue_store_credit,start_return - Plug
create_ticketinto Zendesk / Linear / your real ticketing system - Deploy on Streamlit Cloud for free
MIT β feel free to use, modify, and build on top of this.