NOMOS provides multiple deployment options to suit different environments and requirements.

CLI Deployment

Quick Deployment with CLI

The simplest way to deploy your agent is using the NOMOS CLI:

# Deploy with FastAPI server
nomos serve --config config.agent.yaml

CLI Usage Guide

See complete deployment options in the CLI documentation

Docker Base Image

NOMOS provides a base Docker image that you can use to quickly containerize your agents. The base image is available on Docker Hub as dowhiledev/nomos-base.

1

Create a Dockerfile using the base image

# If using the base image
FROM dowhiledev/nomos-base:latest
# Copy your config file
COPY config.agent.yaml /app/config.agent.yaml
# Copy your tools
COPY tools.py /app/src/tools/
2

Or Build from scratch

# If building from scratch
FROM python:3.11-slim
WORKDIR /app
# Install dependencies
RUN pip install nomos[cli,openai]
# Copy files
COPY . /app/
CMD ["nomos", "serve", "--config", "config.agent.yaml"]
3

Build and run your container

docker build -t your-nomos-agent .
docker run -e OPENAI_API_KEY=your-api-key-here -p 8000:8000 your-nomos-agent

Environment Variables

Essential environment variables for deployment:

VariableDescriptionRequired
OPENAI_API_KEYOpenAI API keyIf using OpenAI
ANTHROPIC_API_KEYAnthropic API keyIf using Anthropic
MISTRAL_API_KEYMistral API keyIf using Mistral
GOOGLE_API_KEYGoogle API keyIf using Gemini
HUGGINGFACE_API_TOKENHuggingFace tokenIf using HuggingFace

Production Considerations

Security

Use environment variables for API keys and secrets

Scaling

Configure multiple workers for high traffic

Monitoring

Enable logging and monitoring for production

Health Checks

Implement health check endpoints

Cloud Deployment

Docker Compose

For orchestrated deployments:

version: '3.8'
services:
  nomos-agent:
    image: your-nomos-agent:latest
    ports:
      - "8000:8000"
    environment:
      - OPENAI_API_KEY=${OPENAI_API_KEY}
    volumes:
      - ./config.agent.yaml:/app/config.agent.yaml
      - ./tools.py:/app/src/tools/

Kubernetes

Basic Kubernetes deployment:

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nomos-agent
spec:
  replicas: 3
  selector:
    matchLabels:
      app: nomos-agent
  template:
    metadata:
      labels:
        app: nomos-agent
    spec:
      containers:
      - name: nomos-agent
        image: your-nomos-agent:latest
        ports:
        - containerPort: 8000
        env:
        - name: OPENAI_API_KEY
          valueFrom:
            secretKeyRef:
              name: api-keys
              key: openai-key

Remember to properly manage secrets and API keys in production environments.