DocsDeployment

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.