@aigne/example-workflow-handoff 1.11.6 → 1.11.9
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/package.json +6 -6
- package/usages.ts +4 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aigne/example-workflow-handoff",
|
|
3
|
-
"version": "1.11.
|
|
3
|
+
"version": "1.11.9",
|
|
4
4
|
"description": "A demonstration of using AIGNE Framework to build a handoff workflow",
|
|
5
5
|
"author": "Arcblock <blocklet@arcblock.io> https://github.com/blocklet",
|
|
6
6
|
"homepage": "https://github.com/AIGNE-io/aigne-framework/tree/main/examples/workflow-handoff",
|
|
@@ -17,14 +17,14 @@
|
|
|
17
17
|
],
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"zod": "^3.24.4",
|
|
20
|
-
"@aigne/
|
|
21
|
-
"@aigne/
|
|
22
|
-
"@aigne/
|
|
23
|
-
"@aigne/
|
|
20
|
+
"@aigne/agent-library": "^1.13.2",
|
|
21
|
+
"@aigne/cli": "^1.11.9",
|
|
22
|
+
"@aigne/openai": "^0.3.2",
|
|
23
|
+
"@aigne/core": "^1.20.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/bun": "^1.2.9",
|
|
27
|
-
"@aigne/test-utils": "^0.
|
|
27
|
+
"@aigne/test-utils": "^0.4.2"
|
|
28
28
|
},
|
|
29
29
|
"scripts": {
|
|
30
30
|
"start": "bun run index.ts",
|
package/usages.ts
CHANGED
|
@@ -18,26 +18,28 @@ const agentA = AIAgent.from({
|
|
|
18
18
|
instructions: "You are a helpful agent.",
|
|
19
19
|
outputKey: "A",
|
|
20
20
|
skills: [transferToB],
|
|
21
|
+
inputKey: "message",
|
|
21
22
|
});
|
|
22
23
|
|
|
23
24
|
const agentB = AIAgent.from({
|
|
24
25
|
name: "AgentB",
|
|
25
26
|
instructions: "Only speak in Haikus.",
|
|
26
27
|
outputKey: "B",
|
|
28
|
+
inputKey: "message",
|
|
27
29
|
});
|
|
28
30
|
|
|
29
31
|
const aigne = new AIGNE({ model });
|
|
30
32
|
|
|
31
33
|
const userAgent = aigne.invoke(agentA);
|
|
32
34
|
|
|
33
|
-
const result1 = await userAgent.invoke("transfer to agent b");
|
|
35
|
+
const result1 = await userAgent.invoke({ message: "transfer to agent b" });
|
|
34
36
|
console.log(result1);
|
|
35
37
|
// Output:
|
|
36
38
|
// {
|
|
37
39
|
// B: "Transfer now complete, \nAgent B is here to help. \nWhat do you need, friend?",
|
|
38
40
|
// }
|
|
39
41
|
|
|
40
|
-
const result2 = await userAgent.invoke("It's a beautiful day");
|
|
42
|
+
const result2 = await userAgent.invoke({ message: "It's a beautiful day" });
|
|
41
43
|
console.log(result2);
|
|
42
44
|
// Output:
|
|
43
45
|
// {
|