@vibe-agent-toolkit/vat-example-cat-agents 0.1.13 → 0.1.15-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/skills/vat-example-cat-agents/SKILL.md +34 -34
- package/dist/skills/vat-example-cat-agents/{human-approval.md → resources/human-approval.md} +2 -2
- package/package.json +8 -11
- package/dist/skills/vat-example-cat-agents/CLAUDE.md +0 -424
- package/dist/skills/vat-example-cat-agents/README.md +0 -727
- /package/dist/skills/vat-example-cat-agents/{breed-advisor.md → resources/breed-advisor.md} +0 -0
- /package/dist/skills/vat-example-cat-agents/{cat-breed-selection.md → resources/cat-breed-selection.md} +0 -0
- /package/dist/skills/vat-example-cat-agents/{description-parser.md → resources/description-parser.md} +0 -0
- /package/dist/skills/vat-example-cat-agents/{haiku-generator.md → resources/haiku-generator.md} +0 -0
- /package/dist/skills/vat-example-cat-agents/{name-generator.md → resources/name-generator.md} +0 -0
- /package/dist/skills/vat-example-cat-agents/{photo-analyzer.md → resources/photo-analyzer.md} +0 -0
- /package/dist/skills/vat-example-cat-agents/{structure.md → resources/structure.md} +0 -0
|
@@ -52,8 +52,8 @@ Trigger this skill when:
|
|
|
52
52
|
Use when user has a straightforward request that maps to one agent.
|
|
53
53
|
|
|
54
54
|
**Example workflows:**
|
|
55
|
-
- "What cat breed should I get?" → [breed-advisor](breed-advisor.md)
|
|
56
|
-
- "Analyze this cat photo" → [photo-analyzer](photo-analyzer.md)
|
|
55
|
+
- "What cat breed should I get?" → [breed-advisor](resources/breed-advisor.md)
|
|
56
|
+
- "Analyze this cat photo" → [photo-analyzer](resources/photo-analyzer.md)
|
|
57
57
|
- "Is this a valid haiku?" → haiku-validator (pure function)
|
|
58
58
|
|
|
59
59
|
### Pattern 2: Sequential Pipeline (Multi-Agent)
|
|
@@ -62,11 +62,11 @@ Use when output of one agent feeds into another.
|
|
|
62
62
|
|
|
63
63
|
**Example workflows:**
|
|
64
64
|
1. Photo → Characteristics → Name
|
|
65
|
-
- [photo-analyzer](photo-analyzer.md) → [name-generator](name-generator.md)
|
|
65
|
+
- [photo-analyzer](resources/photo-analyzer.md) → [name-generator](resources/name-generator.md)
|
|
66
66
|
2. Photo → Characteristics → Haiku
|
|
67
|
-
- [photo-analyzer](photo-analyzer.md) → [haiku-generator](haiku-generator.md)
|
|
67
|
+
- [photo-analyzer](resources/photo-analyzer.md) → [haiku-generator](resources/haiku-generator.md)
|
|
68
68
|
3. Description → Characteristics → Name → Validation
|
|
69
|
-
- [description-parser](description-parser.md) → [name-generator](name-generator.md) → name-validator
|
|
69
|
+
- [description-parser](resources/description-parser.md) → [name-generator](resources/name-generator.md) → name-validator
|
|
70
70
|
|
|
71
71
|
### Pattern 3: Generate-Validate Loop (Iterative)
|
|
72
72
|
|
|
@@ -75,10 +75,10 @@ Use when generator produces content that needs validation with retry logic.
|
|
|
75
75
|
**Example workflows:**
|
|
76
76
|
1. Name generation with validation
|
|
77
77
|
- Generate → Validate → If invalid, retry with feedback
|
|
78
|
-
- Uses: [name-generator](name-generator.md) + name-validator
|
|
78
|
+
- Uses: [name-generator](resources/name-generator.md) + name-validator
|
|
79
79
|
2. Haiku generation with validation
|
|
80
80
|
- Generate → Validate → If invalid, retry
|
|
81
|
-
- Uses: [haiku-generator](haiku-generator.md) + haiku-validator
|
|
81
|
+
- Uses: [haiku-generator](resources/haiku-generator.md) + haiku-validator
|
|
82
82
|
|
|
83
83
|
**Orchestration tip:** Generator agents have NO knowledge of validation rules. This is intentional - forces iteration and tests feedback loops.
|
|
84
84
|
|
|
@@ -88,7 +88,7 @@ Use when decision requires human judgment.
|
|
|
88
88
|
|
|
89
89
|
**Example workflows:**
|
|
90
90
|
1. Breed application approval
|
|
91
|
-
- Gather info → Generate application → [human-approval](human-approval.md) → Process result
|
|
91
|
+
- Gather info → Generate application → [human-approval](resources/human-approval.md) → Process result
|
|
92
92
|
2. Name approval before finalization
|
|
93
93
|
- Generate names → Present options → Human selects → Finalize
|
|
94
94
|
|
|
@@ -98,10 +98,10 @@ Use when decision requires human judgment.
|
|
|
98
98
|
|
|
99
99
|
**When:** User wants help finding the right cat breed.
|
|
100
100
|
|
|
101
|
-
**Agent:** [breed-advisor](breed-advisor.md)
|
|
101
|
+
**Agent:** [breed-advisor](resources/breed-advisor.md)
|
|
102
102
|
|
|
103
103
|
**Orchestration strategy:**
|
|
104
|
-
1. **Phase 1 - Gathering** (see [Conversation Strategy](breed-advisor.md#conversation-strategy))
|
|
104
|
+
1. **Phase 1 - Gathering** (see [Conversation Strategy](resources/breed-advisor.md#conversation-strategy))
|
|
105
105
|
- Collect ≥4 factors including music preference
|
|
106
106
|
- ONE question at a time (don't bombard)
|
|
107
107
|
- Extract factors after each turn
|
|
@@ -117,15 +117,15 @@ Use when decision requires human judgment.
|
|
|
117
117
|
- Conclude gracefully
|
|
118
118
|
- Provide next steps or exit instruction
|
|
119
119
|
|
|
120
|
-
**Critical factor:** Music preference is the PRIMARY compatibility factor. Ask early, use as conversation anchor. See [Music Preference Insight](breed-advisor.md#music-preference-insight) for mappings.
|
|
120
|
+
**Critical factor:** Music preference is the PRIMARY compatibility factor. Ask early, use as conversation anchor. See [Music Preference Insight](resources/breed-advisor.md#music-preference-insight) for mappings.
|
|
121
121
|
|
|
122
|
-
**Reference implementation:** See [cat-breed-selection.md](cat-breed-selection.md) for detailed breed selection orchestration.
|
|
122
|
+
**Reference implementation:** See [cat-breed-selection.md](resources/cat-breed-selection.md) for detailed breed selection orchestration.
|
|
123
123
|
|
|
124
124
|
### Workflow B: Photo Analysis Pipeline
|
|
125
125
|
|
|
126
126
|
**When:** User provides a cat photo and wants analysis, name, or haiku.
|
|
127
127
|
|
|
128
|
-
**Agents:** [photo-analyzer](photo-analyzer.md) → [name-generator](name-generator.md) OR [haiku-generator](haiku-generator.md)
|
|
128
|
+
**Agents:** [photo-analyzer](resources/photo-analyzer.md) → [name-generator](resources/name-generator.md) OR [haiku-generator](resources/haiku-generator.md)
|
|
129
129
|
|
|
130
130
|
**Orchestration strategy:**
|
|
131
131
|
|
|
@@ -154,7 +154,7 @@ Optional Step 3: Validate
|
|
|
154
154
|
|
|
155
155
|
**When:** User describes a cat in text (no photo).
|
|
156
156
|
|
|
157
|
-
**Agents:** [description-parser](description-parser.md) → [name-generator](name-generator.md) OR [haiku-generator](haiku-generator.md)
|
|
157
|
+
**Agents:** [description-parser](resources/description-parser.md) → [name-generator](resources/name-generator.md) OR [haiku-generator](resources/haiku-generator.md)
|
|
158
158
|
|
|
159
159
|
**Orchestration strategy:**
|
|
160
160
|
|
|
@@ -210,14 +210,14 @@ throw new Error('Could not generate valid content after 3 attempts');
|
|
|
210
210
|
- ~60-70% initial rejection rate forces iteration
|
|
211
211
|
|
|
212
212
|
**Agents using this pattern:**
|
|
213
|
-
- [name-generator](name-generator.md) + name-validator
|
|
214
|
-
- [haiku-generator](haiku-generator.md) + haiku-validator
|
|
213
|
+
- [name-generator](resources/name-generator.md) + name-validator
|
|
214
|
+
- [haiku-generator](resources/haiku-generator.md) + haiku-validator
|
|
215
215
|
|
|
216
216
|
### Workflow E: HITL Approval Gate
|
|
217
217
|
|
|
218
218
|
**When:** Decision requires human judgment (compliance, taste, ethics).
|
|
219
219
|
|
|
220
|
-
**Agent:** [human-approval](human-approval.md)
|
|
220
|
+
**Agent:** [human-approval](resources/human-approval.md)
|
|
221
221
|
|
|
222
222
|
**Orchestration strategy:**
|
|
223
223
|
|
|
@@ -504,30 +504,30 @@ Good: "What's your favorite type of music?" → [response] → "Great! Tell me a
|
|
|
504
504
|
- haiku-validator (no agent resource - pure TypeScript logic)
|
|
505
505
|
|
|
506
506
|
### One-Shot LLM Analyzers
|
|
507
|
-
- [Photo Analyzer](photo-analyzer.md) - Vision analysis
|
|
508
|
-
- [Description Parser](description-parser.md) - Text parsing
|
|
509
|
-
- [Name Generator](name-generator.md) - Creative naming
|
|
510
|
-
- [Haiku Generator](haiku-generator.md) - Haiku composition
|
|
507
|
+
- [Photo Analyzer](resources/photo-analyzer.md) - Vision analysis
|
|
508
|
+
- [Description Parser](resources/description-parser.md) - Text parsing
|
|
509
|
+
- [Name Generator](resources/name-generator.md) - Creative naming
|
|
510
|
+
- [Haiku Generator](resources/haiku-generator.md) - Haiku composition
|
|
511
511
|
|
|
512
512
|
### Conversational Assistant
|
|
513
|
-
- [Breed Advisor](breed-advisor.md) - Multi-turn breed selection
|
|
514
|
-
- [Welcome Message](breed-advisor.md#welcome-message)
|
|
515
|
-
- [Music Preference Insight](breed-advisor.md#music-preference-insight)
|
|
516
|
-
- [Factor Definitions](breed-advisor.md#factor-definitions)
|
|
517
|
-
- [Conversation Strategy](breed-advisor.md#conversation-strategy)
|
|
518
|
-
- [Factor Extraction Prompt](breed-advisor.md#factor-extraction-prompt)
|
|
519
|
-
- [Transition Message](breed-advisor.md#transition-message)
|
|
520
|
-
- [Recommendation Presentation](breed-advisor.md#recommendation-presentation-prompt)
|
|
521
|
-
- [Selection Extraction](breed-advisor.md#selection-extraction-prompt)
|
|
522
|
-
- [Conclusion Prompt](breed-advisor.md#conclusion-prompt)
|
|
513
|
+
- [Breed Advisor](resources/breed-advisor.md) - Multi-turn breed selection
|
|
514
|
+
- [Welcome Message](resources/breed-advisor.md#welcome-message)
|
|
515
|
+
- [Music Preference Insight](resources/breed-advisor.md#music-preference-insight)
|
|
516
|
+
- [Factor Definitions](resources/breed-advisor.md#factor-definitions)
|
|
517
|
+
- [Conversation Strategy](resources/breed-advisor.md#conversation-strategy)
|
|
518
|
+
- [Factor Extraction Prompt](resources/breed-advisor.md#factor-extraction-prompt)
|
|
519
|
+
- [Transition Message](resources/breed-advisor.md#transition-message)
|
|
520
|
+
- [Recommendation Presentation](resources/breed-advisor.md#recommendation-presentation-prompt)
|
|
521
|
+
- [Selection Extraction](resources/breed-advisor.md#selection-extraction-prompt)
|
|
522
|
+
- [Conclusion Prompt](resources/breed-advisor.md#conclusion-prompt)
|
|
523
523
|
|
|
524
524
|
### External Event Integrator
|
|
525
|
-
- [Human Approval](human-approval.md) - HITL approval gate
|
|
525
|
+
- [Human Approval](resources/human-approval.md) - HITL approval gate
|
|
526
526
|
|
|
527
527
|
### Related Documentation
|
|
528
|
-
- [Cat Breed Selection Skill](cat-breed-selection.md) - Detailed breed advisor orchestration
|
|
528
|
+
- [Cat Breed Selection Skill](resources/cat-breed-selection.md) - Detailed breed advisor orchestration
|
|
529
529
|
- Package README - Human-facing documentation
|
|
530
|
-
- Package Structure - Technical organization
|
|
530
|
+
- [Package Structure](resources/structure.md) - Technical organization
|
|
531
531
|
|
|
532
532
|
## Success Criteria
|
|
533
533
|
|
package/dist/skills/vat-example-cat-agents/{human-approval.md → resources/human-approval.md}
RENAMED
|
@@ -333,5 +333,5 @@ it('should timeout after specified duration', async () => {
|
|
|
333
333
|
|
|
334
334
|
## Related Documentation
|
|
335
335
|
|
|
336
|
-
- **[SKILL.md](SKILL.md#workflow-e-hitl-approval-gate)** - Orchestration patterns
|
|
337
|
-
- **
|
|
336
|
+
- **[SKILL.md](../SKILL.md#workflow-e-hitl-approval-gate)** - Orchestration patterns
|
|
337
|
+
- **Agent Runtime** - executeExternalEvent helper
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibe-agent-toolkit/vat-example-cat-agents",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15-rc.1",
|
|
4
4
|
"description": "Example agents: 8 quirky cat agents demonstrating VAT patterns",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -37,24 +37,21 @@
|
|
|
37
37
|
"postinstall": "vat skills install --npm-postinstall || exit 0"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@vibe-agent-toolkit/agent-runtime": "0.1.
|
|
41
|
-
"@vibe-agent-toolkit/agent-schema": "0.1.
|
|
42
|
-
"@vibe-agent-toolkit/transports": "0.1.
|
|
43
|
-
"@vibe-agent-toolkit/utils": "0.1.13",
|
|
40
|
+
"@vibe-agent-toolkit/agent-runtime": "0.1.15-rc.1",
|
|
41
|
+
"@vibe-agent-toolkit/agent-schema": "0.1.15-rc.1",
|
|
42
|
+
"@vibe-agent-toolkit/transports": "0.1.15-rc.1",
|
|
44
43
|
"syllable": "^5.0.1",
|
|
45
44
|
"zod": "^3.24.1"
|
|
46
45
|
},
|
|
47
46
|
"devDependencies": {
|
|
48
47
|
"@ai-sdk/openai": "^3.0.18",
|
|
49
|
-
"@anthropic-ai/claude-agent-sdk": "^0.1.5",
|
|
50
48
|
"@anthropic-ai/sdk": "^0.36.0",
|
|
51
49
|
"@langchain/openai": "^0.3.16",
|
|
52
50
|
"@types/node": "^22.10.5",
|
|
53
|
-
"@vibe-agent-toolkit/resource-compiler": "0.1.
|
|
54
|
-
"@vibe-agent-toolkit/runtime-claude-agent-sdk": "0.1.
|
|
55
|
-
"@vibe-agent-toolkit/runtime-langchain": "0.1.
|
|
56
|
-
"@vibe-agent-toolkit/runtime-openai": "0.1.
|
|
57
|
-
"@vibe-agent-toolkit/runtime-vercel-ai-sdk": "0.1.13",
|
|
51
|
+
"@vibe-agent-toolkit/resource-compiler": "0.1.15-rc.1",
|
|
52
|
+
"@vibe-agent-toolkit/runtime-claude-agent-sdk": "0.1.15-rc.1",
|
|
53
|
+
"@vibe-agent-toolkit/runtime-langchain": "0.1.15-rc.1",
|
|
54
|
+
"@vibe-agent-toolkit/runtime-openai": "0.1.15-rc.1",
|
|
58
55
|
"@vitest/coverage-v8": "2.1.8",
|
|
59
56
|
"ai": "^6.0.48",
|
|
60
57
|
"openai": "^4.77.3",
|
|
@@ -1,424 +0,0 @@
|
|
|
1
|
-
# Claude Code Navigation Guide
|
|
2
|
-
|
|
3
|
-
This file provides technical navigation details for AI assistants working on `vat-example-cat-agents`.
|
|
4
|
-
|
|
5
|
-
## Quick Reference
|
|
6
|
-
|
|
7
|
-
**Package Purpose:** Reference implementation demonstrating VAT agent patterns across 9 archetypes using cat breeding domain.
|
|
8
|
-
|
|
9
|
-
**Current Status:** 4 of 9 archetypes implemented (8 agents total)
|
|
10
|
-
|
|
11
|
-
**Key Principle:** Agents are plain TypeScript functions. No framework dependencies in agent code.
|
|
12
|
-
|
|
13
|
-
## Directory Navigation
|
|
14
|
-
|
|
15
|
-
```
|
|
16
|
-
packages/vat-example-cat-agents/
|
|
17
|
-
├── src/
|
|
18
|
-
│ ├── types/schemas.ts # Shared Zod schemas (CatCharacteristics, Haiku, etc.)
|
|
19
|
-
│ │
|
|
20
|
-
│ ├── pure-function-tool/ # Archetype 1 (2 agents)
|
|
21
|
-
│ │ ├── haiku-validator.ts # Validates 5-7-5 syllable structure + kigo/kireji
|
|
22
|
-
│ │ └── name-validator.ts # Quirky characteristic-based validation
|
|
23
|
-
│ │
|
|
24
|
-
│ ├── one-shot-llm-analyzer/ # Archetype 2 (4 agents)
|
|
25
|
-
│ │ ├── photo-analyzer.ts # Vision LLM → CatCharacteristics
|
|
26
|
-
│ │ ├── description-parser.ts # Text → CatCharacteristics (same schema as photo)
|
|
27
|
-
│ │ ├── name-generator.ts # CatCharacteristics → NameSuggestion
|
|
28
|
-
│ │ └── haiku-generator.ts # CatCharacteristics → Haiku
|
|
29
|
-
│ │
|
|
30
|
-
│ ├── conversational-assistant/ # Archetype 3 (1 agent)
|
|
31
|
-
│ │ ├── breed-advisor.ts # Multi-turn breed selection advisor
|
|
32
|
-
│ │ └── breed-knowledge.ts # Breed database and matching algorithm
|
|
33
|
-
│ │
|
|
34
|
-
│ ├── external-event-integrator/ # Archetype 9 (1 agent)
|
|
35
|
-
│ │ └── human-approval.ts # HITL approval gate (mockable)
|
|
36
|
-
│ │
|
|
37
|
-
│ ├── utils/
|
|
38
|
-
│ │ └── color-extraction.ts # Helper: Extract colors from descriptions
|
|
39
|
-
│ │
|
|
40
|
-
│ └── index.ts # Public exports
|
|
41
|
-
│
|
|
42
|
-
├── test/
|
|
43
|
-
│ ├── pure-function-tool/ # Unit tests for validators
|
|
44
|
-
│ ├── one-shot-llm-analyzer/ # Tests for LLM analyzers
|
|
45
|
-
│ ├── external-event-integrator/ # Tests for HITL
|
|
46
|
-
│ ├── fixtures/
|
|
47
|
-
│ │ └── photos/ # Test images with EXIF metadata
|
|
48
|
-
│ │ ├── cats/ # 4 cat photos (~40KB each)
|
|
49
|
-
│ │ ├── not-cats/ # 2 negative cases (bear, robot)
|
|
50
|
-
│ │ └── cat-like/ # Future: ambiguous cases
|
|
51
|
-
│ └── test-helpers.ts # Shared test utilities
|
|
52
|
-
│
|
|
53
|
-
├── examples/
|
|
54
|
-
│ ├── photo-analysis-demo.ts # Demos photo analyzer with test fixtures
|
|
55
|
-
│ ├── runtime-adapter-demo.ts # Shared runtime adapter demo
|
|
56
|
-
│ ├── llm-agent-demo.ts # LLM agent usage patterns
|
|
57
|
-
│ └── demo-helpers.ts # Terminal color output utilities
|
|
58
|
-
│
|
|
59
|
-
├── README.md # Human-facing documentation
|
|
60
|
-
├── CLAUDE.md # This file (AI navigation)
|
|
61
|
-
├── docs/structure.md # Package organization details
|
|
62
|
-
└── package.json
|
|
63
|
-
```
|
|
64
|
-
|
|
65
|
-
## Agent Organization by Archetype
|
|
66
|
-
|
|
67
|
-
### Implemented Archetypes
|
|
68
|
-
|
|
69
|
-
**Archetype 1: Pure Function Tool**
|
|
70
|
-
- Location: `src/pure-function-tool/`
|
|
71
|
-
- Characteristics: Stateless, deterministic, no external dependencies
|
|
72
|
-
- Agents:
|
|
73
|
-
- `haiku-validator.ts` - Syllable counting + kigo/kireji detection
|
|
74
|
-
- `name-validator.ts` - Characteristic-based quirky rules (60-70% rejection rate)
|
|
75
|
-
|
|
76
|
-
**Archetype 2: One-Shot LLM Analyzer**
|
|
77
|
-
- Location: `src/one-shot-llm-analyzer/`
|
|
78
|
-
- Characteristics: Single LLM call, stateless, classification/extraction
|
|
79
|
-
- Agents:
|
|
80
|
-
- `photo-analyzer.ts` - Vision LLM (mockable via EXIF)
|
|
81
|
-
- `description-parser.ts` - Text parsing (multi-modal convergence with photo)
|
|
82
|
-
- `name-generator.ts` - Creative name generation
|
|
83
|
-
- `haiku-generator.ts` - Haiku creation
|
|
84
|
-
|
|
85
|
-
**Archetype 3: Conversational Assistant**
|
|
86
|
-
- Location: `src/conversational-assistant/`
|
|
87
|
-
- Characteristics: Multi-turn conversation, session state, context accumulation
|
|
88
|
-
- Agents:
|
|
89
|
-
- `breed-advisor.ts` - Breed selection advisor with music-based matching
|
|
90
|
-
- `breed-knowledge.ts` - Breed database with 12 breeds and matching algorithm
|
|
91
|
-
|
|
92
|
-
**Archetype 9: External Event Integrator**
|
|
93
|
-
- Location: `src/external-event-integrator/`
|
|
94
|
-
- Characteristics: Emits events, blocks waiting, timeout handling
|
|
95
|
-
- Agents:
|
|
96
|
-
- `human-approval.ts` - HITL approval (mockable)
|
|
97
|
-
|
|
98
|
-
### Missing Archetypes (Planned)
|
|
99
|
-
|
|
100
|
-
**Archetype 4: Agentic Researcher (ReAct)** ⏸️
|
|
101
|
-
- Needs: Tool calling, iterative reasoning
|
|
102
|
-
- Target: Breed history researcher with web search
|
|
103
|
-
|
|
104
|
-
**Archetype 5: Function Workflow Orchestrator** ⏸️
|
|
105
|
-
- Needs: Deterministic multi-agent coordination
|
|
106
|
-
- Target: Breeding approval pipeline
|
|
107
|
-
- NOTE: Previous implementation removed during AI SDK v6 migration
|
|
108
|
-
|
|
109
|
-
**Archetype 6: LLM Intelligent Coordinator** ⏸️
|
|
110
|
-
- Needs: LLM routing decisions in fixed workflow
|
|
111
|
-
- Target: Smart submission router
|
|
112
|
-
|
|
113
|
-
**Archetype 7: Function Event Consumer** ⏸️
|
|
114
|
-
- Needs: Event-triggered execution
|
|
115
|
-
- Target: Pedigree file processor
|
|
116
|
-
|
|
117
|
-
**Archetype 8: LLM Event Handler** ⏸️
|
|
118
|
-
- Needs: Event-triggered with LLM processing
|
|
119
|
-
- Target: Intelligent triage handler
|
|
120
|
-
|
|
121
|
-
## Code Patterns
|
|
122
|
-
|
|
123
|
-
### Agent File Structure
|
|
124
|
-
|
|
125
|
-
Each agent file exports both the function and metadata:
|
|
126
|
-
|
|
127
|
-
```typescript
|
|
128
|
-
// src/<archetype>/<agent-name>.ts
|
|
129
|
-
|
|
130
|
-
import { z } from 'zod';
|
|
131
|
-
import { InputSchema, OutputSchema } from '../types/schemas.js';
|
|
132
|
-
|
|
133
|
-
/**
|
|
134
|
-
* Agent function implementation
|
|
135
|
-
*/
|
|
136
|
-
export async function agentFunction(input: z.infer<typeof InputSchema>): Promise<z.infer<typeof OutputSchema>> {
|
|
137
|
-
// Implementation
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
/**
|
|
141
|
-
* Agent metadata (for future VAT integration)
|
|
142
|
-
*/
|
|
143
|
-
export const AgentMetadata = {
|
|
144
|
-
id: 'archetype/agent-name',
|
|
145
|
-
name: 'Human Readable Name',
|
|
146
|
-
description: 'What this agent does',
|
|
147
|
-
archetype: 'archetype-name',
|
|
148
|
-
inputSchema: InputSchema,
|
|
149
|
-
outputSchema: OutputSchema,
|
|
150
|
-
};
|
|
151
|
-
```
|
|
152
|
-
|
|
153
|
-
### Multi-Modal Convergence Pattern
|
|
154
|
-
|
|
155
|
-
Photo Analyzer and Description Parser both produce `CatCharacteristics`:
|
|
156
|
-
|
|
157
|
-
```typescript
|
|
158
|
-
// Both functions return the same schema
|
|
159
|
-
const fromImage = await analyzePhoto(imagePath); // Vision LLM
|
|
160
|
-
const fromText = await parseDescription(text); // Text parsing LLM
|
|
161
|
-
|
|
162
|
-
// Downstream agents accept either
|
|
163
|
-
const name = await generateCatName(fromImage); // Works
|
|
164
|
-
const name = await generateCatName(fromText); // Also works
|
|
165
|
-
```
|
|
166
|
-
|
|
167
|
-
### Mockable Pattern (Testing)
|
|
168
|
-
|
|
169
|
-
Agents that call expensive APIs support mock mode:
|
|
170
|
-
|
|
171
|
-
```typescript
|
|
172
|
-
// photo-analyzer.ts
|
|
173
|
-
export async function analyzePhoto(
|
|
174
|
-
imagePath: string,
|
|
175
|
-
options: { mockable?: boolean } = {}
|
|
176
|
-
): Promise<CatCharacteristics> {
|
|
177
|
-
const { mockable = true } = options;
|
|
178
|
-
|
|
179
|
-
if (mockable) {
|
|
180
|
-
// Read from EXIF metadata (fast, free, deterministic)
|
|
181
|
-
return extractFromExif(imagePath);
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
// Call real vision API (slow, costs money)
|
|
185
|
-
return callVisionAPI(imagePath);
|
|
186
|
-
}
|
|
187
|
-
```
|
|
188
|
-
|
|
189
|
-
### Feedback Loop Pattern
|
|
190
|
-
|
|
191
|
-
Generator + Validator creates iteration pattern:
|
|
192
|
-
|
|
193
|
-
```typescript
|
|
194
|
-
// Generator has NO knowledge of validation rules
|
|
195
|
-
const suggestion = await generateCatName(characteristics);
|
|
196
|
-
|
|
197
|
-
// Validator rejects ~60-70% (quirky rules)
|
|
198
|
-
const validation = validateCatName(suggestion.name, characteristics);
|
|
199
|
-
|
|
200
|
-
if (validation.status === 'invalid') {
|
|
201
|
-
// Retry with different approach
|
|
202
|
-
// Tests multi-turn orchestration
|
|
203
|
-
}
|
|
204
|
-
```
|
|
205
|
-
|
|
206
|
-
## Shared Schemas
|
|
207
|
-
|
|
208
|
-
All agents use schemas from `src/types/schemas.ts`:
|
|
209
|
-
|
|
210
|
-
### Core Schemas
|
|
211
|
-
|
|
212
|
-
- **CatCharacteristics** - Physical + behavioral traits
|
|
213
|
-
- **Haiku** - Three-line poem structure
|
|
214
|
-
- **NameSuggestion** - Name + reasoning + alternatives
|
|
215
|
-
- **NameValidationResult** - Approval/rejection with reason
|
|
216
|
-
- **HaikuValidationResult** - Syllable counts + errors + kigo/kireji
|
|
217
|
-
|
|
218
|
-
### Schema Relationships
|
|
219
|
-
|
|
220
|
-
```
|
|
221
|
-
Photo/Text Input
|
|
222
|
-
↓
|
|
223
|
-
CatCharacteristics ────┬─→ Name Generator → NameSuggestion → Name Validator
|
|
224
|
-
│
|
|
225
|
-
└─→ Haiku Generator → Haiku → Haiku Validator
|
|
226
|
-
```
|
|
227
|
-
|
|
228
|
-
## Test Fixtures Strategy
|
|
229
|
-
|
|
230
|
-
### Images with EXIF Metadata
|
|
231
|
-
|
|
232
|
-
**Problem:** Vision APIs are slow and expensive for testing.
|
|
233
|
-
|
|
234
|
-
**Solution:** Embed test expectations in EXIF metadata.
|
|
235
|
-
|
|
236
|
-
**Process:**
|
|
237
|
-
1. Download cat photos from Unsplash (~1-9MB each)
|
|
238
|
-
2. Run `process-test-images.ts` utility:
|
|
239
|
-
- Resizes to 512px wide
|
|
240
|
-
- Compresses to ~50KB
|
|
241
|
-
- Extracts metadata from filename patterns
|
|
242
|
-
- Writes JSON to EXIF Description field
|
|
243
|
-
3. Commit processed images to git (~40KB each)
|
|
244
|
-
|
|
245
|
-
**Mock Mode:**
|
|
246
|
-
- Reads EXIF metadata instead of calling vision API
|
|
247
|
-
- Fast, free, deterministic
|
|
248
|
-
- Perfect for CI/CD
|
|
249
|
-
|
|
250
|
-
**Real Mode:**
|
|
251
|
-
- Set `mockable: false`
|
|
252
|
-
- Calls actual vision API
|
|
253
|
-
- Slow, costs money, non-deterministic
|
|
254
|
-
- Use sparingly for integration tests
|
|
255
|
-
|
|
256
|
-
### Filename Patterns
|
|
257
|
-
|
|
258
|
-
The `process-test-images.ts` utility auto-detects from filenames:
|
|
259
|
-
|
|
260
|
-
- **Colors:** `orange`, `black`, `white`, `gray`, `calico`
|
|
261
|
-
- **Patterns:** `tabby`, `solid`, `patched`, `striped`
|
|
262
|
-
- **Sizes:** `tiny`, `small`, `large` (default: `medium`)
|
|
263
|
-
- **Breeds:** `persian`, `maine-coon`, `siamese`, `domestic-shorthair`
|
|
264
|
-
- **Personality:** `playful`, `lazy`, `grumpy`, `affectionate`, `curious`, `regal`
|
|
265
|
-
- **Quirks:** `three-leg`, `cross-eye`, `scar`
|
|
266
|
-
|
|
267
|
-
**Example:** `orange-tabby-playful.jpg` → Orange tabby with playful personality
|
|
268
|
-
|
|
269
|
-
## Running Tests
|
|
270
|
-
|
|
271
|
-
```bash
|
|
272
|
-
# All tests
|
|
273
|
-
bun run test
|
|
274
|
-
|
|
275
|
-
# Watch mode
|
|
276
|
-
bun run test:watch
|
|
277
|
-
|
|
278
|
-
# Coverage
|
|
279
|
-
bun run test:coverage
|
|
280
|
-
|
|
281
|
-
# Specific archetype
|
|
282
|
-
bun run test src/pure-function-tool
|
|
283
|
-
```
|
|
284
|
-
|
|
285
|
-
## Running Demos
|
|
286
|
-
|
|
287
|
-
```bash
|
|
288
|
-
# Photo analysis demo (uses test fixtures)
|
|
289
|
-
bun run demo:photos
|
|
290
|
-
|
|
291
|
-
# Runtime adapter demos (in other packages)
|
|
292
|
-
cd packages/runtime-vercel-ai-sdk && bun run demo
|
|
293
|
-
cd packages/runtime-langchain && bun run demo
|
|
294
|
-
```
|
|
295
|
-
|
|
296
|
-
## Adding New Agents
|
|
297
|
-
|
|
298
|
-
### Step 1: Choose Archetype
|
|
299
|
-
|
|
300
|
-
Determine which of the 9 archetypes fits your agent.
|
|
301
|
-
|
|
302
|
-
### Step 2: Create Agent File
|
|
303
|
-
|
|
304
|
-
```bash
|
|
305
|
-
# Create in appropriate archetype directory
|
|
306
|
-
touch src/<archetype>/<agent-name>.ts
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
### Step 3: Implement Agent
|
|
310
|
-
|
|
311
|
-
Follow the agent file structure pattern (see Code Patterns above).
|
|
312
|
-
|
|
313
|
-
### Step 4: Add Tests
|
|
314
|
-
|
|
315
|
-
```bash
|
|
316
|
-
# Create test file
|
|
317
|
-
touch test/<archetype>/<agent-name>.test.ts
|
|
318
|
-
```
|
|
319
|
-
|
|
320
|
-
### Step 5: Export from Index
|
|
321
|
-
|
|
322
|
-
```typescript
|
|
323
|
-
// src/index.ts
|
|
324
|
-
export * from './<archetype>/<agent-name>.js';
|
|
325
|
-
```
|
|
326
|
-
|
|
327
|
-
### Step 6: Update README
|
|
328
|
-
|
|
329
|
-
Add agent documentation to README.md under appropriate archetype section.
|
|
330
|
-
|
|
331
|
-
## Common Tasks
|
|
332
|
-
|
|
333
|
-
### Add Test Fixture Images
|
|
334
|
-
|
|
335
|
-
```bash
|
|
336
|
-
# 1. Download images to temp directory
|
|
337
|
-
# 2. Process images
|
|
338
|
-
cd packages/dev-tools
|
|
339
|
-
bun run process-images ~/Downloads/cat-photos ../../vat-example-cat-agents/test/fixtures/photos/cats
|
|
340
|
-
|
|
341
|
-
# 3. Review output (should be <100KB per image)
|
|
342
|
-
# 4. Commit processed images
|
|
343
|
-
```
|
|
344
|
-
|
|
345
|
-
### Add New Schema
|
|
346
|
-
|
|
347
|
-
```typescript
|
|
348
|
-
// src/types/schemas.ts
|
|
349
|
-
export const NewSchema = z.object({
|
|
350
|
-
// Define schema
|
|
351
|
-
}).describe('Schema description');
|
|
352
|
-
|
|
353
|
-
export type NewType = z.infer<typeof NewSchema>;
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
### Mock LLM Calls in Tests
|
|
357
|
-
|
|
358
|
-
```typescript
|
|
359
|
-
// test/<archetype>/<agent>.test.ts
|
|
360
|
-
import { vi } from 'vitest';
|
|
361
|
-
|
|
362
|
-
// Mock the LLM call
|
|
363
|
-
vi.mock('../src/one-shot-llm-analyzer/photo-analyzer', () => ({
|
|
364
|
-
analyzePhoto: vi.fn().mockResolvedValue({
|
|
365
|
-
physical: { furColor: 'Orange', size: 'medium' },
|
|
366
|
-
behavioral: { personality: ['Playful'] },
|
|
367
|
-
description: 'Test description',
|
|
368
|
-
}),
|
|
369
|
-
}));
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
## Architecture Decisions
|
|
373
|
-
|
|
374
|
-
### Why Plain TypeScript Functions?
|
|
375
|
-
|
|
376
|
-
- **Framework agnostic** - No vendor lock-in
|
|
377
|
-
- **Easy to test** - Pure functions, no magic
|
|
378
|
-
- **Portable** - Runtime adapters translate to any framework
|
|
379
|
-
- **Simple** - No framework abstractions to learn
|
|
380
|
-
|
|
381
|
-
### Why Mock Mode?
|
|
382
|
-
|
|
383
|
-
- **Speed** - Instant vs seconds/minutes for real API
|
|
384
|
-
- **Cost** - Free vs $0.01-0.10 per image
|
|
385
|
-
- **Deterministic** - Same input = same output
|
|
386
|
-
- **CI/CD friendly** - No API keys, no rate limits
|
|
387
|
-
|
|
388
|
-
### Why Cat Domain?
|
|
389
|
-
|
|
390
|
-
- **Universal** - Everyone understands cats
|
|
391
|
-
- **Complex enough** - Genetics, breeding, compliance
|
|
392
|
-
- **Fun** - Humor makes exploration enjoyable
|
|
393
|
-
- **Realistic** - Tests real-world patterns (HITL, workflows, etc.)
|
|
394
|
-
|
|
395
|
-
### Why Quirky Validation Rules?
|
|
396
|
-
|
|
397
|
-
- **Forces iteration** - 60-70% rejection rate tests feedback loops
|
|
398
|
-
- **Tests orchestration** - Generator doesn't know rules
|
|
399
|
-
- **Prevents cheating** - LLM can't rely on training (rules are arbitrary)
|
|
400
|
-
- **Demonstrates patterns** - Real-world validation is often quirky
|
|
401
|
-
|
|
402
|
-
## Related Documentation
|
|
403
|
-
|
|
404
|
-
- **README.md** - Human-facing package documentation
|
|
405
|
-
- **docs/structure.md** - Detailed package organization
|
|
406
|
-
- **[Project CLAUDE.md](../../CLAUDE.md)** - Root-level project guidance
|
|
407
|
-
|
|
408
|
-
## Contributing Workflow
|
|
409
|
-
|
|
410
|
-
1. Review the 9 agent archetypes (see Missing Archetypes section above)
|
|
411
|
-
2. Choose an unimplemented archetype
|
|
412
|
-
3. Create agent file(s) in appropriate directory
|
|
413
|
-
4. Add tests with good coverage
|
|
414
|
-
5. Update README.md with usage examples
|
|
415
|
-
6. Export from src/index.ts
|
|
416
|
-
7. Run `bun run validate` to ensure everything passes
|
|
417
|
-
8. Commit with conventional commits format
|
|
418
|
-
|
|
419
|
-
## Questions?
|
|
420
|
-
|
|
421
|
-
For high-level understanding: Read README.md
|
|
422
|
-
For technical navigation: Read this file (CLAUDE.md)
|
|
423
|
-
For package structure details: Read docs/structure.md
|
|
424
|
-
For archetype theory: See the Missing Archetypes section above
|
|
@@ -1,727 +0,0 @@
|
|
|
1
|
-
# @vibe-agent-toolkit/vat-example-cat-agents
|
|
2
|
-
|
|
3
|
-
**Example agents demonstrating VAT patterns across 9 agent archetypes.**
|
|
4
|
-
|
|
5
|
-
## Purpose
|
|
6
|
-
|
|
7
|
-
This package serves as a **reference implementation** for the Vibe Agent Toolkit (VAT). It demonstrates how to build portable agents that work across multiple frameworks (Vercel AI SDK, LangChain, Claude Agent SDK, n8n) using a whimsical but realistic cat breeding domain.
|
|
8
|
-
|
|
9
|
-
**Why cats?** The domain provides realistic complexity (genetics, compliance, multi-step workflows) while remaining approachable and fun. Think of it as the "TodoMVC" of agentic AI frameworks.
|
|
10
|
-
|
|
11
|
-
## Current Status
|
|
12
|
-
|
|
13
|
-
**Implementation Progress:** 4 of 9 archetypes, 8 agents
|
|
14
|
-
|
|
15
|
-
| Archetype | Status | Agents |
|
|
16
|
-
|-----------|--------|--------|
|
|
17
|
-
| 1. Pure Function Tool | ✅ Complete | 2 agents |
|
|
18
|
-
| 2. One-Shot LLM Analyzer | ✅ Complete | 4 agents |
|
|
19
|
-
| 3. Conversational Assistant | ✅ Complete | 1 agent |
|
|
20
|
-
| 4. Agentic Researcher (ReAct) | ⏸️ Planned | 0 agents |
|
|
21
|
-
| 5. Function Workflow Orchestrator | ⏸️ Planned | 0 agents |
|
|
22
|
-
| 6. LLM Intelligent Coordinator | ⏸️ Planned | 0 agents |
|
|
23
|
-
| 7. Function Event Consumer | ⏸️ Planned | 0 agents |
|
|
24
|
-
| 8. LLM Event Handler | ⏸️ Planned | 0 agents |
|
|
25
|
-
| 9. External Event Integrator | ✅ Complete | 1 agent |
|
|
26
|
-
|
|
27
|
-
**Note:** This is a living example package. Archetypes are implemented as we validate the VAT framework design.
|
|
28
|
-
|
|
29
|
-
## Installation
|
|
30
|
-
|
|
31
|
-
### As NPM Package
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install @vibe-agent-toolkit/vat-example-cat-agents
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
### Installing the Skill
|
|
38
|
-
|
|
39
|
-
This package includes a distributable Claude Code skill called `vat-cat-agents` that provides orchestration guidance for using the 8 example cat agents.
|
|
40
|
-
|
|
41
|
-
**Install from npm:**
|
|
42
|
-
```bash
|
|
43
|
-
vat skills install npm:@vibe-agent-toolkit/vat-example-cat-agents
|
|
44
|
-
```
|
|
45
|
-
|
|
46
|
-
**Install from local directory (development):**
|
|
47
|
-
```bash
|
|
48
|
-
vat skills install ./packages/vat-example-cat-agents
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
**Verify installation:**
|
|
52
|
-
```bash
|
|
53
|
-
vat skills list --installed
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
The `vat-cat-agents` skill will be installed to `~/.claude/plugins/vat-cat-agents/` and will appear in Claude Code after restarting or running `/reload-skills`.
|
|
57
|
-
|
|
58
|
-
**What the skill includes:**
|
|
59
|
-
- SKILL.md with agent orchestration patterns
|
|
60
|
-
- Documentation on multi-agent workflows
|
|
61
|
-
- Examples of feedback loops (generator → validator)
|
|
62
|
-
- Multi-modal input patterns (photo vs text)
|
|
63
|
-
- Links to all 8 agent implementations
|
|
64
|
-
|
|
65
|
-
## Result Envelopes
|
|
66
|
-
|
|
67
|
-
All VAT agents return standardized result envelopes following Railway-Oriented Programming (ROP) principles. This provides consistent error handling, type-safe result processing, and clear orchestration patterns.
|
|
68
|
-
|
|
69
|
-
### OneShotAgentOutput (Pure Functions & One-Shot LLM)
|
|
70
|
-
|
|
71
|
-
Pure function tools and one-shot LLM analyzers return `OneShotAgentOutput<TData, TError>`:
|
|
72
|
-
|
|
73
|
-
```typescript
|
|
74
|
-
interface OneShotAgentOutput<TData, TError> {
|
|
75
|
-
result: AgentResult<TData, TError>;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
type AgentResult<TData, TError> =
|
|
79
|
-
| { status: 'success'; data: TData }
|
|
80
|
-
| { status: 'error'; error: TError };
|
|
81
|
-
```
|
|
82
|
-
|
|
83
|
-
**Example:**
|
|
84
|
-
```typescript
|
|
85
|
-
const output = await haikuValidator.execute({ text, syllables, kigo, kireji });
|
|
86
|
-
|
|
87
|
-
if (output.result.status === 'success') {
|
|
88
|
-
console.log('Valid:', output.result.data.valid);
|
|
89
|
-
} else {
|
|
90
|
-
console.error('Invalid:', output.result.error);
|
|
91
|
-
}
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
### ConversationalAgentOutput (Multi-Turn Agents)
|
|
95
|
-
|
|
96
|
-
Conversational assistants return `ConversationalAgentOutput<TData, TError, TState>`:
|
|
97
|
-
|
|
98
|
-
```typescript
|
|
99
|
-
interface ConversationalAgentOutput<TData, TError, TState> {
|
|
100
|
-
reply: string; // Natural language response
|
|
101
|
-
sessionState: TState; // Updated session state
|
|
102
|
-
result: StatefulAgentResult<TData, TError, TMetadata>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
type StatefulAgentResult<TData, TError, TMetadata> =
|
|
106
|
-
| { status: 'in-progress'; metadata?: TMetadata }
|
|
107
|
-
| { status: 'success'; data: TData }
|
|
108
|
-
| { status: 'error'; error: TError };
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**Example:**
|
|
112
|
-
```typescript
|
|
113
|
-
const output = await breedAdvisor.execute({
|
|
114
|
-
message: 'I love classical music',
|
|
115
|
-
sessionState: { profile: { conversationPhase: 'gathering' } },
|
|
116
|
-
});
|
|
117
|
-
|
|
118
|
-
console.log('Agent says:', output.reply); // For user
|
|
119
|
-
const nextState = output.sessionState; // Carry to next turn
|
|
120
|
-
|
|
121
|
-
if (output.result.status === 'in-progress') {
|
|
122
|
-
console.log('Gathering info:', output.result.metadata);
|
|
123
|
-
} else if (output.result.status === 'success') {
|
|
124
|
-
console.log('Recommendation:', output.result.data);
|
|
125
|
-
}
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
See [Orchestration Guide](../../docs/orchestration.md) for detailed patterns and examples.
|
|
129
|
-
|
|
130
|
-
## Agent Catalog
|
|
131
|
-
|
|
132
|
-
### Archetype 1: Pure Function Tool
|
|
133
|
-
|
|
134
|
-
**Characteristics:** Stateless, synchronous, deterministic, no external dependencies
|
|
135
|
-
|
|
136
|
-
**Use Cases:** Validation, calculation, formatting, rule-based logic
|
|
137
|
-
|
|
138
|
-
#### Haiku Validator
|
|
139
|
-
|
|
140
|
-
Validates haiku structure according to traditional Japanese poetry rules.
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
import { validateHaiku, type Haiku } from '@vibe-agent-toolkit/vat-example-cat-agents';
|
|
144
|
-
|
|
145
|
-
const haiku: Haiku = {
|
|
146
|
-
line1: 'Autumn moon rises',
|
|
147
|
-
line2: 'Silver light on quiet waves',
|
|
148
|
-
line3: 'The cat sits and waits',
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
const result = validateHaiku(haiku);
|
|
152
|
-
console.log(result);
|
|
153
|
-
// {
|
|
154
|
-
// valid: true,
|
|
155
|
-
// syllables: { line1: 5, line2: 7, line3: 5 },
|
|
156
|
-
// errors: [],
|
|
157
|
-
// hasKigo: true, // Seasonal reference detected
|
|
158
|
-
// hasKireji: false // No cutting word
|
|
159
|
-
// }
|
|
160
|
-
```
|
|
161
|
-
|
|
162
|
-
**Validation Rules:**
|
|
163
|
-
- 5-7-5 syllable structure (strict)
|
|
164
|
-
- Kigo detection (seasonal words: spring, autumn, winter, summer, etc.)
|
|
165
|
-
- Kireji detection (cutting words: や, かな, けり, etc.)
|
|
166
|
-
|
|
167
|
-
**Not Cat-Specific:** This is a general-purpose haiku validator, reusable for any haiku validation.
|
|
168
|
-
|
|
169
|
-
#### Name Validator
|
|
170
|
-
|
|
171
|
-
Validates cat names against whimsical characteristic-based rules.
|
|
172
|
-
|
|
173
|
-
```typescript
|
|
174
|
-
import { validateCatName, type CatCharacteristics } from '@vibe-agent-toolkit/vat-example-cat-agents';
|
|
175
|
-
|
|
176
|
-
const cat: CatCharacteristics = {
|
|
177
|
-
physical: {
|
|
178
|
-
furColor: 'Orange',
|
|
179
|
-
furPattern: 'Tabby',
|
|
180
|
-
eyeColor: 'Green',
|
|
181
|
-
size: 'large',
|
|
182
|
-
},
|
|
183
|
-
behavioral: {
|
|
184
|
-
personality: ['Regal', 'Demanding'],
|
|
185
|
-
},
|
|
186
|
-
description: 'A large orange tabby who rules the household',
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
const result = validateCatName('Duke Marmalade III', cat);
|
|
190
|
-
console.log(result);
|
|
191
|
-
// {
|
|
192
|
-
// status: 'valid',
|
|
193
|
-
// reason: 'Proper masculine nobility with food-related theme!'
|
|
194
|
-
// }
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
**Quirky Validation Rules:**
|
|
198
|
-
- Three-legged cats must have three-syllable names
|
|
199
|
-
- Black cats cannot have names containing the letter 'e'
|
|
200
|
-
- Orange cats must have food-related names (Marmalade, Pumpkin, etc.)
|
|
201
|
-
- High-energy cats need short names (≤5 letters)
|
|
202
|
-
- Fluffy cats need repeated consonants (Mittens, Fluffy, etc.)
|
|
203
|
-
|
|
204
|
-
**Purpose:** Tests feedback loops (60-70% rejection rate forces iteration patterns)
|
|
205
|
-
|
|
206
|
-
---
|
|
207
|
-
|
|
208
|
-
### Archetype 2: One-Shot LLM Analyzer
|
|
209
|
-
|
|
210
|
-
**Characteristics:** Single LLM call, no iteration, stateless, classification/extraction/generation
|
|
211
|
-
|
|
212
|
-
**Use Cases:** Image analysis, text parsing, classification, structured extraction, generation
|
|
213
|
-
|
|
214
|
-
#### Photo Analyzer
|
|
215
|
-
|
|
216
|
-
Extracts structured cat characteristics from images using vision LLM.
|
|
217
|
-
|
|
218
|
-
```typescript
|
|
219
|
-
import { analyzePhoto } from '@vibe-agent-toolkit/vat-example-cat-agents';
|
|
220
|
-
|
|
221
|
-
const characteristics = await analyzePhoto('/path/to/cat-photo.jpg');
|
|
222
|
-
console.log(characteristics);
|
|
223
|
-
// {
|
|
224
|
-
// physical: {
|
|
225
|
-
// furColor: 'Orange',
|
|
226
|
-
// furPattern: 'Tabby',
|
|
227
|
-
// eyeColor: 'Green',
|
|
228
|
-
// breed: 'Domestic Shorthair',
|
|
229
|
-
// size: 'medium'
|
|
230
|
-
// },
|
|
231
|
-
// behavioral: {
|
|
232
|
-
// personality: ['Playful', 'Curious'],
|
|
233
|
-
// quirks: []
|
|
234
|
-
// },
|
|
235
|
-
// description: 'An orange tabby cat with green eyes...'
|
|
236
|
-
// }
|
|
237
|
-
```
|
|
238
|
-
|
|
239
|
-
**Mock Mode:** Default behavior extracts from EXIF metadata + filename patterns (fast, free, deterministic). Set `mockable: false` to use real vision API.
|
|
240
|
-
|
|
241
|
-
**Multi-Modal Input:** Produces same `CatCharacteristics` schema as Description Parser (interchangeable inputs).
|
|
242
|
-
|
|
243
|
-
#### Description Parser
|
|
244
|
-
|
|
245
|
-
Parses unstructured text descriptions into structured cat characteristics.
|
|
246
|
-
|
|
247
|
-
```typescript
|
|
248
|
-
import { parseDescription } from '@vibe-agent-toolkit/vat-example-cat-agents';
|
|
249
|
-
|
|
250
|
-
const text = "Fluffy is a large, playful orange tabby with green eyes. She's very curious and loves to explore.";
|
|
251
|
-
const characteristics = await parseDescription(text);
|
|
252
|
-
// Returns same CatCharacteristics schema as Photo Analyzer
|
|
253
|
-
```
|
|
254
|
-
|
|
255
|
-
**Multi-Modal Convergence:** Text input → same schema as image input. Enables pipelines that accept either photos or descriptions.
|
|
256
|
-
|
|
257
|
-
#### Name Generator
|
|
258
|
-
|
|
259
|
-
Generates creative cat names based on characteristics.
|
|
260
|
-
|
|
261
|
-
```typescript
|
|
262
|
-
import { generateCatName } from '@vibe-agent-toolkit/vat-example-cat-agents';
|
|
263
|
-
|
|
264
|
-
const name = await generateCatName(characteristics);
|
|
265
|
-
console.log(name);
|
|
266
|
-
// {
|
|
267
|
-
// name: 'Duke Marmalade III',
|
|
268
|
-
// reasoning: 'Orange color suggests food theme, regal personality demands nobility',
|
|
269
|
-
// alternatives: ['Sir Butterscotch', 'Lord Pumpkin']
|
|
270
|
-
// }
|
|
271
|
-
```
|
|
272
|
-
|
|
273
|
-
**No Knowledge of Rules:** Generator does NOT know the validation rules. This is intentional - tests feedback loop patterns where generator → validator → retry.
|
|
274
|
-
|
|
275
|
-
#### Haiku Generator
|
|
276
|
-
|
|
277
|
-
Creates cat-themed haikus from characteristics.
|
|
278
|
-
|
|
279
|
-
```typescript
|
|
280
|
-
import { generateHaiku } from '@vibe-agent-toolkit/vat-example-cat-agents';
|
|
281
|
-
|
|
282
|
-
const haiku = await generateHaiku(characteristics);
|
|
283
|
-
console.log(haiku);
|
|
284
|
-
// {
|
|
285
|
-
// line1: 'Orange fur gleaming',
|
|
286
|
-
// line2: 'Playful paws dance in sunshine',
|
|
287
|
-
// line3: 'Green eyes watch and wait'
|
|
288
|
-
// }
|
|
289
|
-
```
|
|
290
|
-
|
|
291
|
-
**Feedback Loop:** Generated haikus can be validated with Haiku Validator. Tests iteration patterns.
|
|
292
|
-
|
|
293
|
-
---
|
|
294
|
-
|
|
295
|
-
### Archetype 3: Conversational Assistant
|
|
296
|
-
|
|
297
|
-
**Characteristics:** Multi-turn conversation, session state management, context accumulation, flexible dialogue
|
|
298
|
-
|
|
299
|
-
**Use Cases:** Advisory chatbots, guided workflows, interactive Q&A, personalized recommendations
|
|
300
|
-
|
|
301
|
-
#### Breed Selection Advisor
|
|
302
|
-
|
|
303
|
-
Helps users find their perfect cat breed through flexible, natural conversation. Tracks selection factors across multiple turns and provides personalized recommendations based on a whimsical music-breed compatibility theory.
|
|
304
|
-
|
|
305
|
-
```typescript
|
|
306
|
-
import { breedAdvisorAgent } from '@vibe-agent-toolkit/vat-example-cat-agents';
|
|
307
|
-
|
|
308
|
-
// Turn 1: Initial greeting
|
|
309
|
-
let result = await breedAdvisorAgent({
|
|
310
|
-
message: "Hi! I'm looking for a cat breed that fits my lifestyle.",
|
|
311
|
-
sessionState: undefined, // No prior state
|
|
312
|
-
});
|
|
313
|
-
|
|
314
|
-
console.log(result.reply);
|
|
315
|
-
// "Hello! I'd love to help you find the perfect breed! To get started, tell me..."
|
|
316
|
-
console.log(result.updatedProfile.conversationPhase); // "gathering"
|
|
317
|
-
|
|
318
|
-
// Turn 2: Provide information
|
|
319
|
-
result = await breedAdvisorAgent({
|
|
320
|
-
message: "I live in a small apartment and work from home. I listen to jazz music while coding.",
|
|
321
|
-
sessionState: {
|
|
322
|
-
profile: result.updatedProfile, // Pass updated profile from previous turn
|
|
323
|
-
},
|
|
324
|
-
});
|
|
325
|
-
|
|
326
|
-
console.log(result.reply);
|
|
327
|
-
// "Excellent! Jazz lovers tend to appreciate cats with..."
|
|
328
|
-
console.log(result.updatedProfile);
|
|
329
|
-
// {
|
|
330
|
-
// livingSpace: 'apartment',
|
|
331
|
-
// musicPreference: 'jazz',
|
|
332
|
-
// conversationPhase: 'gathering'
|
|
333
|
-
// }
|
|
334
|
-
|
|
335
|
-
// Turn 3: More information
|
|
336
|
-
result = await breedAdvisorAgent({
|
|
337
|
-
message: "I prefer low-maintenance grooming and I'm moderately active.",
|
|
338
|
-
sessionState: {
|
|
339
|
-
profile: result.updatedProfile,
|
|
340
|
-
},
|
|
341
|
-
});
|
|
342
|
-
|
|
343
|
-
console.log(result.updatedProfile.conversationPhase); // "ready-to-recommend"
|
|
344
|
-
console.log(result.recommendations);
|
|
345
|
-
// [
|
|
346
|
-
// {
|
|
347
|
-
// breed: 'Siamese',
|
|
348
|
-
// matchScore: 85,
|
|
349
|
-
// reasoning: 'music preference (jazz) aligns perfectly; activity level (playful-moderate) matches well; suitable for apartment living'
|
|
350
|
-
// },
|
|
351
|
-
// {
|
|
352
|
-
// breed: 'Bengal',
|
|
353
|
-
// matchScore: 70,
|
|
354
|
-
// reasoning: 'music preference (jazz) aligns perfectly; grooming needs (minimal) match tolerance'
|
|
355
|
-
// },
|
|
356
|
-
// // ... more recommendations
|
|
357
|
-
// ]
|
|
358
|
-
|
|
359
|
-
// Turn 4: Follow-up question
|
|
360
|
-
result = await breedAdvisorAgent({
|
|
361
|
-
message: "Tell me more about the Siamese - are they vocal?",
|
|
362
|
-
sessionState: {
|
|
363
|
-
profile: result.updatedProfile,
|
|
364
|
-
},
|
|
365
|
-
});
|
|
366
|
-
|
|
367
|
-
console.log(result.updatedProfile.conversationPhase); // "refining"
|
|
368
|
-
// Agent provides detailed information about Siamese cats
|
|
369
|
-
```
|
|
370
|
-
|
|
371
|
-
**Selection Factors Tracked:**
|
|
372
|
-
|
|
373
|
-
1. **Living Space** - apartment, small-house, large-house, farm
|
|
374
|
-
2. **Activity Level** - couch-companion, playful-moderate, active-explorer, high-energy-athlete
|
|
375
|
-
3. **Grooming Tolerance** - minimal, weekly, daily
|
|
376
|
-
4. **Family Composition** - single, couple, young-kids, older-kids, multi-pet
|
|
377
|
-
5. **Allergies** - boolean (requires hypoallergenic breeds)
|
|
378
|
-
6. **Music Preference** - classical, jazz, rock, metal, pop, country, electronic, none (CRITICAL!)
|
|
379
|
-
|
|
380
|
-
**The Music Factor (CRITICAL!):**
|
|
381
|
-
|
|
382
|
-
This agent is built on a whimsical theory: **music preference is the MOST IMPORTANT factor** in cat breed selection!
|
|
383
|
-
|
|
384
|
-
Each music genre aligns with specific breed temperaments through "vibrational frequency compatibility":
|
|
385
|
-
|
|
386
|
-
- **Classical** → Calm, regal breeds (Persian, Ragdoll) - harmonic resonance
|
|
387
|
-
- **Jazz** → Intelligent, unpredictable breeds (Siamese, Bengal) - improvisational energy
|
|
388
|
-
- **Rock/Metal** → High-energy, bold breeds (Maine Coon, Abyssinian) - intensity matching
|
|
389
|
-
- **Pop** → Social, adaptable breeds (Domestic Shorthair) - mainstream compatibility
|
|
390
|
-
- **Electronic** → Modern, quirky breeds (Sphynx, Devon Rex) - synthetic-natural balance
|
|
391
|
-
- **Country** → Traditional, loyal breeds (American Shorthair) - heartland values
|
|
392
|
-
- **None/Silence** → Independent, mysterious breeds (Russian Blue) - zen alignment
|
|
393
|
-
|
|
394
|
-
Music preference receives **30 points (30% weight)** in the matching algorithm - more than any other factor!
|
|
395
|
-
|
|
396
|
-
**Conversation Phases:**
|
|
397
|
-
|
|
398
|
-
The agent automatically transitions through three phases based on information gathered:
|
|
399
|
-
|
|
400
|
-
1. **Gathering** (<4 factors): Asks questions to collect missing factors, prioritizes music preference
|
|
401
|
-
2. **Ready-to-Recommend** (4-6 factors): Can provide initial recommendations, still gathering more info
|
|
402
|
-
3. **Refining** (6+ factors or recommendations made): Explores alternatives, answers detailed questions
|
|
403
|
-
|
|
404
|
-
**State Management:**
|
|
405
|
-
|
|
406
|
-
Each turn receives the updated profile from the previous turn via `sessionState.profile`. The profile accumulates information across the conversation:
|
|
407
|
-
|
|
408
|
-
```typescript
|
|
409
|
-
{
|
|
410
|
-
livingSpace?: 'apartment' | 'small-house' | 'large-house' | 'farm',
|
|
411
|
-
activityLevel?: 'couch-companion' | 'playful-moderate' | 'active-explorer' | 'high-energy-athlete',
|
|
412
|
-
groomingTolerance?: 'minimal' | 'weekly' | 'daily',
|
|
413
|
-
familyComposition?: 'single' | 'couple' | 'young-kids' | 'older-kids' | 'multi-pet',
|
|
414
|
-
allergies?: boolean,
|
|
415
|
-
musicPreference?: 'classical' | 'jazz' | 'rock' | 'metal' | 'pop' | 'country' | 'electronic' | 'none',
|
|
416
|
-
conversationPhase: 'gathering' | 'ready-to-recommend' | 'refining'
|
|
417
|
-
}
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
**Breed Matching Algorithm:**
|
|
421
|
-
|
|
422
|
-
Scores breeds based on profile factors:
|
|
423
|
-
- Music preference: 30 points (2x weight - CRITICAL!)
|
|
424
|
-
- Activity level: 20 points
|
|
425
|
-
- Living space: 15 points
|
|
426
|
-
- Grooming tolerance: 15 points
|
|
427
|
-
- Family composition: 10 points
|
|
428
|
-
- Hard filters: Allergies require hypoallergenic, young kids require good-with-kids
|
|
429
|
-
|
|
430
|
-
Returns top 5 breeds with match scores (0-100) and reasoning.
|
|
431
|
-
|
|
432
|
-
**Knowledge Base:**
|
|
433
|
-
|
|
434
|
-
The agent uses a curated database of 12 breeds with comprehensive trait profiles:
|
|
435
|
-
- Persian, Ragdoll, Siamese, Bengal, Maine Coon, Abyssinian
|
|
436
|
-
- Sphynx, Devon Rex, Russian Blue, Domestic Shorthair, American Shorthair, Scottish Fold
|
|
437
|
-
|
|
438
|
-
Each breed profile includes: activity levels, grooming needs, apartment suitability, kid/pet compatibility, hypoallergenic status, **music alignment**, temperament, and size.
|
|
439
|
-
|
|
440
|
-
---
|
|
441
|
-
|
|
442
|
-
### Archetype 9: External Event Integrator
|
|
443
|
-
|
|
444
|
-
**Characteristics:** Emits events to external systems, blocks waiting for response, timeout handling
|
|
445
|
-
|
|
446
|
-
**Use Cases:** Human-in-the-loop approval, API callbacks, webhook handlers, external service integration
|
|
447
|
-
|
|
448
|
-
#### Human Approval Gate
|
|
449
|
-
|
|
450
|
-
Requests human approval for decisions (mockable for testing).
|
|
451
|
-
|
|
452
|
-
```typescript
|
|
453
|
-
import { requestHumanApproval } from '@vibe-agent-toolkit/vat-example-cat-agents';
|
|
454
|
-
|
|
455
|
-
const decision = await requestHumanApproval({
|
|
456
|
-
title: 'Breeding Permit Review',
|
|
457
|
-
description: 'Duke Marmalade III x Lady Whiskers',
|
|
458
|
-
context: { applicationId: '12345', risk: 'low' }
|
|
459
|
-
});
|
|
460
|
-
|
|
461
|
-
console.log(decision);
|
|
462
|
-
// { status: 'approved', approver: 'human@example.com', timestamp: '...' }
|
|
463
|
-
// OR
|
|
464
|
-
// { status: 'rejected', reason: 'Genetic coefficient too high', timestamp: '...' }
|
|
465
|
-
```
|
|
466
|
-
|
|
467
|
-
**Mock Mode:** Default returns instant approval. Set `mockable: false` for real HITL integration (Slack, email, etc.).
|
|
468
|
-
|
|
469
|
-
**Timeout Handling:** Configurable timeout with fallback behavior (default: 24 hours for human timescale).
|
|
470
|
-
|
|
471
|
-
**Integration Agnostic:** Does not constrain HOW approval is requested (Slack, email, custom UI). Framework adapters implement integration details.
|
|
472
|
-
|
|
473
|
-
---
|
|
474
|
-
|
|
475
|
-
## Planned Agents (Coming Soon)
|
|
476
|
-
|
|
477
|
-
### Archetype 4: Agentic Researcher (ReAct)
|
|
478
|
-
|
|
479
|
-
**Target:** Breed history researcher with tool-calling and iterative reasoning.
|
|
480
|
-
|
|
481
|
-
**Use Case:** Research cat breed origins using web search + document analysis tools.
|
|
482
|
-
|
|
483
|
-
### Archetype 5: Function Workflow Orchestrator
|
|
484
|
-
|
|
485
|
-
**Target:** Breeding approval pipeline with deterministic multi-agent coordination.
|
|
486
|
-
|
|
487
|
-
**Use Case:** Validate genetics → Generate name → Request approval → Update registry.
|
|
488
|
-
|
|
489
|
-
### Archetype 6: LLM Intelligent Coordinator
|
|
490
|
-
|
|
491
|
-
**Target:** Smart submission router with LLM decision-making at checkpoints.
|
|
492
|
-
|
|
493
|
-
**Use Case:** Route breeding applications based on complexity (auto-approve simple, escalate complex).
|
|
494
|
-
|
|
495
|
-
### Archetype 7: Function Event Consumer
|
|
496
|
-
|
|
497
|
-
**Target:** Pedigree file processor triggered by file upload events.
|
|
498
|
-
|
|
499
|
-
**Use Case:** Process uploaded pedigree documents and update registry.
|
|
500
|
-
|
|
501
|
-
### Archetype 8: LLM Event Handler
|
|
502
|
-
|
|
503
|
-
**Target:** Intelligent triage handler with LLM classification.
|
|
504
|
-
|
|
505
|
-
**Use Case:** Classify incoming submissions and route to appropriate queues.
|
|
506
|
-
|
|
507
|
-
---
|
|
508
|
-
|
|
509
|
-
## Running Demos
|
|
510
|
-
|
|
511
|
-
### Photo Analysis Demo
|
|
512
|
-
|
|
513
|
-
Demonstrates the photo analyzer with actual test fixture images:
|
|
514
|
-
|
|
515
|
-
```bash
|
|
516
|
-
bun run demo:photos
|
|
517
|
-
```
|
|
518
|
-
|
|
519
|
-
**What it does:**
|
|
520
|
-
- Loads 4 cat photos + 2 not-cat photos (bear, robot) from `test/fixtures/photos/`
|
|
521
|
-
- Analyzes each photo using **MOCK MODE** (EXIF metadata + filename patterns)
|
|
522
|
-
- Displays extracted characteristics
|
|
523
|
-
- Shows clear warning that it's not analyzing actual pixels
|
|
524
|
-
|
|
525
|
-
**Mock Mode vs Real Vision API:**
|
|
526
|
-
- **MOCK MODE** (default): Extracts from EXIF metadata and filename patterns. Fast, free, deterministic. Does NOT analyze actual pixels.
|
|
527
|
-
- **REAL MODE** (future): Set `USE_REAL_VISION=true` to call actual vision API (Claude Vision, GPT-4 Vision). Slow, costs money, analyzes actual pixels.
|
|
528
|
-
|
|
529
|
-
### Runtime Adapter Demos
|
|
530
|
-
|
|
531
|
-
To see cat agents used across different frameworks:
|
|
532
|
-
|
|
533
|
-
```bash
|
|
534
|
-
# Vercel AI SDK demo
|
|
535
|
-
cd packages/runtime-vercel-ai-sdk
|
|
536
|
-
bun run demo
|
|
537
|
-
|
|
538
|
-
# LangChain demo
|
|
539
|
-
cd packages/runtime-langchain
|
|
540
|
-
bun run demo
|
|
541
|
-
|
|
542
|
-
# OpenAI SDK demo
|
|
543
|
-
cd packages/runtime-openai
|
|
544
|
-
bun run demo
|
|
545
|
-
|
|
546
|
-
# Claude Agent SDK demo
|
|
547
|
-
cd packages/runtime-claude-agent-sdk
|
|
548
|
-
bun run demo
|
|
549
|
-
```
|
|
550
|
-
|
|
551
|
-
These demos show the **same cat agents** working across different runtimes, demonstrating portability.
|
|
552
|
-
|
|
553
|
-
---
|
|
554
|
-
|
|
555
|
-
## Core Schemas
|
|
556
|
-
|
|
557
|
-
All agents use shared Zod schemas for type safety:
|
|
558
|
-
|
|
559
|
-
### CatCharacteristics
|
|
560
|
-
|
|
561
|
-
```typescript
|
|
562
|
-
{
|
|
563
|
-
physical: {
|
|
564
|
-
furColor: string,
|
|
565
|
-
furPattern?: string,
|
|
566
|
-
eyeColor?: string,
|
|
567
|
-
breed?: string,
|
|
568
|
-
size: 'tiny' | 'small' | 'medium' | 'large'
|
|
569
|
-
},
|
|
570
|
-
behavioral: {
|
|
571
|
-
personality: string[],
|
|
572
|
-
quirks?: string[]
|
|
573
|
-
},
|
|
574
|
-
description: string
|
|
575
|
-
}
|
|
576
|
-
```
|
|
577
|
-
|
|
578
|
-
### Haiku
|
|
579
|
-
|
|
580
|
-
```typescript
|
|
581
|
-
{
|
|
582
|
-
line1: string, // 5 syllables
|
|
583
|
-
line2: string, // 7 syllables
|
|
584
|
-
line3: string // 5 syllables
|
|
585
|
-
}
|
|
586
|
-
```
|
|
587
|
-
|
|
588
|
-
### NameSuggestion
|
|
589
|
-
|
|
590
|
-
```typescript
|
|
591
|
-
{
|
|
592
|
-
name: string,
|
|
593
|
-
reasoning: string,
|
|
594
|
-
alternatives: string[]
|
|
595
|
-
}
|
|
596
|
-
```
|
|
597
|
-
|
|
598
|
-
### ValidationResult
|
|
599
|
-
|
|
600
|
-
```typescript
|
|
601
|
-
{
|
|
602
|
-
status: 'valid' | 'invalid',
|
|
603
|
-
reason: string,
|
|
604
|
-
suggestedFixes?: string[]
|
|
605
|
-
}
|
|
606
|
-
```
|
|
607
|
-
|
|
608
|
-
---
|
|
609
|
-
|
|
610
|
-
## Architecture Highlights
|
|
611
|
-
|
|
612
|
-
### Multi-Modal Input Convergence
|
|
613
|
-
|
|
614
|
-
Photo Analyzer and Description Parser both produce `CatCharacteristics` schema. This enables pipelines that accept **either** images **or** text descriptions interchangeably.
|
|
615
|
-
|
|
616
|
-
```typescript
|
|
617
|
-
// Pipeline works with EITHER input type
|
|
618
|
-
const characteristics = isImage(input)
|
|
619
|
-
? await analyzePhoto(input)
|
|
620
|
-
: await parseDescription(input);
|
|
621
|
-
|
|
622
|
-
const name = await generateCatName(characteristics);
|
|
623
|
-
const haiku = await generateHaiku(characteristics);
|
|
624
|
-
```
|
|
625
|
-
|
|
626
|
-
### Feedback Loop Testing
|
|
627
|
-
|
|
628
|
-
Name Generator → Name Validator creates a realistic feedback loop:
|
|
629
|
-
- Generator creates names without knowledge of rules
|
|
630
|
-
- Validator rejects ~60-70% of names (quirky rules)
|
|
631
|
-
- Forces retry/iteration patterns
|
|
632
|
-
- Tests multi-turn orchestration
|
|
633
|
-
|
|
634
|
-
### Framework Portability
|
|
635
|
-
|
|
636
|
-
All agents are **plain TypeScript functions** with no framework dependencies. Runtime adapters translate agents to framework-specific formats:
|
|
637
|
-
|
|
638
|
-
- **Vercel AI SDK**: Agents → Tools with `execute` functions
|
|
639
|
-
- **LangChain**: Agents → Tools with structured I/O
|
|
640
|
-
- **Claude Agent SDK**: Agents → Agent objects with tool handlers
|
|
641
|
-
- **n8n**: Agents → Custom nodes with visual wiring
|
|
642
|
-
|
|
643
|
-
**Same agents, different orchestration.**
|
|
644
|
-
|
|
645
|
-
---
|
|
646
|
-
|
|
647
|
-
## Development
|
|
648
|
-
|
|
649
|
-
```bash
|
|
650
|
-
# Install dependencies
|
|
651
|
-
bun install
|
|
652
|
-
|
|
653
|
-
# Build
|
|
654
|
-
bun run build
|
|
655
|
-
|
|
656
|
-
# Run tests
|
|
657
|
-
bun run test
|
|
658
|
-
|
|
659
|
-
# Type check
|
|
660
|
-
bun run typecheck
|
|
661
|
-
|
|
662
|
-
# Lint
|
|
663
|
-
bun run lint
|
|
664
|
-
|
|
665
|
-
# Run demos
|
|
666
|
-
bun run demo:photos
|
|
667
|
-
```
|
|
668
|
-
|
|
669
|
-
---
|
|
670
|
-
|
|
671
|
-
## Test Fixtures
|
|
672
|
-
|
|
673
|
-
### Processing Cat Photos
|
|
674
|
-
|
|
675
|
-
This package includes git-friendly test images with embedded EXIF metadata for realistic testing.
|
|
676
|
-
|
|
677
|
-
**Strategy:**
|
|
678
|
-
- Original images: 1-9MB each (too large for git)
|
|
679
|
-
- Processed images: 13-60KB each (git-friendly)
|
|
680
|
-
- Embedded EXIF metadata contains test expectations
|
|
681
|
-
- Mock mode reads EXIF instead of calling vision API
|
|
682
|
-
|
|
683
|
-
**Processing images:**
|
|
684
|
-
|
|
685
|
-
```bash
|
|
686
|
-
# From repo root
|
|
687
|
-
cd packages/dev-tools
|
|
688
|
-
bun run process-images ~/Downloads/cat-photos ../../vat-example-cat-agents/test/fixtures/photos/cats
|
|
689
|
-
```
|
|
690
|
-
|
|
691
|
-
See `@vibe-agent-toolkit/dev-tools` package for the `process-test-images.ts` utility.
|
|
692
|
-
|
|
693
|
-
**Fixture structure:**
|
|
694
|
-
|
|
695
|
-
```
|
|
696
|
-
test/fixtures/photos/
|
|
697
|
-
├── cats/ # Valid cat photos (4 images)
|
|
698
|
-
├── not-cats/ # Negative test cases (bear, robot)
|
|
699
|
-
└── cat-like/ # Ambiguous cases (future: stuffed animals, statues)
|
|
700
|
-
```
|
|
701
|
-
|
|
702
|
-
---
|
|
703
|
-
|
|
704
|
-
## Contributing
|
|
705
|
-
|
|
706
|
-
This is a reference implementation that evolves with the VAT framework. Each new archetype implementation helps validate the framework design.
|
|
707
|
-
|
|
708
|
-
**Current priorities:**
|
|
709
|
-
1. Complete remaining LLM analyzer agents (conversational assistant)
|
|
710
|
-
2. Implement agentic researcher (ReAct pattern with tools)
|
|
711
|
-
3. Add workflow orchestrator (multi-agent pipelines)
|
|
712
|
-
4. Demonstrate event-driven patterns (consumers and handlers)
|
|
713
|
-
|
|
714
|
-
See [CLAUDE.md](CLAUDE.md) for technical navigation details when contributing.
|
|
715
|
-
|
|
716
|
-
---
|
|
717
|
-
|
|
718
|
-
## Documentation
|
|
719
|
-
|
|
720
|
-
- **structure.md** - Package organization and conventions
|
|
721
|
-
- **[CLAUDE.md](CLAUDE.md)** - Technical navigation for AI assistants
|
|
722
|
-
|
|
723
|
-
---
|
|
724
|
-
|
|
725
|
-
## License
|
|
726
|
-
|
|
727
|
-
MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/skills/vat-example-cat-agents/{haiku-generator.md → resources/haiku-generator.md}
RENAMED
|
File without changes
|
/package/dist/skills/vat-example-cat-agents/{name-generator.md → resources/name-generator.md}
RENAMED
|
File without changes
|
/package/dist/skills/vat-example-cat-agents/{photo-analyzer.md → resources/photo-analyzer.md}
RENAMED
|
File without changes
|
|
File without changes
|