portfolioprojects
paris, fr
← all projects
MULTI-USER TELEGRAM AGENT · MCP● LIVE

A bot that reasons before it acts

A multi-user Telegram assistant built as a modular monorepo — a custom ReAct reasoning loop calls calendar, weather and notes through three standalone MCP servers, with voice input and long-term memory.

role
Solo build
year
2025
interface
Telegram · text + voice
architecture
uv monorepo · 3 MCP servers
runtime
Python 3.12 · Docker
Flow diagram: a Telegram message — voice first transcribed by Whisper — reaches a per-user agent running a ReAct loop (reason, act, observe) that calls three MCP tool servers (calendar, weather, notes) over JWT and reads or writes long-term memory in Qdrant, then replies. A scheduler pushes proactive messages.
How one message flows — text or voice arrives in Telegram (voice is transcribed by Whisper first), a per-user agent runs a ReAct loop (reason → act → observe) that calls the three MCP tool servers over JWT and reads or writes long-term memory in Qdrant, then answers. A scheduler can also push proactive messages on its own.
01OVERVIEW

The idea is a personal assistant you simply talk to in Telegram — by text or by voice — that can actually do things: check your calendar, the weather and your notes, and remember you from one conversation to the next. Every user gets their own isolated agent, with its own history, settings and memory.

Rather than one large program, it's a monorepo of small, independent services. A reasoning framework I wrote — a ReAct loop built on pydantic-ai — lets the agent think step by step: reason about the request, pick a tool, read the result, and repeat until it can answer. The tools themselves live in three standalone MCP (Model Context Protocol) servers — calendar, weather and notes — each its own HTTP service, secured between services with JWT, and deployable on its own.

Voice messages are transcribed with OpenAI Whisper; long-term memory is stored as vectors in a Qdrant database so the bot can recall earlier context and answer in a personalised way; and a scheduler pushes proactive messages like a daily weather brief. A shared core library handles structured logging, auth and health checks, and everything is containerised so it can run under Docker Compose or Kubernetes.

I built all of this by hand in 2025 — the reasoning loop, the tool servers, the memory and the scheduling — directly on raw MCP, before self-hosted agent frameworks like OpenClaw packaged the same pattern: a personal assistant wired to your own calendar, notes and messaging that remembers you and acts on a schedule.

02WHAT I BUILT
01

Custom ReAct reasoning framework

A generic Reason → Act → Observe loop built on pydantic-ai, with visible reasoning steps and iterative refinement until the task is solved. It's LLM-agnostic and reused as a standalone library across the monorepo.

02

Three MCP tool servers

Calendar (Google Calendar with role-based access), weather (Open-Meteo, no API key) and notes & tasks (Notion-backed). Each is an independent, JWT-secured HTTP service that can be deployed and scaled on its own.

03

Multi-user isolation & memory

Per-user agent instances with separate conversation history and settings, plus optional long-term semantic memory in Qdrant so responses stay grounded in what the user told the bot earlier.

04

Voice, scheduling & operations

Whisper voice transcription, a scheduler for proactive notifications, and a shared core library (logging, JWT auth, health probes). Packaged as a uv workspace monorepo, fully containerised with Docker.

03STACK

Agent · LLM

pydantic-aiReActRAGOpenAI Whisper

Tools · MCP

Google CalendarOpen-MeteoNotion

Systems

Python 3.12uv monorepoDockerJWTQdrantPostgreSQL