Skip to content

Commit e7c2957

Browse files
authored
feat: agent to agent feature (#32)
* feat: improve output * feat: agent to agent execution * feat: docs updated * fix: rename file * feat: improved logging * feat: override models * feat: update docs * feat: update docs * feat: added more tests * feat: vocieflow to vocieflow agent testing * fix: API key * feat: update code * fix: lint issue
1 parent 562efec commit e7c2957

29 files changed

+2141
-117
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,4 +47,3 @@ voiceflow-cli/choco
4747
test.yaml
4848

4949
file.json
50-
test_*.yaml

diagrams/agent-to-agent.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
### OpenAI as Tester
2+
3+
```mermaid
4+
sequenceDiagram
5+
actor User
6+
participant CLI
7+
participant TestRunner as "Test Runner (OpenAI)"
8+
participant TargetAgent as "Voiceflow Target Agent"
9+
participant OpenAI
10+
11+
User->>CLI: Run agent-to-agent test
12+
CLI->>TestRunner: Start test with goal
13+
14+
TestRunner->>TargetAgent: Start Conversation
15+
TargetAgent-->>TestRunner: Initial Response
16+
17+
loop Conversation Steps
18+
TestRunner->>OpenAI: Generate next user turn based on goal and history
19+
OpenAI-->>TestRunner: User message
20+
TestRunner->>TargetAgent: Send user message
21+
TargetAgent-->>TestRunner: Agent response
22+
end
23+
```
24+
25+
### Voiceflow Agent as Tester
26+
27+
```mermaid
28+
sequenceDiagram
29+
actor User
30+
participant CLI
31+
participant TestRunner as "Test Runner (Voiceflow)"
32+
participant TargetAgent as "Voiceflow Target Agent"
33+
participant TesterAgent as "Voiceflow Tester Agent"
34+
35+
User->>CLI: Run agent-to-agent test
36+
CLI->>TestRunner: Start test with goal
37+
38+
TestRunner->>TargetAgent: Start Conversation
39+
TargetAgent-->>TestRunner: Target Agent Response
40+
41+
TestRunner->>TesterAgent: Start Conversation
42+
TesterAgent-->>TestRunner: Tester Agent Response
43+
44+
TestRunner->>TesterAgent: Send Target Agent's Response
45+
TesterAgent-->>TestRunner: Tester Agent's next turn
46+
47+
loop Conversation Steps
48+
TestRunner->>TargetAgent: Send Tester Agent's turn
49+
TargetAgent-->>TestRunner: Target Agent Response
50+
TestRunner->>TesterAgent: Send Target Agent's Response
51+
TesterAgent-->>TestRunner: Tester Agent's next turn
52+
end
53+
```
267 KB
Loading
344 KB
Loading

docs/docs/static/conversationsuite.json

Lines changed: 95 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,18 @@
33
"$id": "https://github.com/xavidop/voiceflow-cli/internal/types/tests/suite",
44
"$ref": "#/$defs/Suite",
55
"$defs": {
6+
"OpenAIConfig": {
7+
"properties": {
8+
"model": {
9+
"type": "string"
10+
},
11+
"temperature": {
12+
"type": "number"
13+
}
14+
},
15+
"additionalProperties": false,
16+
"type": "object"
17+
},
618
"Suite": {
719
"properties": {
820
"name": {
@@ -19,6 +31,9 @@
1931
"$ref": "#/$defs/TestFile"
2032
},
2133
"type": "array"
34+
},
35+
"openAIConfig": {
36+
"$ref": "#/$defs/OpenAIConfig"
2237
}
2338
},
2439
"additionalProperties": false,
@@ -64,6 +79,38 @@
6479
"validate"
6580
]
6681
},
82+
"AgentTest": {
83+
"properties": {
84+
"goal": {
85+
"type": "string"
86+
},
87+
"persona": {
88+
"type": "string"
89+
},
90+
"maxSteps": {
91+
"type": "integer"
92+
},
93+
"userInformation": {
94+
"items": {
95+
"$ref": "#/$defs/UserInfo"
96+
},
97+
"type": "array"
98+
},
99+
"openAIConfig": {
100+
"$ref": "#/$defs/OpenAIConfig"
101+
},
102+
"voiceflowAgentTesterConfig": {
103+
"$ref": "#/$defs/VoiceflowAgentTesterConfig"
104+
}
105+
},
106+
"additionalProperties": false,
107+
"type": "object",
108+
"required": [
109+
"goal",
110+
"persona",
111+
"maxSteps"
112+
]
113+
},
67114
"Interaction": {
68115
"properties": {
69116
"id": {
@@ -84,6 +131,18 @@
84131
"agent"
85132
]
86133
},
134+
"OpenAIConfig": {
135+
"properties": {
136+
"model": {
137+
"type": "string"
138+
},
139+
"temperature": {
140+
"type": "number"
141+
}
142+
},
143+
"additionalProperties": false,
144+
"type": "object"
145+
},
87146
"SimilarityConfig": {
88147
"properties": {
89148
"provider": {
@@ -129,14 +188,16 @@
129188
"$ref": "#/$defs/Interaction"
130189
},
131190
"type": "array"
191+
},
192+
"agent": {
193+
"$ref": "#/$defs/AgentTest"
132194
}
133195
},
134196
"additionalProperties": false,
135197
"type": "object",
136198
"required": [
137199
"name",
138-
"description",
139-
"interactions"
200+
"description"
140201
]
141202
},
142203
"User": {
@@ -154,6 +215,22 @@
154215
"type"
155216
]
156217
},
218+
"UserInfo": {
219+
"properties": {
220+
"name": {
221+
"type": "string"
222+
},
223+
"value": {
224+
"type": "string"
225+
}
226+
},
227+
"additionalProperties": false,
228+
"type": "object",
229+
"required": [
230+
"name",
231+
"value"
232+
]
233+
},
157234
"Validation": {
158235
"properties": {
159236
"id": {
@@ -198,6 +275,22 @@
198275
"required": [
199276
"name"
200277
]
278+
},
279+
"VoiceflowAgentTesterConfig": {
280+
"properties": {
281+
"environmentName": {
282+
"type": "string"
283+
},
284+
"apiKey": {
285+
"type": "string"
286+
}
287+
},
288+
"additionalProperties": false,
289+
"type": "object",
290+
"required": [
291+
"environmentName",
292+
"apiKey"
293+
]
201294
}
202295
},
203296
"items": {

docs/docs/static/conversationtest.json

Lines changed: 80 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,38 @@
1818
"validate"
1919
]
2020
},
21+
"AgentTest": {
22+
"properties": {
23+
"goal": {
24+
"type": "string"
25+
},
26+
"persona": {
27+
"type": "string"
28+
},
29+
"maxSteps": {
30+
"type": "integer"
31+
},
32+
"userInformation": {
33+
"items": {
34+
"$ref": "#/$defs/UserInfo"
35+
},
36+
"type": "array"
37+
},
38+
"openAIConfig": {
39+
"$ref": "#/$defs/OpenAIConfig"
40+
},
41+
"voiceflowAgentTesterConfig": {
42+
"$ref": "#/$defs/VoiceflowAgentTesterConfig"
43+
}
44+
},
45+
"additionalProperties": false,
46+
"type": "object",
47+
"required": [
48+
"goal",
49+
"persona",
50+
"maxSteps"
51+
]
52+
},
2153
"Interaction": {
2254
"properties": {
2355
"id": {
@@ -38,6 +70,18 @@
3870
"agent"
3971
]
4072
},
73+
"OpenAIConfig": {
74+
"properties": {
75+
"model": {
76+
"type": "string"
77+
},
78+
"temperature": {
79+
"type": "number"
80+
}
81+
},
82+
"additionalProperties": false,
83+
"type": "object"
84+
},
4185
"SimilarityConfig": {
4286
"properties": {
4387
"provider": {
@@ -83,14 +127,16 @@
83127
"$ref": "#/$defs/Interaction"
84128
},
85129
"type": "array"
130+
},
131+
"agent": {
132+
"$ref": "#/$defs/AgentTest"
86133
}
87134
},
88135
"additionalProperties": false,
89136
"type": "object",
90137
"required": [
91138
"name",
92-
"description",
93-
"interactions"
139+
"description"
94140
]
95141
},
96142
"User": {
@@ -108,6 +154,22 @@
108154
"type"
109155
]
110156
},
157+
"UserInfo": {
158+
"properties": {
159+
"name": {
160+
"type": "string"
161+
},
162+
"value": {
163+
"type": "string"
164+
}
165+
},
166+
"additionalProperties": false,
167+
"type": "object",
168+
"required": [
169+
"name",
170+
"value"
171+
]
172+
},
111173
"Validation": {
112174
"properties": {
113175
"id": {
@@ -152,6 +214,22 @@
152214
"required": [
153215
"name"
154216
]
217+
},
218+
"VoiceflowAgentTesterConfig": {
219+
"properties": {
220+
"environmentName": {
221+
"type": "string"
222+
},
223+
"apiKey": {
224+
"type": "string"
225+
}
226+
},
227+
"additionalProperties": false,
228+
"type": "object",
229+
"required": [
230+
"environmentName",
231+
"apiKey"
232+
]
155233
}
156234
},
157235
"description": "voiceflow-cli Conversation Profiler test definition file"

0 commit comments

Comments
 (0)