smixs/iva-agent
AI assistant in Telegram that remembers everything and helps you run your life. Self-hosted in one command.
What it solves
Iva solves the problem of losing track of conversations, decisions, and tasks buried in a chat history. It acts as a personal AI secretary inside Telegram, capturing everything you send — voice notes, photos, forwarded posts, and plain messages — and turning them into a structured, searchable vault of markdown files. Months later, you can ask "What did we agree with client X about the last shipment?" and get an answer in seconds, even after the chat window scrolled away.
How it works
Iva runs as a bot that long-polls Telegram, so no public HTTPS domain or webhook is needed. It listens to your messages, transcribes voice with Deepgram (auto-detecting ru/uz/en), describes photos using your chosen model provider's vision capabilities, and stores every message verbatim in a daily markdown log. A nightly rollup at 04:00 distills this into summaries at day/week/month/year levels and writes typed cards for contacts, projects, decisions, ideas, and notes. Everything lives in a memory tree: leaves (daily logs), branches (summaries), and a trunk (CORE.md and cards). CORE.md (≤3600 characters) is injected into every prompt, so Iva always has context before it searches.
Search uses BM25 plus a link-graph rerank, with an optional vector mode. The system also includes a prompt-injection sanitizer that flags forwarded content before the model reads it, and a secret-redaction gate for outgoing messages. It runs as two systemd user services, two watchdog timers, and seven in-process schedules. Operations are managed via an installer that sets everything up on a Ubuntu/Debian box or Mac.
Who it's for
Iva is designed for business owners, specialists, executives, and everyday users who want a private, self-hosted AI assistant that remembers details and handles routine work inside Telegram. It suits people who already use Telegram heavily and need to offload tasks like following up with clients, summarizing group chats, creating documents, or managing a personal CRM — all while keeping their data on their own server.
Highlights
- Voice and vision – Voice notes, audio, and video messages are transcribed; photos are described by the provider's vision model without extra keys or costs.
- Layered memory – Every message is logged verbatim, then folded into daily, weekly, monthly, and yearly summaries, with a CORE.md that rides in every prompt.
- Personal CRM and decision cards – Tracks contacts, agreements, and decisions with dated history; tasks and reminders with priorities and due dates.
- Search by meaning – BM25 plus link-graph rerank, any language; optional vector mode with one key.
- Google Workspace integration – Gmail, Calendar, Drive, Sheets, Docs, and Tasks controlled directly from chat via the
gwsCLI. - Skills and MCP – Drop a file to add a procedure or connect an MCP server; keys stay in
.env. - Userbot (opt-in, at own risk) – Connect your personal Telegram account to read group chats, summarize unreads, and reply as you, with a server-enforced anti-ban guardrail (FloodWait compliance, randomized pacing, circuit-breaker).
- Prompt-injection sanitizer and secret redaction – Untrusted input from the web, transcripts, and forwarded text is screened before reaching the model; outgoing messages pass a redaction gate.
- Token accounting – Every model step is logged, and
/usagereports it for free.
Related
- Project
- Project
- Project
- Project