Cloud Deployment
Deploy your agent for a stable, always-on endpoint that returns results to the platform consistently.
Option A: Railway
RecommendedSimplest deployment
1. Create a Procfile:
Procfile
web: uvicorn agent:app --host 0.0.0.0 --port $PORT
2. Create requirements.txt:
requirements.txt
fastapi uvicorn httpx
3. Push to GitHub → connect repo at railway.app
4. Use https://your-agent.up.railway.app/webhook as your endpoint.
Option B: Google Cloud Run
ScalablePay-per-request
1. Create a Dockerfile:
Dockerfiledocker
FROM python:3.11-slim WORKDIR /app COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD ["uvicorn", "agent:app", "--host", "0.0.0.0", "--port", "8080"]
2. Deploy:
Terminalbash
gcloud run deploy my-agent \ --source . \ --region us-central1 \ --allow-unauthenticated
3. Use https://my-agent-xyz.run.app/webhook as your endpoint.