An autonomous, state-of-the-art AI assistant for Telegram, built with LangGraph, Groq (Llama 3.3), ChromaDB, and Model Context Protocol (MCP).
- 🧠 Autonomous Reasoning: Powered by LangGraph and Llama 3.3, the agent thinks step-by-step to solve complex business queries.
- 📚 RAG (Retrieval-Augmented Generation): Private knowledge base using ChromaDB and local HuggingFace embeddings.
- 🛠️ MCP Toolset: Comprehensive tool integration for real-world actions:
- Database: SQLite customer record search.
- Email: Automated Gmail sending via App Passwords.
- Ticketing: Local issue tracking system.
- 🌐 Real-Time Web Search: Integrated DuckDuckGo search for current events and global data.
- 🛡️ Human-in-the-Loop (HITL): Safety first! Sensitive actions (like emails or payments) require manual approval via Telegram buttons.
- 💾 Persistent Memory: Remembers user context and conversation history across sessions.
- 📊 Business Intelligence (Simulated): Ready-to-use simulations for Stripe, Shopify, and Google Calendar.
- Python 3.10+
- A Groq API Key
- A Telegram Bot Token
# Clone the repository
git clone <your-repo-url>
cd business-agent-telegram
# Install dependencies
pip install -r requirements.txtCreate a .env file in the root directory:
TELEGRAM_BOT_TOKEN=your_token_here
GROQ_API_KEY=your_key_here
GMAIL_SENDER=[email protected]
GMAIL_APP_PASSWORD=your_16_char_app_password# Ingest initial documents
python -m rag.ingest
# Start the bot
python main.py/start: Initialize the agent./help: List available capabilities./status: Check system health (DB, Docs, LLM)./ingest: Manually trigger a refresh of the knowledge base.
bot_interface/: Telegram handlers and UI logic.agent/: Core reasoning (LangGraph), state management, and tool definitions.rag/: Document processing and vector storage.mcp_server/: Tool implementations and database logic.agent.log: Live audit logs of agent actions.
MIT
