Skip to content

Latest commit

 

History

History
227 lines (172 loc) · 5.4 KB

README.md

File metadata and controls

227 lines (172 loc) · 5.4 KB

AgentOS: Enterprise-Grade Agent Infrastructure Platform

Join our Discord Subscribe on YouTube Connect on LinkedIn Follow on X.com

GitHub stars Swarms Framework

GitHub stars PyPI version License Documentation Status

AgentOS is an enterprise-ready infrastructure platform designed for deploying, managing, and scaling AI agents in production environments. It provides secure sandboxed environments, robust monitoring, and scalable architecture for reliable agent operations.

🚀 Key Features

  • Secure containerized environment
  • Integrated memory system
  • Tool access management
  • API endpoints for agent interaction
  • Horizontal scaling support
  • Production-grade security

Prerequisites

  • Docker 24.0+
  • Docker Compose 2.0+
  • Kubernetes 1.25+ (for orchestration)

Environment Variables

Create a .env file with the following required variables:

# Core Configuration
WORKSPACE_DIR=agent_workspace

# API Keys
OPENAI_API_KEY=your_openai_key
ANTHROPIC_API_KEY=your_anthropic_key
PINECONE_API_KEY=your_pinecone_key
GOOGLE_API_KEY=your_google_key
REPLICATE_API_TOKEN=your_replicate_token
STABILITY_API_KEY=your_stability_key
COHERE_API_KEY=your_cohere_key

# Optional Configuration
WORKERS=4
TIMEOUT=120
LOG_LEVEL=warning
MAX_REQUESTS=10000

Quick Start

Using Docker

  1. Build the image:
docker build -t agent-api:latest .
  1. Run the container:
docker run -d \
    --name agent-api \
    --env-file .env \
    -p 8000:8000 \
    -v $(pwd)/data:/agent_workspace/data \
    -v $(pwd)/logs:/agent_workspace/logs \
    --security-opt=no-new-privileges \
    --cap-drop=ALL \
    --read-only \
    agent-api:latest

Using Docker Compose

  1. Start the services:
docker compose up -d
  1. View logs:
docker compose logs -f
  1. Stop services:
docker compose down

Kubernetes Deployment

  1. Create required namespaces and secrets:
# Apply the complete configuration
kubectl apply -f complete-agent-deployment.yaml

# Verify the deployment
kubectl get all -n agent-system
  1. Monitor the deployment:
kubectl get pods -n agent-system
kubectl describe deployment agent-api -n agent-system

Security Configuration

Docker Security Features

  • Non-root user execution
  • Read-only filesystem
  • Dropped capabilities
  • No privilege escalation
  • Resource limitations
  • Health checks

Kubernetes Security Features

  • Network policies
  • Resource quotas
  • Security contexts
  • Service accounts
  • Secret management

Directory Structure

/
├── Dockerfile
├── docker-compose.yml
├── complete-agent-deployment.yaml
├── .env
├── data/
└── logs/
└── agent_api/
    └── main.py

Monitoring

Docker

# Container stats
docker stats agent-api

# Container logs
docker logs -f agent-api

# Container health
docker inspect agent-api

Kubernetes

# Pod metrics
kubectl top pods -n agent-system

# Pod logs
kubectl logs -f deployment/agent-api -n agent-system

# Deployment status
kubectl get deployment agent-api -n agent-system -o wide

Production Deployment Checklist

  1. Environment Configuration

    • Set all required API keys
    • Configure resource limits
    • Set appropriate log levels
  2. Security

    • Enable security features
    • Configure network policies
    • Set up secret management
  3. Storage

    • Configure persistent volumes
    • Set up backup solutions
    • Configure log rotation
  4. Monitoring

    • Set up health checks
    • Configure logging
    • Set up metrics collection

API Endpoints

The service exposes the following endpoint:

  • http://localhost:8000/health - Health check endpoint

Troubleshooting

Common Issues

  1. Container fails to start:
# Check container logs
docker logs agent-api

# Check container status
docker inspect agent-api
  1. Permission issues:
# Ensure volumes have correct permissions
chmod -R 770 data logs
  1. Resource constraints:
# Check resource usage
docker stats agent-api

Support

For issues and feature requests, please open an issue in the repository.

License

MIT License