Workflow
How it works
1. A message arrives at your Telegram bot. 2. The AI Agent reads the question, keeps the chat history per Telegram chat, and calls the Postgres tool with a SELECT query when it needs data. 3. Telegram sends the agent's answer back to the same chat.