🏠 Ana Sayfa 📖 Sözlük 💬 Doküman asistanı
Ana sayfaAI ile GeliştirmeAjan 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.

D.1 Runtime Karar Ağacı

SenaryoÖnerilen RuntimeSebep
Düşük hacim, low-code, no-code workflown8n (GKE'de mevcut)UI ile workflow, MCP entegre, tetikleyiciler hazır
M365 + SharePoint + Power Platform ekosistemiCopilot StudioYerleşik DLP, Purview, Teams entegrasyonu
Yüksek hacim, custom logic, kendi LLMCloud Run / GKETam kontrol, autoscale, kendi koda sahip
Tek kullanıcılı interaktif (CoPilot içinde)Komtaş CoPilot SkillBilgi tabanına yakın, RBAC paylaşımlı
Bir defalık batch (örn. ay sonu rapor)Cloud Run Job veya Kubernetes CronJobSü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

  1. Workflow JSON'unu Git repo'da workflows/AGT-XXX-vX.Y.Z.json olarak sakla (s9 standardı).
  2. n8n CLI ile import: n8n import:workflow --input workflows/AGT-XXX.json
  3. Credentials Secret Manager'dan inject (n8n credential ID = K8s secret).
  4. Webhook URL: https://n8n.komtas.internal/webhook/{{path}}
  5. 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

  1. Copilot Studio → Build → Topics ekle
  2. Knowledge → SharePoint sitesini ekle (yalnızca onaylı dizin)
  3. Actions → Power Automate akışı ya da custom HTTP connector
  4. Test → Pilot kullanıcılara link → Channels → Teams app olarak yayınla
  5. DLP politikalarının agent'a otomatik uygulandığını doğrula (Power Platform admin)
  6. 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 da secret-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

StratejiKullanı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-GreenMajor sürüm geçişi için (sözleşme değiştiyse).
RollbackArgoCD History → bir önceki revizyona dön. Image tag immutable olmalı.

D.9 Sandbox Ortamı (Test/Staging)

OrtamVeriTrafikEval
devSentetikYalnızca geliştiriciManuel
stagingMaskelenmiş prod kopyaPilot 5-15 kişiOtomatik RAGAS
prod-canaryGerçek%10 trafikReal-time RAGAS
prodGerçek%100Günlük RAGAS
📌 İlgili Onay akışı: Ajan Onay Akışı · Registry standardı: Agent Registry · GKE altyapısı: GKE Dağıtım · Gözlemlenebilirlik: Langfuse