
Deploy make-bot
AI Telegram Bot with PostgreSQL (pydantic-ai + sqlmodel)
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 indexingreply_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
make-bot
ferdousbhai/make-botMODEL_IDENTIFIER
AI model provider name and model name separated by colon (e.g., anthropic:claude-sonnet-4-20250514
)
TELEGRAM_BOT_TOKEN
Your telegram bot token from BotFather