DocsOverview

Deployment

Guide

Deploy your autonomous agents to production. We support Edge Runtimes (Vercel, Cloudflare) and containerized environments (Docker, K8s).

Deployment Strategies#

Edge Runtime

Best for low-latency, stateless agents. Runs on Vercel, Cloudflare, or Netlify Edge.

• Sub-100ms latency
• Global CDN
• Auto-scaling

Docker Container

Best for long-running tasks, cron jobs, and agents requiring heavy dependencies.

• Full control
• Custom dependencies
• Background jobs

AKIOS Cloud

Fully managed control plane. Zero devops. Enterprise-grade security and compliance.

• Enterprise-grade security
• 99.9% uptime SLA
• Enterprise support

KUBERNETES

For large-scale deployments requiring orchestration, auto-scaling, and service mesh.

• Auto-scaling
• Service mesh
• Multi-region

Choosing the Right Strategy

Start With Edge Runtime
Perfect for prototyping and most web applications
Use Docker For Complexity
When you need custom dependencies or background processing
AKIOS Cloud For Enterprise
When compliance and managed infrastructure are required

Deploy to Vercel#

AKIOS agents are compatible with the Vercel AI SDK and Next.js App Router.

Edge Compatibility

Ensure you use the edge runtime in your route handler configuration for maximum performance.

Create Route HAndler

app/api/agent/route.ts
import { Agent } from '@akios/core'
import { StreamingTextResponse } from 'ai'

export const runtime = 'edge'

export async function POST(req: Request) {
  const { messages } = await req.json()
  
  const agent = new Agent({
    name: 'edge-assistant',
    model: 'gpt-4-turbo',
    systemPrompt: 'You are a helpful assistant.'
  })

  // Stream the response back to the client
  const stream = await agent.stream(messages.at(-1).content)
  return new StreamingTextResponse(stream)
}

Deploy Project

bash
vercel deploy

Deploy with Docker#

For background workers or custom infrastructure, use our official base image or build your own.

Dockerfile
FROM node:20-alpine AS base

# Install dependencies
WORKDIR /app
COPY package*.json ./
RUN npm ci --only=production && npm cache clean --force

# Build stage
FROM base AS builder
COPY . .
RUN npm run build

# Production stage
FROM base AS production
COPY --from=builder /app/dist ./dist
COPY --from=builder /app/package*.json ./

# Create non-root user
RUN addgroup -g 1001 -S nodejs && \
    adduser -S akios -u 1001

USER akios

EXPOSE 3000
CMD ["npm", "start"]

Environment Variables

Ensure the following variables are set in your container runtime:

VARIABLEREQUIREDDESCRIPTION
OpenAI API KeyIf using OpenAIYour OpenAI API key
Redis UrlFor memoryRedis connection string
Database UrlFor persistencePostgreSQL connection string
AKIOS License KeyFor EnterpriseYour AKIOS license key

Docker Compose Example

docker-compose.yml
version: '3.8'
services:
  akios-agent:
    build: .
    ports:
      - "3000:3000"
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
      - REDIS_URL=redis://redis:6379
    depends_on:
      - redis
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"
    volumes:
      - redis_data:/data
    restart: unless-stopped

volumes:
  redis_data:

Deploy to Kubernetes#

For production deployments requiring auto-scaling, rolling updates, and enterprise features.

deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  name: akios-agent
spec:
  replicas: 3
  selector:
    matchLabels:
      app: akios-agent
  template:
    metadata:
      labels:
        app: akios-agent
    spec:
      containers:
      - name: akios
        image: your-registry/akios-agent:latest
        ports:
        - containerPort: 3000
        env:
        - name: OPENAI_API_KEY
          valueFrom:
            secretKeyRef:
              name: akios-secrets
              key: openai-api-key
        - name: REDIS_URL
          value: "redis://redis-service:6379"
        resources:
          requests:
            memory: "512Mi"
            cpu: "250m"
          limits:
            memory: "1Gi"
            cpu: "500m"
        livenessProbe:
          httpGet:
            path: /health
            port: 3000
          initialDelaySeconds: 30
          periodSeconds: 10
        readinessProbe:
          httpGet:
            path: /ready
            port: 3000
          initialDelaySeconds: 5
          periodSeconds: 5

Service & Ingress

service.yaml
apiVersion: v1
kind: Service
metadata:
  name: akios-service
spec:
  selector:
    app: akios-agent
  ports:
    - port: 80
      targetPort: 3000
  type: ClusterIP

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: akios-ingress
  annotations:
    nginx.ingress.kubernetes.io/ssl-redirect: "true"
spec:
  tls:
  - hosts:
    - your-domain.com
    secretName: tls-secret
  rules:
  - host: your-domain.com
    http:
      paths:
      - path: /
        pathType: Prefix
        backend:
          service:
            name: akios-service
            port:
              number: 80

AKIOS Cloud Enterprise#

Fully managed deployment with enterprise security, compliance, and support.

Security & Compliance

  • ✓ SOC 2 Type II certified
  • ✓ End-to-end encryption
  • ✓ GDPR & HIPAA compliant
  • ✓ Private networking options

Managed Services

  • ✓ 99.9% uptime SLA
  • ✓ Auto-scaling
  • ✓ 24/7 enterprise support
  • ✓ Performance monitoring
deploy-cloud.sh
# Deploy to AKIOS Cloud
akios deploy --cloud

# Or use the web dashboard
# Visit https://cloud.akios.dev

# Monitor your deployment
akios logs --cloud --follow

Getting Started with Cloud

Contact our enterprise sales team at enterprise@akios.devto set up your AKIOS Cloud account and get started.