Departments Docs

Deployment Guide

Deploy, scale, and manage your Departments nexus in production. Covers infrastructure requirements, region selection, security policies, and monitoring.

Available Regions

Departments runs on a global neural mesh. Agents are automatically placed in the closest region to minimize latency.

Region CodeLocationLatency (p95)Status
us-neural-1US East (N. Virginia)12msOperational
us-neural-2US West (Oregon)18msOperational
eu-cortex-1EU West (Frankfurt)24msOperational
eu-cortex-2EU North (Stockholm)29msOperational
ap-synapse-1Asia Pacific (Tokyo)42msOperational
ap-synapse-2Asia Pacific (Singapore)51msDegraded
sa-axon-1South America (São Paulo)78msOperational

Production Deployment

Use the dep deploy command with the --prod flag to deploy to a production nexus:

dep deploy --prod --region us-neural-1 --replicas 3

# ╔══════════════════════════════════════════════════════╗
# ║   Production Deployment — Departments v4.2.7        ║
# ╚══════════════════════════════════════════════════════╝
#
# ✔ Building agent images... done (4.2s)
# ✔ Pushing to registry... done
# ✔ Provisioning 3 replicas in us-neural-1... done
# ✔ Establishing neural links... done
# ✔ Health check passed (12ms p95)
# ✔ Attaching volumes... done
# ✔ Registering with global router... done
#
#   Deployment ID  : dep_p8m3k2x9
#   Agents Deployed: 4 (12 replicas total)
#   Endpoint       : https://prod-nexus.departments.cyrus365.com
#   Status         : ACTIVE — all systems nominal

Scaling

Scale individual departments or the entire nexus horizontally. Auto-scaling policies can be configured based on throughput, latency, or queue depth.

# Manual scale
dep scale --agent cogniscan-Ω --replicas 5

# Auto-scaling policy
dep scale --policy throughput \
  --min-replicas 2 \
  --max-replicas 12 \
  --target-throughput 1000 \
  --cooldown 120

# Output:
# ✔ Policy applied to agent [cogniscan-Ω]
# ✔ Current replicas: 3
# ✔ Auto-scaling: ENABLED (throughput-based)
# ✔ Target: 1,000 ops/s per replica

CI/CD Pipeline

Integrate with your existing CI/CD workflows using the dep CLI and the Departments GitHub Action:

# .github/workflows/deploy.yml
name: Deploy Nexus
on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: cyrus365/dep-actions/deploy@v1
        with:
          token: ${{ secrets.DEP_TOKEN }}
          config: ./nexus.json
          region: us-neural-1
          replicas: 3
          notify: slack://deployments

Security Policies

Departments supports granular access control through RBAC and API token scoping.

RolePermissionsScope
adminFull access to all resourcesOrganization
deployerDeploy / scale / rollback agentsSingle nexus
operatorView logs, metrics, statusSingle nexus
agentAgent-to-agent communication onlyInternal mesh
# RBAC policy example: policies/production.yml
policies:
  - role: deployer
    principals: ["team:devops", "user:chris@cyrus365.com"]
    resources:
      - "nexus:production-nexus"
    actions:
      - agents:deploy
      - agents:scale
      - agents:rollback
    conditions:
      - require_mfa: true
      - allowed_regions: ["us-neural-1", "eu-cortex-1"]

Monitoring & Observability

Every nexus emits structured logs and metrics. Integrate with your observability stack via the dep logs and dep metrics commands:

# Tail live agent logs
dep logs --tail --filter "level:error"

# Export metrics to Prometheus
dep metrics --format prometheus --interval 15s

# Sample metrics
# dep_agent_throughput{agent="cogniscan-Ω"} 847.3
# dep_agent_latency_ms{agent="cogniscan-Ω"} 12
# dep_agent_memory_usage{agent="cogniscan-Ω"} 0.67
# dep_consensus_votes_total{outcome="approved"} 12847
# dep_nexus_active_replicas{region="us-neural-1"} 12