Skip to content

About

πŸ€– Open-source self-hosted AI sales assistant: drafts commercial offers from WhatsApp chats, managers approve in one tap in Telegram β€” never invents prices. Branching web chat, local LLM (vLLM) or Claude/GPT/Gemini, voice cloning, Telegram/WhatsApp/widget/phone. ru/en/kk.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

15 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

1,339 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

AI Secretary System β€” open-source, self-hosted AI sales assistant that drafts offers from chats and never invents prices

CI License: MIT Python 3.11+ Vue 3 Docker Stars

Live demo Β· Quick start Β· Wiki Β· Telegram assistant Β· Android APK Β· Русский

A client asks for an offer in WhatsApp; the manager gets a ready draft in Telegram with Send / Edit / Cancel buttons

The product UI speaks Russian, English and Kazakh. Example data is made up.

Why it exists

Small sales teams live in messengers. A client writes Β«send me a quote for 12 breakers and 100 m of cableΒ», and a manager spends 20 minutes digging through the catalog, copying SKUs and adding up totals. Generic AI chatbots are fast, but they make up prices and stock, so nobody lets them talk to clients alone.

AI Secretary does the boring part and leaves the decision with a person. Everything runs on your own server, with a local LLM if you want full privacy.

Highlights

1. Offers drafted from the chat, approved in the messenger

  • The assistant notices Β«send me a quoteΒ» in a WhatsApp dialogue by itself, with no commands.
  • It extracts items and quantities, looks each one up in the live catalog and builds a draft offer.
  • The manager gets a card in Telegram: what the client asked for, what was matched (with the client's own wording next to each line), what was left out, and the text for the client.
  • βœ… Send Β· ✏️ Edit text Β· ❌ Cancel: inline buttons in Telegram, or a numbered menu under the card on a service WhatsApp number (reply Β«1Β» to send). The messenger becomes the admin panel.
  • Follow-up timers: Β«not approved yetΒ», Β«client hasn't opened itΒ», Β«opened and silentΒ», Β«expires soonΒ».

β†’ How it works Β· User guide

2. An assistant that cannot lie about prices

Client request β†’ live catalog search β†’ confident matches go into the offer, the rest to the manager; never a made-up price

  • Product search returns an empty list when nothing matches, so the model has no gap to fill with a made-up item or price.
  • Β«In stockΒ» is shown only for confirmed stock. Supplier names and purchase prices are visible to managers only.
  • Client memory carries a client card across dialogues (who they are, what they asked for, what they got), and code strips every price and stock line out of it.
  • A human approves every send. A double tap won't send twice.

β†’ Procurement & search Β· Client memory

3. A power-user web chat

Web chat with per-session prompt, context files, model and RAG switch, and a branch tree panel

Schematic of the chat screen.

  • Branching dialogues. Editing a question or regenerating an answer starts a new branch. The branch tree panel shows every version and switches between them; nothing is lost.
  • Per-session system prompt and context files (.md, .csv, .json, code…) that go into every request of that session.
  • Summarize branch β†’ context file. Compress a long thread into a summary and keep working from a clean branch.
  • Switch the model and knowledge base on the fly: local Qwen/Llama, Claude, GPT, Gemini, DeepSeek… plus RAG collections per session.
  • Context-window meter, streaming Markdown, voice input and voice replies, zen full-screen mode, export to .md/.json.
  • Share a chat with a colleague; they see only the branch you shared.

β†’ Chat guide

4. Runs fully offline

Fully offline stack on one RTX 3060: vLLM, XTTS voice cloning, Vosk/Whisper, LoRA, RAG, SQLite

  • Local LLM via vLLM (Qwen2.5-7B, Llama-3.1-8B, DeepSeek) on a single RTX 3060 12 GB.
  • Voice cloning with XTTS v2 and OpenVoice, fast CPU voices with Piper, speech-to-text with Vosk (streaming) and Whisper.
  • LoRA fine-tuning on an exported Telegram chat, with hot-swappable adapters.
  • Cloud LLMs are optional. There's an honest privacy table on what a cloud provider gets to see.

5. Any LLM, including your Claude Code subscription

  • Cloud providers: Gemini, OpenAI, Claude, DeepSeek, Kimi, OpenRouter, or anything OpenAI-compatible.
  • Claude Code CLI bridge. Use Claude Code as an OpenAI-compatible backend, with an isolated HOME and per-user token tracking.
  • An OpenAI-compatible API of its own (/v1/chat/completions), so it plugs into OpenWebUI and similar tools.

β†’ LLM & prompts

6. Every channel from one panel

Telegram, WhatsApp, widget, phone and Android feed one assistant; managers, admin panel, amoCRM and payments on the other side

  • Telegram and WhatsApp bots, as many instances as you need, each with its own model, prompt and voice. WhatsApp runs via the Meta Cloud API or a self-hosted QR-linked bridge.
  • Website chat widgets, several per installation.
  • A real phone line. A SIM7600 GSM modem lets the assistant answer calls and SMS.
  • Android app with private sessions and ready-made assistants (marketer, developer, lawyer, accountant).
  • Sales funnel, payments (YooMoney, Telegram Stars), amoCRM, Kanban with a Gantt roadmap, Wiki-RAG over Google Drive and RSS.
  • Admin panel: Vue 3 PWA, RBAC with workspaces, audit log, 3 themes, ru / en / kk.

Quick start

CPU mode (no GPU; uses a cloud LLM):

git clone https://github.com/ShaerWare/AI_Secretary_System
cd AI_Secretary_System
cp .env.docker.example .env        # set GEMINI_API_KEY, or add any provider later in the panel
docker compose -f docker-compose.yml -f docker-compose.cpu.yml up -d

# create your admin account (admin/admin in the panel always opens the offline demo)
docker exec ai-secretary python scripts/manage_users.py create owner 'a-strong-password' --role admin

Open http://localhost:8002/admin and sign in as owner.

GPU mode (local LLM, voice cloning): docker compose up -d with a local vLLM, or docker compose -f docker-compose.yml -f docker-compose.full.yml up -d for everything in containers. Requirements and details: Installation.

Just looking? The live demo opens the admin panel with sample data (admin / admin).

Architecture

              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€ Orchestrator (FastAPI, :8002) ────────────────┐
 Telegram ──▢ β”‚  chat Β· knowledge/RAG Β· CRM Β· КП/outbound Β· procurement Β· ... β”‚ ◀── Vue 3 admin (PWA)
 WhatsApp ──▢ β”‚  EventBus Β· TaskRegistry Β· SQLite + Redis Β· RBAC/workspaces   β”‚ ◀── Android app
 Widget   ──▢ β””β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
 Phone    ──▢         β”‚                    β”‚                    β”‚
               LLM: vLLM / cloud /   TTS: XTTS v2 /       STT: Vosk /
               Claude Code bridge    OpenVoice / Piper    Whisper

The interactive architecture map and the architecture docs cover the rest.

Spin-off projects

Parts of the system that run on their own are published as separate repositories. They are read-only mirrors, synced from this repo on every merge, so issues and PRs go here.

Project What it is Source here
cli-openai-bridge Claude Code, Gemini CLI and Shell-GPT as an OpenAI-compatible API services/bridge
whatsapp-qr-bridge Self-hosted WhatsApp provider: a phone linked by QR β†’ REST + signed webhooks services/whatsapp-bridge
ai-chat-widget Embeddable AI chat for any website, one script tag web-widget

Documentation

Wiki User guides for every admin section
docs/arch/ Architecture by topic: backend, channels, КП, RAG, procurement, deployment
docs/REFERENCE.ru.md Full reference: API, environment variables, database, troubleshooting (RU)
CHANGELOG.md What changed

Contributing

Issues and PRs are welcome, in English or Russian. Start with CONTRIBUTING.md, look for good first issue, or ask in Discussions. Please report security problems privately, as described in SECURITY.md.

If the project is useful to you, a ⭐ helps others find it.

License

MIT

About

πŸ€– Open-source self-hosted AI sales assistant: drafts commercial offers from WhatsApp chats, managers approve in one tap in Telegram β€” never invents prices. Branching web chat, local LLM (vLLM) or Claude/GPT/Gemini, voice cloning, Telegram/WhatsApp/widget/phone. ru/en/kk.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

15 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages