examples/showcases/scene-creator/agent/DEPLOY.md
This guide covers deploying the LangGraph agent to Railway.
npm install -g @railway/cliInstall Railway CLI (if not already installed):
npm install -g @railway/cli
Login to Railway:
railway login
Initialize Railway project (from the agent directory):
cd agent
railway init
Set environment variables:
railway variables set GOOGLE_API_KEY=your-google-ai-api-key-here
Deploy:
railway up
Get the deployment URL:
railway domain
Go to Railway Dashboard
Create New Project:
Configure the service:
/agentSet Environment Variables:
GOOGLE_API_KEY = your Google AI API keyDeploy:
Get the URL:
https://your-project.up.railway.appAdd this to your repository README:
[](https://railway.app/template/your-template-id)
After deploying the agent, update your Next.js frontend to use the Railway URL:
Open src/app/api/copilotkit/route.ts
Update the agent URL:
const agent = new LangGraphAgent({
agentUrl: process.env.AGENT_URL || "https://your-project.up.railway.app",
});
Add to your .env.local:
AGENT_URL=https://your-project.up.railway.app
Once deployed, verify the agent is running:
curl https://your-project.up.railway.app/health
railway logsLANGCHAIN_TRACING_V2=true and LANGCHAIN_API_KEYRailway pricing:
For production deployment, consider: