Skip to content

Repository files navigation

SARA - Support And Resolution Agent

This project is an LLM-powered eLearning support automation agent.

It simulates how a support team can move from manual SOP-based ticket handling to an agentic workflow. Incoming student emails are stored as tickets, processed asynchronously by an LLM-powered agent, and resolved or escalated using domain docs, database schema inspection, database queries, approved actions, and structured audit logs.

Demo strengths

  • Groq or Gemini function calling
  • Async support ticket processing
  • Multi-table database lookup
  • Domain-knowledge-driven decisions
  • Structured structlog audit events
  • Explicit API reset for the full demo database state
  • Human escalation
  • Simulated email outbox
  • Full audit trail

Quickstart

pip install -r requirements.txt
cp .env.example .env
# Edit .env and set GROQ_API_KEY from https://console.groq.com/
python seed.py
uvicorn api:app --reload --port 8000
streamlit run app.py

Reset demo data manually when needed:

curl -X POST http://localhost:8000/seed/reset

Notes

  • The default LLM_PROVIDER is groq, using GROQ_MODEL=llama-3.1-8b-instant.
  • The default AGENT_MODE is staged_llm, which uses four LLM calls per ticket: triage, investigation planning, evidence reasoning, and final decision/email generation.
  • To use Groq, set GROQ_API_KEY in .env. Groq keys are available from https://console.groq.com/.
  • To use Gemini instead, set LLM_PROVIDER=gemini and set GEMINI_API_KEY to a Google AI Studio API key. AI Studio keys usually begin with AIza.
  • A real provider API key is required. The agent does not use a local fallback or rule-based substitute.
  • Restart both uvicorn and Streamlit after changing .env; environment variables are loaded when each process starts.
  • Streamlit posts tickets to the FastAPI backend and polls ticket status while the background agent processes the ticket.
  • Student reply emails are generated by the final LLM decision call and then written once by the backend.
  • Demo data is not reset automatically after each ticket. Call POST /seed/reset when you want to clear tickets, replies, audit trails, actions, and restore the original learner/course records.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages