Deploy make-bot

AI Telegram Bot with PostgreSQL (pydantic-ai + sqlmodel)

Deploy make-bot

make-bot

ferdousbhai/make-bot

Just deployed

Postgres

railwayapp-templates/postgres-ssl:16

Just deployed

/var/lib/postgresql/data

Deploy and Host make-bot on Railway

AI-powered Telegram bot with persistent conversation history using pydantic-ai and PostgreSQL. Features context management and advanced search capabilities.

About Hosting make-bot

Hosting make-bot on Railway provides a complete AI-powered Telegram bot infrastructure with zero configuration. The template automatically provisions PostgreSQL database storage, configures private networking, and sets up the Python runtime environment. Simply add your Telegram bot token and AI API keys to deploy a fully functional conversational AI bot with persistent memory across chat sessions.

Common Use Cases

  • Personal AI Assistant - Deploy your own private AI assistant accessible via Telegram
  • Customer Support Bot - Automated customer service with conversation history and context
  • Team Collaboration Bot - Internal team bot for project updates, reminders, and knowledge management
  • Educational Chatbot - Interactive learning companion with persistent student progress tracking
  • Content Creation Assistant - AI writing helper with conversation memory for iterative content development

Dependencies for make-bot Hosting

  • Telegram Bot Token - Obtained from @BotFather
  • AI Model API Key - Supports Anthropic Claude, OpenAI GPT, Google Gemini, and other pydantic-ai compatible models
  • PostgreSQL Database - Automatically provisioned by Railway template

Deployment Dependencies

Implementation Details

The bot uses SQLModel for type-safe database operations with automatic schema migration:

class ConversationTurn(SQLModel, table=True):
    id: int | None = Field(default=None, primary_key=True)
    chat_id: int = Field(index=True)
    user_message: str
    assistant_replies: list[str] = Field(default_factory=list, sa_type=JSON)
    timestamp: datetime = Field(default_factory=datetime.now, index=True)

The AI agent includes two core tools for conversation management:

  • get_chat_history - Advanced search with keyword filtering, time ranges, and turn-based indexing
  • reply_to_user - Telegram message delivery with MarkdownV2 formatting support

Why Deploy make-bot on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying make-bot on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Telegram JavaScript Bot
A template for Telegram bot in JavaScript using grammY

View Template
DiscordJS bot
A basic Discord bot written in JavaScript

View Template
Discord-TS 'Most Likely To Minigame' Bot
A simple "Most Likely To" minigame.