133 lines
4.1 KiB
Markdown
133 lines
4.1 KiB
Markdown
# PersonaPack
|
|
|
|
#sympozium #crd #personapack
|
|
|
|
## Definicja
|
|
|
|
`PersonaPack` to CRD bundlujący **wiele pre-konfigurowanych person agentów**. Aktywacja packa powoduje automatyczne tworzenie SympoziumInstances, Schedules i memory seeds.
|
|
|
|
**Plik:** `api/v1alpha1/personapack_types.go`
|
|
|
|
## Analogia
|
|
|
|
PersonaPack jest dla agentów AI tym, czym Helm Chart dla aplikacji K8s - **deklaratywny bundle** który controller "rozpakowuje" w konkretne zasoby.
|
|
|
|
## Spec
|
|
|
|
```yaml
|
|
apiVersion: sympozium.ai/v1alpha1
|
|
kind: PersonaPack
|
|
metadata:
|
|
name: platform-team
|
|
spec:
|
|
enabled: true # Dopóki false - katalog; true - controller stampuje
|
|
description: "Core platform engineering team"
|
|
category: platform
|
|
version: "1.0.0"
|
|
|
|
authRefs: # Credentials (ustawiane przy aktywacji)
|
|
- provider: openai
|
|
secret: platform-team-openai-key
|
|
|
|
policyRef: restrictive # Wspólna polityka
|
|
baseURL: "" # Override dla lokalnych providerów
|
|
|
|
channelConfigs: # Mapowanie kanał → secret
|
|
telegram: telegram-creds
|
|
|
|
skillParams: # Parametry per-skill
|
|
github-gitops:
|
|
REPO: my-org/my-repo
|
|
|
|
taskOverride: "Focus on reducing MTTR" # Nadpisanie celów
|
|
|
|
excludePersonas: # Wyłączone persony
|
|
- cost-analyzer
|
|
|
|
channelAccessControl:
|
|
telegram:
|
|
allowedSenders: ["123456"]
|
|
|
|
agentSandbox: # Kernel-level isolation dla wszystkich
|
|
enabled: true
|
|
runtimeClass: gvisor
|
|
|
|
personas:
|
|
- name: security-guardian
|
|
displayName: "Security Guardian"
|
|
systemPrompt: |
|
|
You are a Kubernetes security specialist...
|
|
model: claude-sonnet-4-20250514
|
|
skills:
|
|
- k8s-ops
|
|
- sre-observability
|
|
toolPolicy:
|
|
allow: [execute_command, read_file, fetch_url]
|
|
channels:
|
|
- telegram
|
|
schedule:
|
|
type: heartbeat
|
|
interval: "30m"
|
|
task: "Run security audit on all namespaces"
|
|
memory:
|
|
enabled: true
|
|
seeds:
|
|
- "Track CVEs found in previous scans"
|
|
- "Remember cluster topology changes"
|
|
```
|
|
|
|
## Mechanizm aktywacji
|
|
|
|
```
|
|
PersonaPack (enabled: false) → Katalog (TUI pokazuje jako dostępny)
|
|
↓
|
|
Użytkownik aktywuje (TUI wizard / kubectl patch)
|
|
↓
|
|
PersonaPack (enabled: true, authRefs set) → Controller stampuje:
|
|
├── Secret: platform-team-openai-key
|
|
├── SympoziumInstance: platform-team-security-guardian
|
|
│ ├── SympoziumSchedule + ConfigMap memory (seeded)
|
|
├── SympoziumInstance: platform-team-sre-watchdog
|
|
│ ├── SympoziumSchedule + ConfigMap memory (seeded)
|
|
└── SympoziumInstance: platform-team-platform-engineer
|
|
└── SympoziumSchedule + ConfigMap memory (seeded)
|
|
```
|
|
|
|
## Wbudowane packi
|
|
|
|
| Pack | Kategoria | Agenty | Opis |
|
|
|------|-----------|--------|------|
|
|
| `platform-team` | Platform | Security Guardian, SRE Watchdog, Platform Engineer | Bezpieczeństwo, health, manifest review |
|
|
| `devops-essentials` | DevOps | Incident Responder, Cost Analyzer | Triage incydentów, right-sizing |
|
|
| `developer-team` | Development | 7 agentów (Tech Lead, Backend/Frontend Dev, QA, Code Reviewer, DevOps, Docs Writer) | Pełny zespół dev |
|
|
|
|
## Status
|
|
|
|
```yaml
|
|
status:
|
|
phase: Pending|Ready|Error
|
|
personaCount: 3
|
|
installedCount: 3
|
|
installedPersonas:
|
|
- name: security-guardian
|
|
instanceName: platform-team-security-guardian
|
|
scheduleName: platform-team-security-guardian-schedule
|
|
```
|
|
|
|
## ownerReferences
|
|
|
|
Wszystkie wygenerowane zasoby mają `ownerReference` → PersonaPack. Usunięcie packa = garbage collection całego zespołu.
|
|
|
|
## Znaczenie architektoniczne
|
|
|
|
PersonaPacks rozwiązują problem **Day 1 Experience** - zamiast ręcznie tworzyć Secret + Instance + Schedule + Memory per agent, użytkownik:
|
|
1. Wybiera pack w TUI
|
|
2. Podaje klucz API
|
|
3. Cały zespół agentów jest gotowy
|
|
|
|
To także wzorzec **Infrastructure as Code dla AI Teams** - deklarujesz zespół agentów w YAML, controller realizuje intent.
|
|
|
|
---
|
|
|
|
Powiązane: [[PersonaPacks - zespoły agentów]] | [[SympoziumInstance]] | [[SympoziumSchedule]]
|