Trigger: A developer navigates to the Portainer App Templates section or initiates a new stack deployment.
Context/Data Pulled: The AI agent analyzes:
- The developer's team, role, and historical deployment patterns from Portainer audit logs.
- The target environment's labels (e.g.,
env=prod, region=us-east).
- Resource availability (CPU, memory) on the target endpoint.
- Recent security scan results for base images used in templates.
Model or Agent Action: A RAG-powered agent queries a knowledge base of organizational best practices, approved architectures, and cost policies. It cross-references this with the developer's context to score and rank available App Templates. It may also generate a brief, natural-language justification for its top recommendation (e.g., "Recommended postgres-ha template because your team deploys to production and this template includes configured PgBouncer and backup sidecars").
System Update or Next Step: The Portainer UI is augmented to display the AI's "Recommended For You" template alongside the standard catalog. The developer can select it, with pre-populated, context-aware values (e.g., resource limits scaled for the target environment).
Human Review Point: If the agent's recommendation deviates significantly from the developer's history (suggesting a new technology), it can flag the suggestion for review by a platform team member before highlighting it.