This guide covers deploying AgentMesh in production-ready configurations.
For local development and testing:
# Start all services
docker-compose up -d
# View logs
docker-compose logs -f server
# Access services
# - AgentMesh API: http://localhost:8080
# - Prometheus: http://localhost:9090
# - Grafana: http://localhost:3000 (admin/agentmesh)
# - Redis: localhost:6379
# - PostgreSQL: localhost:5432
# Stop services
docker-compose down- Kubernetes cluster (1.24+)
- Helm 3.x
- kubectl configured
# Add Bitnami repository (for dependencies)
helm repo add bitnami https://charts.bitnami.com/bitnami
helm repo update
# Install AgentMesh
helm install agentmesh ./charts/agentmesh \
--namespace agentmesh \
--create-namespace \
--set redis.auth.password=your-secure-password \
--set storage.backend=redis
# Check deployment status
kubectl get pods -n agentmesh
kubectl get svc -n agentmeshCreate a values-production.yaml:
# Production configuration
replicaCount: 5
resources:
limits:
cpu: 2000m
memory: 2Gi
requests:
cpu: 500m
memory: 512Mi
autoscaling:
enabled: true
minReplicas: 5
maxReplicas: 20
storage:
backend: redis
cacheEnabled: true
redis:
enabled: true
auth:
password: "CHANGE-ME"
master:
persistence:
enabled: true
size: 20Gi
replica:
replicaCount: 3
observability:
opentelemetry:
enabled: true
endpoint: "http://otel-collector:4317"
prometheus:
enabled: true
logs:
level: INFO
ingress:
enabled: true
className: nginx
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
hosts:
- host: agentmesh.yourdomain.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: agentmesh-tls
hosts:
- agentmesh.yourdomain.comDeploy with custom values:
helm install agentmesh ./charts/agentmesh \
-f values-production.yaml \
--namespace agentmesh \
--create-namespaceDeploy governed agents using the CRD:
apiVersion: mesh.agentmesh.ai/v1
kind: GovernedAgent
metadata:
name: data-processor
namespace: my-app
spec:
image: my-company/data-processor:v1.2.0
sponsor: "alice@company.com"
capabilities:
- "s3:read"
- "api:analytics"
policy: strict
replicas: 3
resources:
limits:
cpu: 1000m
memory: 1Gi
requests:
cpu: 250m
memory: 256Mi
trustScore:
initialScore: 500
minimumScore: 300
observability:
traces: true
metrics: true
logs: trueApply:
kubectl apply -f governed-agent.yaml
kubectl get governedagents -n my-appRecommended for high-performance caching and session storage.
storage:
backend: redis
redis:
enabled: true
auth:
password: "secure-password"
master:
persistence:
enabled: true
size: 20GiFor persistent data and complex queries.
storage:
backend: postgres
postgresql:
enabled: true
auth:
username: agentmesh
password: "secure-password"
database: agentmesh
primary:
persistence:
enabled: true
size: 50GiUse both for optimal performance:
storage:
backend: redis # Primary cache
redis:
enabled: true
# ... redis config
postgresql:
enabled: true
# ... postgres config for persistent dataMetrics are exposed on port 9090:
# Port-forward to access metrics
kubectl port-forward -n agentmesh svc/agentmesh 9090:9090
# View metrics
curl http://localhost:9090/metricsKey metrics:
agentmesh_handshake_total- Trust handshake countagentmesh_policy_violation_count- Policy violationsagentmesh_trust_score_gauge- Trust scoresagentmesh_registry_size- Registry sizeagentmesh_api_request_duration_seconds- API latency
Import pre-built dashboards:
- Access Grafana:
http://localhost:3000(local) or via ingress - Login: admin/agentmesh (change in production)
- Dashboards are auto-provisioned:
- Mesh Health
- Security Violations
- Agent Latency
Enable tracing:
observability:
opentelemetry:
enabled: true
endpoint: "http://otel-collector:4317"
serviceName: "agentmesh"Enable SPIFFE/SPIRE for workload identity:
identity:
spireEnabled: true
spireSocketPath: /run/spire/sockets/agent.sock
spire:
enabled: true
trustDomain: agentmesh.yourdomain.comNetwork policies are enabled by default:
networkPolicy:
enabled: true
policyTypes:
- Ingress
- EgressEnable HTTPS with cert-manager:
ingress:
enabled: true
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
tls:
- secretName: agentmesh-tls
hosts:
- agentmesh.yourdomain.comaffinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: app.kubernetes.io/name
operator: In
values:
- agentmesh
topologyKey: topology.kubernetes.io/zoneFor Redis HA:
redis:
architecture: replication
sentinel:
enabled: true
replica:
replicaCount: 3Create alert rules:
apiVersion: monitoring.coreos.com/v1
kind: PrometheusRule
metadata:
name: agentmesh-alerts
spec:
groups:
- name: agentmesh
rules:
- alert: HighPolicyViolationRate
expr: rate(agentmesh_policy_violation_count[5m]) > 10
for: 5m
annotations:
summary: "High policy violation rate detected"
- alert: LowTrustScore
expr: avg(agentmesh_trust_score_gauge) < 400
for: 10m
annotations:
summary: "Average trust score below threshold"kubectl get pods -n agentmesh
kubectl describe pod <pod-name> -n agentmesh
kubectl logs <pod-name> -n agentmeshkubectl port-forward -n agentmesh svc/agentmesh 8080:8080
curl http://localhost:8080/health
curl http://localhost:8080/readyRedis:
kubectl exec -it -n agentmesh <agentmesh-pod> -- redis-cli -h agentmesh-redis-master pingPostgreSQL:
kubectl exec -it -n agentmesh <agentmesh-pod> -- psql -h agentmesh-postgresql -U agentmesh -d agentmesh -c '\l'# Update Helm chart
helm upgrade agentmesh ./charts/agentmesh \
-f values-production.yaml \
--namespace agentmesh
# Rollback if needed
helm rollback agentmesh --namespace agentmeshkubectl exec -n agentmesh agentmesh-redis-master-0 -- redis-cli BGSAVEkubectl exec -n agentmesh agentmesh-postgresql-0 -- \
pg_dump -U agentmesh agentmesh > backup.sql- Update Redis password
- Update PostgreSQL password
- Enable TLS/HTTPS with valid certificates
- Configure SPIRE for workload identity
- Set up monitoring alerts
- Configure backup strategy
- Enable network policies
- Configure resource limits
- Set up log aggregation
- Test disaster recovery procedures
- Configure autoscaling
- Enable audit logging
- Set up access controls (RBAC)
For issues or questions:
- GitHub Issues: https://github.com/imran-siddique/agent-mesh/issues
- Documentation: https://github.com/imran-siddique/agent-mesh#readme