initial commit
This commit is contained in:
101
04-Zarządzanie-Agentami/PersonaPacks - zespoły agentów.md
Normal file
101
04-Zarządzanie-Agentami/PersonaPacks - zespoły agentów.md
Normal file
@@ -0,0 +1,101 @@
|
||||
# PersonaPacks - zespoły agentów
|
||||
|
||||
#sympozium #agenty #personapack #teams
|
||||
|
||||
## Koncepcja
|
||||
|
||||
PersonaPacks implementują wzorzec **"AI Team as Code"** - deklarujesz cały zespół agentów w jednym CRD, controller realizuje intent.
|
||||
|
||||
## Od pojedynczego agenta do zespołu
|
||||
|
||||
### Bez PersonaPacks (ręcznie):
|
||||
```
|
||||
Per agent trzeba stworzyć:
|
||||
1. Secret (klucz API)
|
||||
2. SympoziumInstance (konfiguracja)
|
||||
3. SympoziumSchedule (harmonogram)
|
||||
4. ConfigMap memory (początkowa pamięć)
|
||||
|
||||
Dla 7 agentów = 28 zasobów K8s ręcznie
|
||||
```
|
||||
|
||||
### Z PersonaPacks:
|
||||
```
|
||||
1. Wybierz pack w TUI
|
||||
2. Podaj klucz API
|
||||
3. Done - 28 zasobów stworzonych automatycznie
|
||||
```
|
||||
|
||||
## Wzorzec "stamp out"
|
||||
|
||||
PersonaPack controller działa jak **operator pattern**:
|
||||
|
||||
```
|
||||
PersonaPack (desired state)
|
||||
↓
|
||||
PersonaPackReconciler:
|
||||
for each persona in spec.personas:
|
||||
if persona.name not in spec.excludePersonas:
|
||||
├── createOrUpdate SympoziumInstance
|
||||
│ ├── Name: <pack>-<persona>
|
||||
│ ├── Channels: z channelConfigs
|
||||
│ ├── Skills: z persona.skills
|
||||
│ ├── AuthRefs: z pack.authRefs
|
||||
│ └── Policy: z pack.policyRef
|
||||
├── createOrUpdate SympoziumSchedule (jeśli persona.schedule)
|
||||
│ ├── Cron: z interval → cron conversion
|
||||
│ ├── Task: persona.schedule.task (z taskOverride prepend)
|
||||
│ └── IncludeMemory: true
|
||||
└── createOrUpdate ConfigMap memory (jeśli persona.memory)
|
||||
└── Seeds: persona.memory.seeds
|
||||
```
|
||||
|
||||
## Przykład: developer-team
|
||||
|
||||
Pack `developer-team` tworzy **7 współpracujących agentów**:
|
||||
|
||||
| Agent | Rola | Schedule | Skills |
|
||||
|-------|------|----------|--------|
|
||||
| Tech Lead | Planowanie, architektura | Co 1h | github-gitops |
|
||||
| Backend Dev | Implementacja backend | Co 30m | github-gitops, k8s-ops |
|
||||
| Frontend Dev | Implementacja frontend | Co 30m | github-gitops |
|
||||
| QA Engineer | Testowanie | Co 45m | github-gitops |
|
||||
| Code Reviewer | Code review | Co 20m | github-gitops |
|
||||
| DevOps Engineer | CI/CD, infra | Co 1h | github-gitops, k8s-ops |
|
||||
| Docs Writer | Dokumentacja | Co 2h | github-gitops |
|
||||
|
||||
Wszystkie te agenty:
|
||||
- Współdzielą repo (via skill params)
|
||||
- Mają własną pamięć (memory seeds specyficzne per rola)
|
||||
- Działają na harmonogramach (heartbeats)
|
||||
- Mają osobne RBAC per run
|
||||
|
||||
## Lifecycle zarządzania
|
||||
|
||||
```
|
||||
Install pack → TUI wizard
|
||||
↓
|
||||
Activate (set authRefs) → Controller stampuje
|
||||
↓
|
||||
Running → Agenty działają wg scheduli
|
||||
↓
|
||||
Exclude persona → Controller usuwa zasoby tego agenta
|
||||
↓
|
||||
Delete pack → ownerReferences → K8s GC czyści WSZYSTKO
|
||||
```
|
||||
|
||||
## Konfiguracja globalna vs per-persona
|
||||
|
||||
| Ustawienie | Poziom pack | Poziom persona |
|
||||
|------------|-------------|----------------|
|
||||
| AuthRefs | Tak (wspólne) | Nie |
|
||||
| Model | Tak (default) | Tak (override) |
|
||||
| Skills | Nie | Tak |
|
||||
| Channels | Tak (channelConfigs) | Tak (channels list) |
|
||||
| Policy | Tak (policyRef) | Nie (dziedziczy) |
|
||||
| Task Override | Tak (prepend do scheduli) | Nie |
|
||||
| Agent Sandbox | Tak (dla wszystkich) | Nie |
|
||||
|
||||
---
|
||||
|
||||
Powiązane: [[PersonaPack]] | [[SympoziumInstance]] | [[Scheduled Tasks - heartbeaty i swepy]]
|
||||
Reference in New Issue
Block a user