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:
Basic Deployment
Custom Configuration
With Tools
# 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
.
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/
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" ]
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:
Variable Description Required OPENAI_API_KEY
OpenAI API key If using OpenAI ANTHROPIC_API_KEY
Anthropic API key If using Anthropic MISTRAL_API_KEY
Mistral API key If using Mistral GOOGLE_API_KEY
Google API key If using Gemini HUGGINGFACE_API_TOKEN
HuggingFace token If 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.
Responses are generated using AI and may contain mistakes.