Skip to main content

Functions Service (Part A)

Your Functions Service is where your @DaemoFunction code lives. It must be running for the AI to execute your functions.


Deployment Options​

Recommended

🚀 Serverless

Vercel, Railway, or Render

  • Push to GitHub → auto-deploys
  • Free tiers available
  • Zero config

🐳 Docker

Any cloud or VPS

  • Full control
  • Works anywhere
  • Self-managed

💻 Local

Your laptop

  • For development
  • Instant changes
  • Only works when on

⚡ Edge Functions

Deploy to Daemo

  • Zero infrastructure
  • Global CDN
  • Auto-scaling
Coming Soon

🎯 1-Click Deploy

Deploy from Dashboard

  • Connect your repo
  • One click deploy
  • Managed hosting
Coming Soon

Serverless (Vercel/Railway/Render)​

The easiest option for production. Push your code, get a URL.

Deploy to Vercel​

# Install Vercel CLI
npm i -g vercel

# Deploy
vercel

# Set environment variables
vercel env add DAEMO_AGENT_API_KEY

Deploy to Railway​

# Install Railway CLI
npm i -g @railway/cli

# Login and deploy
railway login
railway init
railway up

# Set environment variables in dashboard

Deploy to Render​

  1. Push your repo to GitHub
  2. Create a new Web Service on render.com
  3. Connect your repo
  4. Set Build Command: npm install && npm run build
  5. Set Start Command: npm start
  6. Add environment variables
Tip

All three have free tiers. Vercel and Railway are especially quick to set up.


Docker​

For maximum control or existing Docker infrastructure.

Dockerfile​

FROM node:20-alpine

WORKDIR /app

COPY package*.json ./
RUN npm ci --only=production

COPY dist/ ./dist/

ENV NODE_ENV=production

CMD ["node", "dist/index.js"]

Build and Run​

# Build
docker build -t my-daemo-service .

# Run locally
docker run -p 3000:3000 \
-e DAEMO_AGENT_API_KEY=your_key \
my-daemo-service

# Push to registry
docker push your-registry/my-daemo-service

Deploy Anywhere​

PlatformCommand
AWS ECSaws ecs create-service ...
Google Cloud Rungcloud run deploy ...
DigitalOceanUse App Platform
Any VPSdocker run on your server

Local Development​

For active development. Fastest iteration, but only works while your machine is on.

# Development with auto-reload
npm run dev

# Or production build
npm run build
npm start
Warning

Local = only works when laptop is open. For 24/7 availability, deploy to serverless or Docker.

Keep Running with PM2​

# Install PM2
npm i -g pm2

# Start and keep running
pm2 start dist/index.js --name "my-agent"
pm2 save

Checklist​

Before deploying, make sure you have:

  • Daemo SDK installed (npm install daemo-engine)
  • Functions decorated with @DaemoFunction
  • API key from app.daemo.ai
  • Environment variables set
  • Tested locally with Playground

Verify Deployment​

After deploying, check that your service is connected:

  1. Go to app.daemo.ai
  2. Select your Agent
  3. Check the Services tab — should show "Online"
  4. Test in the Playground
Note

Service offline? Check your logs for connection errors. Make sure DAEMO_AGENT_API_KEY is set correctly.


Next: Chat Interface​

Once your functions service is deployed, integrate it into your apps →