@cloudbase/agent-examples-langgraph-agentic-chat 0.0.2 → 0.0.6
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/CHANGELOG.md +70 -0
- package/dist/index.d.mts +22 -22
- package/dist/index.d.ts +22 -22
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
- package/src/agent.ts +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,75 @@
|
|
|
1
1
|
# @cloudbase/agent-examples-langgraph-agentic-chat
|
|
2
2
|
|
|
3
|
+
## 0.0.11-alpha.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- alpha release 0.0.10-alpha.2
|
|
8
|
+
- Update all public packages to version 0.0.10-alpha.2
|
|
9
|
+
- Trigger automated alpha release workflow
|
|
10
|
+
- Includes latest features and improvements
|
|
11
|
+
|
|
12
|
+
- Updated dependencies
|
|
13
|
+
- @cloudbase/agent-agents@0.0.11-alpha.3
|
|
14
|
+
- @cloudbase/agent-adapter-langgraph@0.0.11-alpha.3
|
|
15
|
+
|
|
16
|
+
## 0.0.11-alpha.2
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- alpha release 0.0.10-alpha.2
|
|
21
|
+
- Update all public packages to version 0.0.10-alpha.2
|
|
22
|
+
- Trigger automated alpha release workflow
|
|
23
|
+
- Includes latest features and improvements
|
|
24
|
+
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
- @cloudbase/agent-agents@0.0.11-alpha.2
|
|
27
|
+
- @cloudbase/agent-adapter-langgraph@0.0.11-alpha.2
|
|
28
|
+
|
|
29
|
+
## 0.0.11-alpha.1
|
|
30
|
+
|
|
31
|
+
### Patch Changes
|
|
32
|
+
|
|
33
|
+
- alpha release 0.0.10-alpha.2
|
|
34
|
+
- Update all public packages to version 0.0.10-alpha.2
|
|
35
|
+
- Trigger automated alpha release workflow
|
|
36
|
+
- Includes latest features and improvements
|
|
37
|
+
|
|
38
|
+
- Updated dependencies
|
|
39
|
+
- @cloudbase/agent-agents@0.0.11-alpha.1
|
|
40
|
+
- @cloudbase/agent-adapter-langgraph@0.0.11-alpha.1
|
|
41
|
+
|
|
42
|
+
## 0.0.11-alpha.0
|
|
43
|
+
|
|
44
|
+
### Patch Changes
|
|
45
|
+
|
|
46
|
+
- 97b2740: alpha release 0.0.10-alpha.2
|
|
47
|
+
- Update all public packages to version 0.0.10-alpha.2
|
|
48
|
+
- Trigger automated alpha release workflow
|
|
49
|
+
- Includes latest features and improvements
|
|
50
|
+
|
|
51
|
+
- fd4c62a: alpha release 0.0.10-alpha.2
|
|
52
|
+
- Update all public packages to version 0.0.10-alpha.2
|
|
53
|
+
- Trigger automated alpha release workflow
|
|
54
|
+
- Includes latest features and improvements
|
|
55
|
+
|
|
56
|
+
- da3388c: alpha release 0.0.10-alpha.2
|
|
57
|
+
- Update all public packages to version 0.0.10-alpha.2
|
|
58
|
+
- Trigger automated alpha release workflow
|
|
59
|
+
- Includes latest features and improvements
|
|
60
|
+
|
|
61
|
+
- alpha release 0.0.10-alpha.2
|
|
62
|
+
- Update all public packages to version 0.0.10-alpha.2
|
|
63
|
+
- Trigger automated alpha release workflow
|
|
64
|
+
- Includes latest features and improvements
|
|
65
|
+
|
|
66
|
+
- Updated dependencies [97b2740]
|
|
67
|
+
- Updated dependencies [fd4c62a]
|
|
68
|
+
- Updated dependencies [da3388c]
|
|
69
|
+
- Updated dependencies
|
|
70
|
+
- @cloudbase/agent-agents@0.0.11-alpha.0
|
|
71
|
+
- @cloudbase/agent-adapter-langgraph@0.0.11-alpha.0
|
|
72
|
+
|
|
3
73
|
## 0.0.10
|
|
4
74
|
|
|
5
75
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -6,8 +6,8 @@ import * as _langchain_core_messages from '@langchain/core/messages';
|
|
|
6
6
|
*/
|
|
7
7
|
declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
8
8
|
messages: _langchain_core_messages.BaseMessage<_langchain_core_messages.MessageStructure, _langchain_core_messages.MessageType>[];
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
client: _langchain_langgraph.StateType<{
|
|
10
|
+
tools: {
|
|
11
11
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
12
12
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
13
13
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
@@ -15,8 +15,8 @@ declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
|
15
15
|
}>;
|
|
16
16
|
}, {
|
|
17
17
|
messages?: _langchain_langgraph.Messages | undefined;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
client?: _langchain_langgraph.StateType<{
|
|
19
|
+
tools: {
|
|
20
20
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
21
21
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
22
22
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
@@ -24,34 +24,34 @@ declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
|
24
24
|
}> | undefined;
|
|
25
25
|
}, "__start__" | "chat_node", {
|
|
26
26
|
messages: _langchain_langgraph.BinaryOperatorAggregate<_langchain_core_messages.BaseMessage<_langchain_core_messages.MessageStructure, _langchain_core_messages.MessageType>[], _langchain_langgraph.Messages>;
|
|
27
|
-
|
|
27
|
+
client: {
|
|
28
28
|
(): _langchain_langgraph.LastValue<_langchain_langgraph.StateType<{
|
|
29
|
-
|
|
29
|
+
tools: {
|
|
30
30
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
31
31
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
32
32
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
33
33
|
};
|
|
34
34
|
}>>;
|
|
35
35
|
(annotation: _langchain_langgraph.SingleReducer<_langchain_langgraph.StateType<{
|
|
36
|
-
|
|
36
|
+
tools: {
|
|
37
37
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
38
38
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
39
39
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
40
40
|
};
|
|
41
41
|
}>, _langchain_langgraph.StateType<{
|
|
42
|
-
|
|
42
|
+
tools: {
|
|
43
43
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
44
44
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
45
45
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
46
46
|
};
|
|
47
47
|
}>>): _langchain_langgraph.BinaryOperatorAggregate<_langchain_langgraph.StateType<{
|
|
48
|
-
|
|
48
|
+
tools: {
|
|
49
49
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
50
50
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
51
51
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
52
52
|
};
|
|
53
53
|
}>, _langchain_langgraph.StateType<{
|
|
54
|
-
|
|
54
|
+
tools: {
|
|
55
55
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
56
56
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
57
57
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
@@ -61,34 +61,34 @@ declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
|
61
61
|
};
|
|
62
62
|
}, {
|
|
63
63
|
messages: _langchain_langgraph.BinaryOperatorAggregate<_langchain_core_messages.BaseMessage<_langchain_core_messages.MessageStructure, _langchain_core_messages.MessageType>[], _langchain_langgraph.Messages>;
|
|
64
|
-
|
|
64
|
+
client: {
|
|
65
65
|
(): _langchain_langgraph.LastValue<_langchain_langgraph.StateType<{
|
|
66
|
-
|
|
66
|
+
tools: {
|
|
67
67
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
68
68
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
69
69
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
70
70
|
};
|
|
71
71
|
}>>;
|
|
72
72
|
(annotation: _langchain_langgraph.SingleReducer<_langchain_langgraph.StateType<{
|
|
73
|
-
|
|
73
|
+
tools: {
|
|
74
74
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
75
75
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
76
76
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
77
77
|
};
|
|
78
78
|
}>, _langchain_langgraph.StateType<{
|
|
79
|
-
|
|
79
|
+
tools: {
|
|
80
80
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
81
81
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
82
82
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
83
83
|
};
|
|
84
84
|
}>>): _langchain_langgraph.BinaryOperatorAggregate<_langchain_langgraph.StateType<{
|
|
85
|
-
|
|
85
|
+
tools: {
|
|
86
86
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
87
87
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
88
88
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
89
89
|
};
|
|
90
90
|
}>, _langchain_langgraph.StateType<{
|
|
91
|
-
|
|
91
|
+
tools: {
|
|
92
92
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
93
93
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
94
94
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
@@ -99,34 +99,34 @@ declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
|
99
99
|
}, _langchain_langgraph.StateDefinition, {
|
|
100
100
|
chat_node: _langchain_langgraph.UpdateType<{
|
|
101
101
|
messages: _langchain_langgraph.BinaryOperatorAggregate<_langchain_core_messages.BaseMessage<_langchain_core_messages.MessageStructure, _langchain_core_messages.MessageType>[], _langchain_langgraph.Messages>;
|
|
102
|
-
|
|
102
|
+
client: {
|
|
103
103
|
(): _langchain_langgraph.LastValue<_langchain_langgraph.StateType<{
|
|
104
|
-
|
|
104
|
+
tools: {
|
|
105
105
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
106
106
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
107
107
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
108
108
|
};
|
|
109
109
|
}>>;
|
|
110
110
|
(annotation: _langchain_langgraph.SingleReducer<_langchain_langgraph.StateType<{
|
|
111
|
-
|
|
111
|
+
tools: {
|
|
112
112
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
113
113
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
114
114
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
115
115
|
};
|
|
116
116
|
}>, _langchain_langgraph.StateType<{
|
|
117
|
-
|
|
117
|
+
tools: {
|
|
118
118
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
119
119
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
120
120
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
121
121
|
};
|
|
122
122
|
}>>): _langchain_langgraph.BinaryOperatorAggregate<_langchain_langgraph.StateType<{
|
|
123
|
-
|
|
123
|
+
tools: {
|
|
124
124
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
125
125
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
126
126
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
127
127
|
};
|
|
128
128
|
}>, _langchain_langgraph.StateType<{
|
|
129
|
-
|
|
129
|
+
tools: {
|
|
130
130
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
131
131
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
132
132
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
package/dist/index.d.ts
CHANGED
|
@@ -6,8 +6,8 @@ import * as _langchain_core_messages from '@langchain/core/messages';
|
|
|
6
6
|
*/
|
|
7
7
|
declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
8
8
|
messages: _langchain_core_messages.BaseMessage<_langchain_core_messages.MessageStructure, _langchain_core_messages.MessageType>[];
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
client: _langchain_langgraph.StateType<{
|
|
10
|
+
tools: {
|
|
11
11
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
12
12
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
13
13
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
@@ -15,8 +15,8 @@ declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
|
15
15
|
}>;
|
|
16
16
|
}, {
|
|
17
17
|
messages?: _langchain_langgraph.Messages | undefined;
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
client?: _langchain_langgraph.StateType<{
|
|
19
|
+
tools: {
|
|
20
20
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
21
21
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
22
22
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
@@ -24,34 +24,34 @@ declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
|
24
24
|
}> | undefined;
|
|
25
25
|
}, "__start__" | "chat_node", {
|
|
26
26
|
messages: _langchain_langgraph.BinaryOperatorAggregate<_langchain_core_messages.BaseMessage<_langchain_core_messages.MessageStructure, _langchain_core_messages.MessageType>[], _langchain_langgraph.Messages>;
|
|
27
|
-
|
|
27
|
+
client: {
|
|
28
28
|
(): _langchain_langgraph.LastValue<_langchain_langgraph.StateType<{
|
|
29
|
-
|
|
29
|
+
tools: {
|
|
30
30
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
31
31
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
32
32
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
33
33
|
};
|
|
34
34
|
}>>;
|
|
35
35
|
(annotation: _langchain_langgraph.SingleReducer<_langchain_langgraph.StateType<{
|
|
36
|
-
|
|
36
|
+
tools: {
|
|
37
37
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
38
38
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
39
39
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
40
40
|
};
|
|
41
41
|
}>, _langchain_langgraph.StateType<{
|
|
42
|
-
|
|
42
|
+
tools: {
|
|
43
43
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
44
44
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
45
45
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
46
46
|
};
|
|
47
47
|
}>>): _langchain_langgraph.BinaryOperatorAggregate<_langchain_langgraph.StateType<{
|
|
48
|
-
|
|
48
|
+
tools: {
|
|
49
49
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
50
50
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
51
51
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
52
52
|
};
|
|
53
53
|
}>, _langchain_langgraph.StateType<{
|
|
54
|
-
|
|
54
|
+
tools: {
|
|
55
55
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
56
56
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
57
57
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
@@ -61,34 +61,34 @@ declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
|
61
61
|
};
|
|
62
62
|
}, {
|
|
63
63
|
messages: _langchain_langgraph.BinaryOperatorAggregate<_langchain_core_messages.BaseMessage<_langchain_core_messages.MessageStructure, _langchain_core_messages.MessageType>[], _langchain_langgraph.Messages>;
|
|
64
|
-
|
|
64
|
+
client: {
|
|
65
65
|
(): _langchain_langgraph.LastValue<_langchain_langgraph.StateType<{
|
|
66
|
-
|
|
66
|
+
tools: {
|
|
67
67
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
68
68
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
69
69
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
70
70
|
};
|
|
71
71
|
}>>;
|
|
72
72
|
(annotation: _langchain_langgraph.SingleReducer<_langchain_langgraph.StateType<{
|
|
73
|
-
|
|
73
|
+
tools: {
|
|
74
74
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
75
75
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
76
76
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
77
77
|
};
|
|
78
78
|
}>, _langchain_langgraph.StateType<{
|
|
79
|
-
|
|
79
|
+
tools: {
|
|
80
80
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
81
81
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
82
82
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
83
83
|
};
|
|
84
84
|
}>>): _langchain_langgraph.BinaryOperatorAggregate<_langchain_langgraph.StateType<{
|
|
85
|
-
|
|
85
|
+
tools: {
|
|
86
86
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
87
87
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
88
88
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
89
89
|
};
|
|
90
90
|
}>, _langchain_langgraph.StateType<{
|
|
91
|
-
|
|
91
|
+
tools: {
|
|
92
92
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
93
93
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
94
94
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
@@ -99,34 +99,34 @@ declare const agenticChatGraph: _langchain_langgraph.CompiledStateGraph<{
|
|
|
99
99
|
}, _langchain_langgraph.StateDefinition, {
|
|
100
100
|
chat_node: _langchain_langgraph.UpdateType<{
|
|
101
101
|
messages: _langchain_langgraph.BinaryOperatorAggregate<_langchain_core_messages.BaseMessage<_langchain_core_messages.MessageStructure, _langchain_core_messages.MessageType>[], _langchain_langgraph.Messages>;
|
|
102
|
-
|
|
102
|
+
client: {
|
|
103
103
|
(): _langchain_langgraph.LastValue<_langchain_langgraph.StateType<{
|
|
104
|
-
|
|
104
|
+
tools: {
|
|
105
105
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
106
106
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
107
107
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
108
108
|
};
|
|
109
109
|
}>>;
|
|
110
110
|
(annotation: _langchain_langgraph.SingleReducer<_langchain_langgraph.StateType<{
|
|
111
|
-
|
|
111
|
+
tools: {
|
|
112
112
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
113
113
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
114
114
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
115
115
|
};
|
|
116
116
|
}>, _langchain_langgraph.StateType<{
|
|
117
|
-
|
|
117
|
+
tools: {
|
|
118
118
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
119
119
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
120
120
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
121
121
|
};
|
|
122
122
|
}>>): _langchain_langgraph.BinaryOperatorAggregate<_langchain_langgraph.StateType<{
|
|
123
|
-
|
|
123
|
+
tools: {
|
|
124
124
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
125
125
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
126
126
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
|
127
127
|
};
|
|
128
128
|
}>, _langchain_langgraph.StateType<{
|
|
129
|
-
|
|
129
|
+
tools: {
|
|
130
130
|
(): _langchain_langgraph.LastValue<any[]>;
|
|
131
131
|
(annotation: _langchain_langgraph.SingleReducer<any[], any[]>): _langchain_langgraph.BinaryOperatorAggregate<any[], any[]>;
|
|
132
132
|
Root: <S extends _langchain_langgraph.StateDefinition>(sd: S) => _langchain_langgraph.AnnotationRoot<S>;
|
package/dist/index.js
CHANGED
|
@@ -41,7 +41,7 @@ async function chatNode(state, config) {
|
|
|
41
41
|
if (!config) {
|
|
42
42
|
config = { recursionLimit: 25 };
|
|
43
43
|
}
|
|
44
|
-
const modelWithTools = model.bindTools([...state.
|
|
44
|
+
const modelWithTools = model.bindTools([...state.client?.tools || []], {
|
|
45
45
|
parallel_tool_calls: false
|
|
46
46
|
});
|
|
47
47
|
const systemMessage = new import_messages.SystemMessage({
|
|
@@ -58,7 +58,7 @@ async function chatNode(state, config) {
|
|
|
58
58
|
}
|
|
59
59
|
});
|
|
60
60
|
}
|
|
61
|
-
var workflow = new import_langgraph.StateGraph(import_agent_adapter_langgraph.
|
|
61
|
+
var workflow = new import_langgraph.StateGraph(import_agent_adapter_langgraph.ClientStateAnnotation).addNode("chat_node", chatNode).addEdge(import_langgraph.START, "chat_node").addEdge("chat_node", import_langgraph.END);
|
|
62
62
|
var agenticChatGraph = workflow.compile({
|
|
63
63
|
checkpointer: new import_langgraph2.MemorySaver()
|
|
64
64
|
});
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/agent.ts"],"sourcesContent":["export * from \"./agent\";\n","/**\n * A simple agentic chat flow using LangGraph instead of CrewAI.\n */\n\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { SystemMessage } from \"@langchain/core/messages\";\nimport { RunnableConfig } from \"@langchain/core/runnables\";\nimport { StateGraph, Command, START, END } from \"@langchain/langgraph\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/agent.ts"],"sourcesContent":["export * from \"./agent\";\n","/**\n * A simple agentic chat flow using LangGraph instead of CrewAI.\n */\n\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { SystemMessage } from \"@langchain/core/messages\";\nimport { RunnableConfig } from \"@langchain/core/runnables\";\nimport { StateGraph, Command, START, END } from \"@langchain/langgraph\";\n\nimport { ClientStateAnnotation, ClientState } from \"@cloudbase/agent-adapter-langgraph\";\nimport { MemorySaver } from \"@langchain/langgraph\";\n\nasync function chatNode(state: ClientState, config?: RunnableConfig) {\n const model = new ChatOpenAI({\n model: process.env.OPENAI_MODEL || \"gpt-4o-mini\",\n apiKey: process.env.OPENAI_API_KEY,\n configuration: {\n baseURL: process.env.OPENAI_BASE_URL,\n },\n });\n\n if (!config) {\n config = { recursionLimit: 25 };\n }\n\n const modelWithTools = model.bindTools([...(state.client?.tools || [])], {\n parallel_tool_calls: false,\n });\n\n const systemMessage = new SystemMessage({\n content: \"You are a helpful assistant.\",\n });\n\n const response = await modelWithTools.invoke(\n [systemMessage, ...state.messages],\n config\n );\n\n return new Command({\n goto: END,\n update: {\n messages: [response],\n },\n });\n}\n\nconst workflow = new StateGraph(ClientStateAnnotation)\n .addNode(\"chat_node\", chatNode)\n .addEdge(START, \"chat_node\")\n .addEdge(\"chat_node\", END);\n\nexport const agenticChatGraph = workflow.compile({\n checkpointer: new MemorySaver(),\n});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACIA,oBAA2B;AAC3B,sBAA8B;AAE9B,uBAAgD;AAEhD,qCAAmD;AACnD,IAAAA,oBAA4B;AAE5B,eAAe,SAAS,OAAoB,QAAyB;AACnE,QAAM,QAAQ,IAAI,yBAAW;AAAA,IAC3B,OAAO,QAAQ,IAAI,gBAAgB;AAAA,IACnC,QAAQ,QAAQ,IAAI;AAAA,IACpB,eAAe;AAAA,MACb,SAAS,QAAQ,IAAI;AAAA,IACvB;AAAA,EACF,CAAC;AAED,MAAI,CAAC,QAAQ;AACX,aAAS,EAAE,gBAAgB,GAAG;AAAA,EAChC;AAEA,QAAM,iBAAiB,MAAM,UAAU,CAAC,GAAI,MAAM,QAAQ,SAAS,CAAC,CAAE,GAAG;AAAA,IACvE,qBAAqB;AAAA,EACvB,CAAC;AAED,QAAM,gBAAgB,IAAI,8BAAc;AAAA,IACtC,SAAS;AAAA,EACX,CAAC;AAED,QAAM,WAAW,MAAM,eAAe;AAAA,IACpC,CAAC,eAAe,GAAG,MAAM,QAAQ;AAAA,IACjC;AAAA,EACF;AAEA,SAAO,IAAI,yBAAQ;AAAA,IACjB,MAAM;AAAA,IACN,QAAQ;AAAA,MACN,UAAU,CAAC,QAAQ;AAAA,IACrB;AAAA,EACF,CAAC;AACH;AAEA,IAAM,WAAW,IAAI,4BAAW,oDAAqB,EAClD,QAAQ,aAAa,QAAQ,EAC7B,QAAQ,wBAAO,WAAW,EAC1B,QAAQ,aAAa,oBAAG;AAEpB,IAAM,mBAAmB,SAAS,QAAQ;AAAA,EAC/C,cAAc,IAAI,8BAAY;AAChC,CAAC;","names":["import_langgraph"]}
|
package/dist/index.mjs
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { ChatOpenAI } from "@langchain/openai";
|
|
3
3
|
import { SystemMessage } from "@langchain/core/messages";
|
|
4
4
|
import { StateGraph, Command, START, END } from "@langchain/langgraph";
|
|
5
|
-
import {
|
|
5
|
+
import { ClientStateAnnotation } from "@cloudbase/agent-adapter-langgraph";
|
|
6
6
|
import { MemorySaver } from "@langchain/langgraph";
|
|
7
7
|
async function chatNode(state, config) {
|
|
8
8
|
const model = new ChatOpenAI({
|
|
@@ -15,7 +15,7 @@ async function chatNode(state, config) {
|
|
|
15
15
|
if (!config) {
|
|
16
16
|
config = { recursionLimit: 25 };
|
|
17
17
|
}
|
|
18
|
-
const modelWithTools = model.bindTools([...state.
|
|
18
|
+
const modelWithTools = model.bindTools([...state.client?.tools || []], {
|
|
19
19
|
parallel_tool_calls: false
|
|
20
20
|
});
|
|
21
21
|
const systemMessage = new SystemMessage({
|
|
@@ -32,7 +32,7 @@ async function chatNode(state, config) {
|
|
|
32
32
|
}
|
|
33
33
|
});
|
|
34
34
|
}
|
|
35
|
-
var workflow = new StateGraph(
|
|
35
|
+
var workflow = new StateGraph(ClientStateAnnotation).addNode("chat_node", chatNode).addEdge(START, "chat_node").addEdge("chat_node", END);
|
|
36
36
|
var agenticChatGraph = workflow.compile({
|
|
37
37
|
checkpointer: new MemorySaver()
|
|
38
38
|
});
|
package/dist/index.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/agent.ts"],"sourcesContent":["/**\n * A simple agentic chat flow using LangGraph instead of CrewAI.\n */\n\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { SystemMessage } from \"@langchain/core/messages\";\nimport { RunnableConfig } from \"@langchain/core/runnables\";\nimport { StateGraph, Command, START, END } from \"@langchain/langgraph\";\n\nimport {
|
|
1
|
+
{"version":3,"sources":["../src/agent.ts"],"sourcesContent":["/**\n * A simple agentic chat flow using LangGraph instead of CrewAI.\n */\n\nimport { ChatOpenAI } from \"@langchain/openai\";\nimport { SystemMessage } from \"@langchain/core/messages\";\nimport { RunnableConfig } from \"@langchain/core/runnables\";\nimport { StateGraph, Command, START, END } from \"@langchain/langgraph\";\n\nimport { ClientStateAnnotation, ClientState } from \"@cloudbase/agent-adapter-langgraph\";\nimport { MemorySaver } from \"@langchain/langgraph\";\n\nasync function chatNode(state: ClientState, config?: RunnableConfig) {\n const model = new ChatOpenAI({\n model: process.env.OPENAI_MODEL || \"gpt-4o-mini\",\n apiKey: process.env.OPENAI_API_KEY,\n configuration: {\n baseURL: process.env.OPENAI_BASE_URL,\n },\n });\n\n if (!config) {\n config = { recursionLimit: 25 };\n }\n\n const modelWithTools = model.bindTools([...(state.client?.tools || [])], {\n parallel_tool_calls: false,\n });\n\n const systemMessage = new SystemMessage({\n content: \"You are a helpful assistant.\",\n });\n\n const response = await modelWithTools.invoke(\n [systemMessage, ...state.messages],\n config\n );\n\n return new Command({\n goto: END,\n update: {\n messages: [response],\n },\n });\n}\n\nconst workflow = new StateGraph(ClientStateAnnotation)\n .addNode(\"chat_node\", chatNode)\n .addEdge(START, \"chat_node\")\n .addEdge(\"chat_node\", END);\n\nexport const agenticChatGraph = workflow.compile({\n checkpointer: new MemorySaver(),\n});\n"],"mappings":";AAIA,SAAS,kBAAkB;AAC3B,SAAS,qBAAqB;AAE9B,SAAS,YAAY,SAAS,OAAO,WAAW;AAEhD,SAAS,6BAA0C;AACnD,SAAS,mBAAmB;AAE5B,eAAe,SAAS,OAAoB,QAAyB;AACnE,QAAM,QAAQ,IAAI,WAAW;AAAA,IAC3B,OAAO,QAAQ,IAAI,gBAAgB;AAAA,IACnC,QAAQ,QAAQ,IAAI;AAAA,IACpB,eAAe;AAAA,MACb,SAAS,QAAQ,IAAI;AAAA,IACvB;AAAA,EACF,CAAC;AAED,MAAI,CAAC,QAAQ;AACX,aAAS,EAAE,gBAAgB,GAAG;AAAA,EAChC;AAEA,QAAM,iBAAiB,MAAM,UAAU,CAAC,GAAI,MAAM,QAAQ,SAAS,CAAC,CAAE,GAAG;AAAA,IACvE,qBAAqB;AAAA,EACvB,CAAC;AAED,QAAM,gBAAgB,IAAI,cAAc;AAAA,IACtC,SAAS;AAAA,EACX,CAAC;AAED,QAAM,WAAW,MAAM,eAAe;AAAA,IACpC,CAAC,eAAe,GAAG,MAAM,QAAQ;AAAA,IACjC;AAAA,EACF;AAEA,SAAO,IAAI,QAAQ;AAAA,IACjB,MAAM;AAAA,IACN,QAAQ;AAAA,MACN,UAAU,CAAC,QAAQ;AAAA,IACrB;AAAA,EACF,CAAC;AACH;AAEA,IAAM,WAAW,IAAI,WAAW,qBAAqB,EAClD,QAAQ,aAAa,QAAQ,EAC7B,QAAQ,OAAO,WAAW,EAC1B,QAAQ,aAAa,GAAG;AAEpB,IAAM,mBAAmB,SAAS,QAAQ;AAAA,EAC/C,cAAc,IAAI,YAAY;AAChC,CAAC;","names":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/agent-examples-langgraph-agentic-chat",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"keywords": [],
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"@langchain/core": "^1.0.2",
|
|
11
11
|
"@langchain/langgraph": "^1.0.1",
|
|
12
12
|
"@langchain/openai": "^1.0.0",
|
|
13
|
-
"@cloudbase/agent-agents": "^0.0.
|
|
14
|
-
"@cloudbase/agent-adapter-langgraph": "^0.0.
|
|
13
|
+
"@cloudbase/agent-agents": "^0.0.6",
|
|
14
|
+
"@cloudbase/agent-adapter-langgraph": "^0.0.6"
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"tsup": "^8.5.0"
|
package/src/agent.ts
CHANGED
|
@@ -7,10 +7,10 @@ import { SystemMessage } from "@langchain/core/messages";
|
|
|
7
7
|
import { RunnableConfig } from "@langchain/core/runnables";
|
|
8
8
|
import { StateGraph, Command, START, END } from "@langchain/langgraph";
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { ClientStateAnnotation, ClientState } from "@cloudbase/agent-adapter-langgraph";
|
|
11
11
|
import { MemorySaver } from "@langchain/langgraph";
|
|
12
12
|
|
|
13
|
-
async function chatNode(state:
|
|
13
|
+
async function chatNode(state: ClientState, config?: RunnableConfig) {
|
|
14
14
|
const model = new ChatOpenAI({
|
|
15
15
|
model: process.env.OPENAI_MODEL || "gpt-4o-mini",
|
|
16
16
|
apiKey: process.env.OPENAI_API_KEY,
|
|
@@ -23,7 +23,7 @@ async function chatNode(state: AGKitState, config?: RunnableConfig) {
|
|
|
23
23
|
config = { recursionLimit: 25 };
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
const modelWithTools = model.bindTools([...(state.
|
|
26
|
+
const modelWithTools = model.bindTools([...(state.client?.tools || [])], {
|
|
27
27
|
parallel_tool_calls: false,
|
|
28
28
|
});
|
|
29
29
|
|
|
@@ -44,7 +44,7 @@ async function chatNode(state: AGKitState, config?: RunnableConfig) {
|
|
|
44
44
|
});
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
const workflow = new StateGraph(
|
|
47
|
+
const workflow = new StateGraph(ClientStateAnnotation)
|
|
48
48
|
.addNode("chat_node", chatNode)
|
|
49
49
|
.addEdge(START, "chat_node")
|
|
50
50
|
.addEdge("chat_node", END);
|