Ana sayfa ›
AI ile Geliştirme ›
Ajan Deploy
🚀Ajan Deploy — Runtime Seçimi & Operasyon
"Ajanı yazdım, nereye koyayım, nasıl yayınlayayım?" sorusunun cevabı. Onay akışını geçen ajanın üretim ortamına nasıl yerleştirileceği, izlenmesi ve sürdürülmesi. Canary, rollback ve sandbox stratejilerini kapsar.
📑 Bu sayfada
- D.1 Runtime Karar Ağacı
- D.2 Cloud Run / GKE — Custom Container
- D.3 n8n Workflow Olarak Deploy
- D.4 Copilot Studio (Microsoft) Deploy
- D.5 Komtaş CoPilot Skill Olarak
- D.6 PR Akışı, Helm Chart & GitOps
- D.7 Sırlar & Konfigürasyon Yönetimi
- D.8 Canary, Feature Flag & Rollback
- D.9 Sandbox Ortamı (Test/Staging)
D.1 Runtime Karar Ağacı
| Senaryo | Önerilen Runtime | Sebep |
|---|---|---|
| Düşük hacim, low-code, no-code workflow | n8n (GKE'de mevcut) | UI ile workflow, MCP entegre, tetikleyiciler hazır |
| M365 + SharePoint + Power Platform ekosistemi | Copilot Studio | Yerleşik DLP, Purview, Teams entegrasyonu |
| Yüksek hacim, custom logic, kendi LLM | Cloud Run / GKE | Tam kontrol, autoscale, kendi koda sahip |
| Tek kullanıcılı interaktif (CoPilot içinde) | Komtaş CoPilot Skill | Bilgi tabanına yakın, RBAC paylaşımlı |
| Bir defalık batch (örn. ay sonu rapor) | Cloud Run Job veya Kubernetes CronJob | Sürekli çalışmaz, maliyet sıfır |
D.2 Cloud Run / GKE — Custom Container
Dockerfile (FastAPI + uvicorn)
FROM python:3.12-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
ENV PORT=8080
ENV PYTHONUNBUFFERED=1
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8080"]
Helm values.yaml — Komtaş Standart Şablon
# charts/agent-template/values.yaml
agent:
id: AGT-IG-2026-003
version: 1.1.0
lifecycle: ga
image:
repository: gcr.io/komtas-ai/customer-research
tag: v1.1.0
replicaCount: 2
resources:
requests:
cpu: "200m"
memory: "512Mi"
limits:
cpu: "1000m"
memory: "2Gi"
autoscaling:
enabled: true
minReplicas: 2
maxReplicas: 10
targetCPU: 70
env:
ANTHROPIC_API_KEY:
valueFrom:
secretKeyRef:
name: anthropic-prod
key: api-key
LANGFUSE_PUBLIC_KEY:
valueFrom:
secretKeyRef:
name: langfuse
key: public
ingress:
enabled: true
host: agents.komtas.internal
path: /customer-research/v1
annotations:
cert-manager.io/cluster-issuer: letsencrypt-prod
guardrails:
lakera:
enabled: true
flag_action: block
presidio:
enabled: true
entities: [TR_TC_NUMBER, IBAN_CODE, CREDIT_CARD]
observability:
langfuse: true
prometheus: true
audit_log_topic: pubsub://komtas-audit-agents
D.3 n8n Workflow Olarak Deploy
- Workflow JSON'unu Git repo'da
workflows/AGT-XXX-vX.Y.Z.jsonolarak sakla (s9 standardı). - n8n CLI ile import:
n8n import:workflow --input workflows/AGT-XXX.json - Credentials Secret Manager'dan inject (n8n credential ID = K8s secret).
- Webhook URL:
https://n8n.komtas.internal/webhook/{{path}} - Audit: n8n executions PostgreSQL'e yazılır → günlük Langfuse'a sync.
⚠️ n8n production tuning
EXECUTIONS_MODE=queue + Redis worker'lar zorunlu (s9'da örnek). N8N_PAYLOAD_SIZE_MAX'i 16MB'den fazla yapma. Webhook'ları authentication=headerAuth ile koru.
D.4 Copilot Studio (Microsoft) Deploy
- Copilot Studio → Build → Topics ekle
- Knowledge → SharePoint sitesini ekle (yalnızca onaylı dizin)
- Actions → Power Automate akışı ya da custom HTTP connector
- Test → Pilot kullanıcılara link → Channels → Teams app olarak yayınla
- DLP politikalarının agent'a otomatik uygulandığını doğrula (Power Platform admin)
- Solution export → versiyonlanmış olarak Komtaş Solution Repository'sine
D.5 Komtaş CoPilot Skill Olarak
CoPilot içinde "skill" olarak yayınlamak, kullanıcıların doğal dilde ajanı çağırmasını sağlar (örn. "Müşteri X için brief hazırla").
# skill manifest (komtas-copilot)
name: customer_research
display_name: "Müşteri Araştırma"
description: "Şirket için 1 sayfa brief üretir"
agent_endpoint: "https://agents.komtas.internal/customer-research/v1"
auth: "service-token"
input_schema:
type: object
properties:
company: {type: string}
depth: {type: string, enum: [quick, full]}
required: [company]
visibility:
groups: ["IG-Sales"]
rate_limit:
per_user_daily: 30
D.6 PR Akışı, Helm Chart & GitOps
1. Feature branch
→
2. PR + CI (lint+test+RAGAS)
→
3. Code+Security review
→
4. Merge main
→
5. ArgoCD sync
→
6. Canary 10%
Repo Yapısı
komtas-agents/
├── agents/
│ ├── AGT-IG-2026-003-customer-research/
│ │ ├── agent.yaml
│ │ ├── src/
│ │ ├── tests/
│ │ ├── evals/
│ │ ├── Dockerfile
│ │ └── helm/values.yaml
│ └── AGT-FIN-2026-001-cashflow/
├── shared/
│ ├── lib-guardrails/
│ └── lib-langfuse/
├── .github/workflows/
│ ├── ci.yaml # lint + unit test + RAGAS regress
│ ├── publish.yaml # build & push image
│ └── promote.yaml # alpha → beta → ga
└── argocd/applications/
D.7 Sırlar & Konfigürasyon Yönetimi
- Google Secret Manager (GKE) ya da Azure Key Vault — API anahtarları, OAuth refresh token'ları.
- Pod'a inject:
workload identity(GKE) ya dasecret-store CSI driver. - Anahtar rotasyonu: 90 günde bir; rollover script repo'da (
scripts/rotate.sh). - Açık metin (plain-text) secret commit edilmemelidir; pre-commit hook (
detect-secrets) ile bu durum erken yakalanır. - OAuth client_secret yerine certificate-based auth tercih (Azure App Registration için).
D.8 Canary, Feature Flag & Rollback
| Strateji | Kullanım |
|---|---|
| Canary deploy (Argo Rollouts) | Yeni versiyona %10 trafik 1 saat → %50 1 saat → %100. RAGAS regresyon görülürse otomatik rollback. |
| Feature flag (LaunchDarkly / Unleash) | Yeni tool veya prompt değişikliğini kullanıcı segmentine açma. |
| Blue-Green | Major sürüm geçişi için (sözleşme değiştiyse). |
| Rollback | ArgoCD History → bir önceki revizyona dön. Image tag immutable olmalı. |
D.9 Sandbox Ortamı (Test/Staging)
| Ortam | Veri | Trafik | Eval |
|---|---|---|---|
| dev | Sentetik | Yalnızca geliştirici | Manuel |
| staging | Maskelenmiş prod kopya | Pilot 5-15 kişi | Otomatik RAGAS |
| prod-canary | Gerçek | %10 trafik | Real-time RAGAS |
| prod | Gerçek | %100 | Günlük RAGAS |
📌 İlgili
Onay akışı: Ajan Onay Akışı · Registry standardı: Agent Registry · GKE altyapısı: GKE Dağıtım · Gözlemlenebilirlik: Langfuse