← CookbookView source on GitHub ↗

Internal Support Agent

![Nebius-Weaviate Support Agent](https://github.com/user-attachments/assets/cd6f534c-7a5f-4554-a52b-fa59386282f9)

Internal Support Agent is a Retrieval-Augmented Generation (RAG) assistant combining web search, document processing, vector retrieval, and intelligent support tools. It features multi‑agent orchestration, automatic support assessment, and integrations with Notion and Calendly. The project provides both a Streamlit web app and a Slack bot.


Features


Architecture

Main Components

Workflow State

The workflow state is defined in graph.state.WorkflowState.


Agents Flow Diagram

flowchart TD
    A["search_web (SearchAgent)"] -->|"uploaded_files exist"| B["process_documents (DocumentAgent)"]
    A -->|"no uploaded_files"| C["retrieve_docs (EmbeddingAgent & VectorService)"]
    B --> C
    C --> D["generate_response (LLMAgent)"]
    D --> E["monitor_request (MonitoringAgent)"]
    E --> F[END]

Flow Explanation: - search_web: Uses SearchAgent to fetch web results. - If files are uploaded, DocumentAgent processes them, then proceeds to document retrieval. - If no files, goes directly to retrieve_docs using EmbeddingAgent and VectorService. - LLMAgent generates the final response. - MonitoringAgent logs the request before workflow ends.


Getting Started

Prerequisites

Installation

1) Clone the repository

git clone https://github.com/your-org/nebius-support-agent.git
cd nebius-support-agent

2) Install uv (recommended)

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows (PowerShell)
irm https://astral.sh/uv/install.ps1 | iex

3) Create and activate a virtual environment

uv venv
source .venv/bin/activate  # Windows: .venv\\Scripts\\activate

4) Install dependencies (from pyproject.toml)

uv sync

5) Configure environment variables - Create a .env in the project root and fill in keys listed in “Environment Variables”.

Running the App

uv run streamlit run app.py
uv run slack_bot.py

Usage

Document Upload

Chat & Support

Retrieval Settings (Sidebar)

Response Analytics (Streamlit only)

Database Management

Manual Support


Project Structure

.env
app.py
config.py
pyproject.toml
uv.lock
slack_bot.py
slack_test.py
assets/
    langgraph_logo.png
    logo.png
    notion.png
    weavite.png
agents/
    document_agent.py
    embedding_agent.py
    llm_agent.py
    monitoring_agent.py
    search_agent.py
graph/
    state.py
    workflow.py
services/
    vector_service.py
tools/
    support_tools.py
    tools_notion_and_cal.py

Environment Variables

Create .env and set: - Required: NEBIUS_API_KEY, EXA_API_KEY, WEAVIATE_URL, WEAVIATE_API_KEY - Slack: SLACK_BOT_TOKEN, SLACK_APP_TOKEN, SLACK_SIGNING_SECRET - Notion (support): NOTION_API_KEY, NOTION_DATABASE_ID - Calendly (support): CALENDLY_API_KEY (or legacy CAL_API_KEY), CALENDLY_EVENT_TYPE_ID, CALENDLY_USERNAME - Optional: KEYWORDS_AI_API_KEY

Defaults/tuning (optional): - DEFAULT_WEB_RESULTS (default 5) - DEFAULT_DOCS_RETRIEVAL (default 5) - DEFAULT_MIN_VECTOR_RELEVANCE (default 0.7)

Model defaults (from config.py): - LLM_MODEL = "zai-org/GLM-4.5" - EMBEDDING_MODEL = "Qwen/Qwen3-Embedding-8B"

To change models, open config.py and edit LLM_MODEL and/or EMBEDDING_MODEL to the desired Nebius Token Factory identifiers.


Support & Maintenance

Troubleshooting