MATIH Platform is in active MVP development. Documentation reflects current implementation status.
12. AI Service
Agent System
Runtime & Lifecycle

Runtime and Lifecycle Management

Production - Feature flags, beta program, production rollout, GA readiness

The Agent Runtime Lifecycle system manages the complete lifecycle of agent deployments from initial feature flag rollout through beta testing, production deployment, and GA readiness certification. Implemented across data-plane/ai-service/src/agents/runtime/.


12.2.16.1Lifecycle Stages

Feature Flags --> Canary (10%) --> Beta Program --> Production Rollout --> GA Readiness
     |                |                |                  |                    |
  Week 59          Week 59          Week 60           Week 61             Week 65
StageKey ServicesPurpose
Feature FlagsAgentPlatformFeatureFlagsPer-tenant feature toggle with canary rollout
Beta ProgramBetaTenantManager, BetaFeedbackServiceControlled beta with feedback collection
Production RolloutProductionRolloutManager, PerformanceOptimizerGradual rollout with performance gates
ObservabilityObservabilityServiceRegistry, AlertRules, SLO DashboardsMonitoring and alerting
GA ReadinessGAReadinessChecker, SecurityAudit, PerformanceCertificationCertification checklist

Feature Flag Configuration

canary_pct = int(os.environ.get("AGENT_RUNTIME_CANARY_PERCENTAGE", "10"))
create_agent_platform_feature_flags(
    config=AgentPlatformFeatureFlagConfig(canary_rollout_percentage=canary_pct)
)

12.2.16.2API Endpoints

# Check feature flag for tenant
curl "http://localhost:8000/api/v1/agent-runtime/features?tenant_id=acme-corp&feature=agent_pools"
 
# Enroll tenant in beta
curl -X POST http://localhost:8000/api/v1/agent-runtime/beta/enroll \
  -H "Content-Type: application/json" \
  -d '{"tenant_id": "acme-corp", "tier": "standard"}'
 
# Check GA readiness
curl http://localhost:8000/api/v1/agent-runtime/ga-readiness?tenant_id=acme-corp
 
# Platform health
curl http://localhost:8000/health/agent-platform

GA Readiness Response

{
  "ready": false,
  "checks": {
    "security_audit": {"passed": true, "score": 0.95},
    "performance_certification": {"passed": true, "p95_latency_ms": 2100},
    "feature_flag_removal": {"passed": false, "remaining_flags": 2},
    "documentation": {"passed": true, "coverage": 0.92},
    "signoff": {"passed": false, "approvals": 1, "required": 3}
  },
  "overall_score": 0.78,
  "blocking_items": ["feature_flag_removal", "signoff"]
}