AI Agents

Host agents, MCP servers, RAG pipelines, model gateways and inference services.

Get started

3 guides, in order

Build and deploy

21 guides
Build 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 guide

Compare and decide

4 guides

More guides

4 guides