AI Agents
Host agents, MCP servers, RAG pipelines, model gateways and inference services.
Get started
3 guides, in order- Step 1Deploy a Remote MCP Server Over HTTPSDeploy an existing MCP server, such as Playwright MCP, to a public HTTPS endpoint on Railway with object storage and bearer-token auth, and compare Railway against Render, Fly.io, Cloudflare, and AWS as a host.
- Step 2Use Object Storage for AI Agent OutputsStore AI agent artifacts in S3-compatible object storage on Railway. Where generated files, transcripts, and reports should live, how to write them from a worker, and how to share them with presigned URLs.
- Step 3Build and Deploy Your Own MCP ServerBuild a remote MCP server in TypeScript with Streamable HTTP transport and deploy it on Railway. Expose your app's data as tools that AI assistants like Claude and Cursor can call over the network.
Build and deploy
21 guidesBuild an LLM Gateway in TypeScriptBuild and deploy an LLM gateway on Railway that issues its own API keys, enforces per-key token budgets, and tracks spend across teams. One place to hold provider keys instead of scattering them across services.Deploy a LangGraph Agent BackendRun a LangGraph agent as a FastAPI service on Railway with Postgres checkpointing for durable conversation state and Claude as the LLM.Self-Host Langfuse for LLM ObservabilityDeploy Langfuse v3 on Railway with Postgres, ClickHouse, Redis, and object storage. Trace, debug, and evaluate your LLM applications on infrastructure you control.Run an Embeddings Pipeline with an External API and pgvectorDeploy a batch worker on Railway that generates embeddings through an external API and stores them in Postgres with pgvector. Covers schema design, safe concurrent processing, and the psycopg2 vector adaptation gotcha.Run Code-Execution Sandboxes for AI AgentsRun AI-generated code in isolated, disposable sandboxes on Railway. What a code-execution sandbox is, why agents need one, and how to create, checkpoint, fork, and destroy sandboxes from the CLI or the TypeScript SDK.Deploy a Claude Agent SDK AppDeploy a Claude Agent SDK service on Railway that runs agent tasks over HTTP, streams progress as NDJSON, and stays inside the platform's request limits.Deploy an LLM Gateway with LiteLLMDeploy LiteLLM Proxy on Railway as an LLM gateway for multiple providers. Covers model routing, cost tracking, API key management, caching with Redis, and private networking.Build an AI API on Hosted Inference ProvidersBuild and deploy an AI API on Railway that calls hosted inference providers for model output. Covers provider selection, OpenAI-compatible endpoints, streaming, timeouts, and provider fallback.Use Agents in Railway SandboxesDrive Railway sandboxes from your local AI coding agent. Spin up isolated environments for development, run agents against your real infrastructure, and use the create, configure, checkpoint, and fork loop to move fast.Running Agents on RailwayLearn how to deploy always-on, autonomous AI agents on Railway by building a Claude-powered GitHub DevBot that opens pull requests in response to new issues.Deploy a RAG Pipeline with pgvectorBuild a retrieval-augmented generation pipeline on Railway using Postgres with pgvector for vector storage, an external embedding API, and an LLM for generation. Covers document ingestion, similarity search, and deployment.Self-Host Open WebUIDeploy Open WebUI on Railway to get a ChatGPT-like interface that connects to OpenAI, Anthropic, and other LLM providers. Includes persistent storage and authentication setup.Deploy a Multi-Agent System on RailwayDeploy multiple AI agents as separate Railway services that communicate via Redis and Postgres. Includes working orchestrator and agent code, inter-service communication, and independent scaling.Self-Host FlowiseDeploy Flowise on Railway with persistent storage and authentication. Build LLM chains, agents, and chatbots through a visual drag-and-drop interface without managing servers.Self-Host DifyDeploy Dify on Railway with Postgres, Redis, and persistent storage. Build AI applications, RAG pipelines, and agent workflows through Dify's visual interface.Deploy an AI-Powered SaaS App on RailwayDeploy a production AI-powered SaaS application on Railway with an Express backend, Postgres database, and external LLM API integration. Covers API key management, request caching, rate limiting, and async processing for longer tasks.Deploy an AI-Powered Bot for Discord or TelegramDeploy a Discord or Telegram bot on Railway that uses LLM APIs for conversational responses. Covers always-on deployment, API key management, conversation memory with Postgres, and rate limit handling.Deploy an AI Chatbot with Streaming ResponsesDeploy a chatbot on Railway that streams LLM responses token by token using Server-Sent Events. Covers Next.js with the AI SDK, API key management, and optional conversation persistence with Postgres.Deploy an AI Agent with Async WorkersRun AI agent workflows on Railway with an API service, async workers via Redis queue, and Postgres for state persistence. Covers CPU-based agent patterns without GPU.Set Up a Datadog Agent in RailwayLearn how to set up a Datadog agent in Railway.Deploy Triton Inference Server on RailwayLearn the benefits of using Triton inference server and how to deploy it on Railway
Run in production
1 guideCompare and decide
4 guidesChoose Between Local and Remote MCP ServersWhen an MCP server should run locally over stdio and when it should be a remote Streamable HTTP service. Decision factors, what the 2026 spec changed, and how to deploy the remote kind on Railway.Connect the Best MCP Servers to Your Coding AgentConfig snippets for connecting nine widely used MCP servers to Claude Code, Cursor, and VS Code, covering GitHub, Postgres, browser automation, docs lookup, error tracking, and deployment.The Best Platforms to Deploy AI Apps in 2026 (Not the Models, the Apps Around Them)Most 'best AI hosting' lists conflate model serving with hosting the app that calls the model. A ranking that splits the two layers and shows which platform serves which.The Best Cloud Platform MCP Servers in 2026Which cloud platforms expose their full surface area to agents over MCP, which expose only fragments, and where each provider actually fits for agent-driven workflows.
More guides
4 guidesStream AI Responses to a Frontend with Server-Sent EventsStream LLM tokens from an API service to a frontend using Server-Sent Events on Railway. Covers Express and Hono server implementations, client-side consumption, and reconnection handling.Estimate the Cost of Running AI AgentsWhat an always-on AI agent costs to run. How to calculate LLM API spend per run, what the hosting compute actually costs on Railway's usage-based pricing, and where the money goes as you scale.The Agent-Native Cloud: What It Means and Why It MattersThe cloud category reorders itself every seven years around a new primitive. The 2026 primitive is the agent, and most clouds have not picked a position on it yet. A manifesto on the next consolidation event.Agentic Coding on Railway: A Practical Guide for 2026A practitioner walkthrough on using Claude Code, Cursor, and Codex to drive Railway deployments end to end. Five real workflows, six production gotchas, and what works today vs what's coming.