
Deploy Smooth Operator
an agent to manage your daily ops
operator-agent
Just deployed
/data
Deploy and Host Smooth Operator on Railway
Smooth Operator is a Telegram-based AI operator for daily ops. Ask it questions about incidents, customers, logs, databases, and deploys, and it investigates connected systems for you. Instead of jumping between dashboards and support threads, you get grounded answers in one chat powered by your chosen OpenRouter model.
About Hosting Smooth Operator
Hosting Smooth Operator on Railway gives you an always-on AI operator that runs in your own cloud environment. Deploy the template, add your Telegram bot token, add your OpenRouter API key, choose an OpenRouter model, and start chatting with your bot. Railway keeps the service running and provides persistent storage so sessions and runtime state survive redeploys. You can begin with just Telegram and OpenRouter, then optionally connect Datadog or a Postgres database when you want Smooth Operator to investigate production systems.
Common Use Cases
- Ask “what happened?” during incidents and get a concise investigation summary.
- Debug customer issues from Telegram using connected logs, databases, and operational context.
- Run an AI ops assistant with your preferred OpenRouter model instead of being locked into one provider.
Dependencies for Smooth Operator Hosting
- Telegram bot token from BotFather.
- OpenRouter API key.
- OpenRouter model name, such as
anthropic/claude-sonnet-4.5,google/gemini-2.5-pro, or another supported model. - Optional Datadog API/App keys for log and incident investigation.
- Optional Postgres database URL for database inspection.
Deployment Dependencies
- Railway template: https://railway.com/deploy/To01dE
- Create a Telegram bot with BotFather: https://t.me/BotFather
- OpenRouter API keys: https://openrouter.ai/settings/keys
- OpenRouter models: https://openrouter.ai/models
- Datadog API keys: https://docs.datadoghq.com/account_management/api-app-keys/
Implementation Details
For the OpenRouter setup, set these Railway variables:
PI_PROVIDER=openrouter
OPENROUTER_API_KEY=your_openrouter_api_key
OPENROUTER_MODEL=anthropic/claude-sonnet-4.5
TELEGRAM_BOT_TOKEN=your_telegram_bot_token
You can change OPENROUTER_MODEL later if you want to switch models.
### Why Deploy Smooth Operator 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 Smooth Operator 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
operator-agent
thearyanag/operator-agentDD_SITE
PI_MODEL
Optional: product-level provider choice. Leave empty to use the default Anthropic model.
DD_API_KEY
DD_APP_KEY
Optional Datadog site override, for example datadoghq.com or us5.datadoghq.com.
PI_WORKDIR
Required for the default Anthropic model unless Anthropic auth is already configured in pi settings.
PI_PROVIDER
OpenRouter mode: user provides an API key and model string.
DATABASE_URL
Required for the local Datadog MCP package if enabled in .mcp.json.
PI_SESSION_DIR
Optional: comma-separated directories that pi may send as Telegram file attachments
ALLOWED_GROUP_ID
Optional: stream private-DM assistant text through Telegram sendMessageDraft.
OPENROUTER_MODEL
OpenAI Codex mode: user provides the credential fields normally stored in ~/.pi/agent/auth.json.
ANTHROPIC_API_KEY
Optional: explicit pi model in provider/model-id format.
PI_THINKING_LEVEL
Optional: extra comma-separated extension file or directory paths for pi.
OPENAI_CODEX_MODEL
OPENROUTER_API_KEY
PI_EXTENSION_PATHS
Optional: path to the operator system prompt markdown file.
PI_SYSTEM_PROMPT_PATH
Optional: custom directory for persisted per-chat pi sessions.
OPENAI_CODEX_AUTH_JSON
Optional: pi thinking level.
OPENAI_CODEX_ACCOUNT_ID
Alternative OpenAI Codex input: either the openai-codex credential object or the full auth.json object.
OPENAI_CODEX_ACCESS_TOKEN
TELEGRAM_ATTACHMENT_ROOTS
Required for the local Postgres MCP package if enabled in .mcp.json.
TELEGRAM_BUSINESS_DRY_RUN
Optional: working directory pi should operate in.
OPENAI_CODEX_EXPIRES_AT_MS
OPENAI_CODEX_REFRESH_TOKEN
ENABLE_TELEGRAM_NATIVE_STREAMING
Optional: enable Telegram Business / Chat Automation messages.
ENABLE_TELEGRAM_BUSINESS_AUTOMATION
Optional: comma-separated Telegram user IDs whose connected Business accounts may auto-reply.
TELEGRAM_BUSINESS_ALLOWED_OWNER_IDS
Optional: run Business automation without sending replies to managed chats.

