agentnet 0.0.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/LICENSE.txt +202 -0
- package/README.md +488 -0
- package/package.json +23 -0
- package/src/agent/agent-loader.js +274 -0
- package/src/agent/agent.js +416 -0
- package/src/agent/client.js +14 -0
- package/src/agent/executor.js +320 -0
- package/src/agent/runtime.js +142 -0
- package/src/agent/runtimes/nats.js +379 -0
- package/src/errors/index.js +195 -0
- package/src/examples/agents-smartness.yaml +308 -0
- package/src/examples/agents.yaml +394 -0
- package/src/examples/def.js +74 -0
- package/src/examples/def2.js +65 -0
- package/src/examples/def3.js +67 -0
- package/src/examples/simple.js +103 -0
- package/src/index.js +115 -0
- package/src/llm/gemini.js +155 -0
- package/src/llm/gpt.js +155 -0
- package/src/store/store.js +167 -0
- package/src/utils/logger.js +209 -0
- package/src/utils/store.js +212 -0
- package/src/utils/validation.js +287 -0
|
@@ -0,0 +1,308 @@
|
|
|
1
|
+
---
|
|
2
|
+
apiVersion: smartagent.io/v1alpha1
|
|
3
|
+
kind: AgentDefinition
|
|
4
|
+
metadata:
|
|
5
|
+
name: smartnessAgent
|
|
6
|
+
namespace: smartchat
|
|
7
|
+
spec:
|
|
8
|
+
io:
|
|
9
|
+
- type: NatsIO
|
|
10
|
+
bindings:
|
|
11
|
+
discoveryTopic: smartness.discovery
|
|
12
|
+
doHandoffsTo:
|
|
13
|
+
- "smartness.accomodation.*"
|
|
14
|
+
store:
|
|
15
|
+
type: Postgres
|
|
16
|
+
llm:
|
|
17
|
+
provider: Gemini
|
|
18
|
+
model: gemini-2.0-flash
|
|
19
|
+
systemInstruction: |
|
|
20
|
+
You are a highly advanced triage agent.
|
|
21
|
+
Prioritize clarity and helpfulness.
|
|
22
|
+
Use tools effectively to gather information.
|
|
23
|
+
config:
|
|
24
|
+
temperature: 0.5
|
|
25
|
+
toolConfig:
|
|
26
|
+
functionCallingConfig:
|
|
27
|
+
mode: 'auto'
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
apiVersion: smartagent.io/v1alpha1
|
|
32
|
+
kind: AgentDefinition
|
|
33
|
+
metadata:
|
|
34
|
+
name: accomodationAgent
|
|
35
|
+
namespace: smartchat
|
|
36
|
+
spec:
|
|
37
|
+
io:
|
|
38
|
+
- type: NatsIO
|
|
39
|
+
bindings:
|
|
40
|
+
discoveryTopic: smartness.discovery
|
|
41
|
+
doHandoffsTo:
|
|
42
|
+
- "smartness.accomodation.*"
|
|
43
|
+
store:
|
|
44
|
+
type: Postgres
|
|
45
|
+
|
|
46
|
+
llm:
|
|
47
|
+
provider: Gemini
|
|
48
|
+
model: gemini-2.0-flash
|
|
49
|
+
systemInstruction: |
|
|
50
|
+
You are a highly advanced accomodation manager agent.
|
|
51
|
+
Prioritize clarity and helpfulness.
|
|
52
|
+
Use tools effectively to gather information.
|
|
53
|
+
config:
|
|
54
|
+
temperature: 0.5
|
|
55
|
+
toolConfig:
|
|
56
|
+
functionCallingConfig:
|
|
57
|
+
mode: 'auto'
|
|
58
|
+
|
|
59
|
+
tools:
|
|
60
|
+
- name: getRoomsListTool
|
|
61
|
+
description: Retrieves a list of available rooms based on criteria.
|
|
62
|
+
parameters:
|
|
63
|
+
type: object
|
|
64
|
+
properties:
|
|
65
|
+
checkinDate:
|
|
66
|
+
type: string
|
|
67
|
+
description: The check-in date.
|
|
68
|
+
checkoutDate:
|
|
69
|
+
type: string
|
|
70
|
+
description: The check-out date.
|
|
71
|
+
guests:
|
|
72
|
+
type: integer
|
|
73
|
+
description: Number of guests.
|
|
74
|
+
required:
|
|
75
|
+
- checkinDate
|
|
76
|
+
- checkoutDate
|
|
77
|
+
|
|
78
|
+
- name: getRoomDetailTool
|
|
79
|
+
description: Retrieves detailed information about a specific room.
|
|
80
|
+
parameters:
|
|
81
|
+
type: object
|
|
82
|
+
properties:
|
|
83
|
+
roomName:
|
|
84
|
+
type: string
|
|
85
|
+
description: The name of the room.
|
|
86
|
+
required:
|
|
87
|
+
- roomName
|
|
88
|
+
|
|
89
|
+
discoverySchemas:
|
|
90
|
+
- name: accomodation_agent_query
|
|
91
|
+
description: Get information about the accomodation, like list rooms and get details about a specific room. Also can give rooms availability for a specific date range and number of guests.
|
|
92
|
+
parameters:
|
|
93
|
+
type: object
|
|
94
|
+
properties:
|
|
95
|
+
question:
|
|
96
|
+
type: string
|
|
97
|
+
description: The question to be answered.
|
|
98
|
+
required:
|
|
99
|
+
- question
|
|
100
|
+
|
|
101
|
+
---
|
|
102
|
+
apiVersion: smartagent.io/v1alpha1
|
|
103
|
+
kind: AgentDefinition
|
|
104
|
+
metadata:
|
|
105
|
+
name: hotelReviewAgent
|
|
106
|
+
namespace: smartchat
|
|
107
|
+
spec:
|
|
108
|
+
io:
|
|
109
|
+
- type: NatsIO
|
|
110
|
+
bindings:
|
|
111
|
+
discoveryTopic: smartness.discovery
|
|
112
|
+
doHandoffsTo:
|
|
113
|
+
- "smartness.accomodation.*"
|
|
114
|
+
store:
|
|
115
|
+
type: Postgres
|
|
116
|
+
|
|
117
|
+
llm:
|
|
118
|
+
provider: Gemini
|
|
119
|
+
model: gemini-2.0-flash
|
|
120
|
+
systemInstruction: |
|
|
121
|
+
You are a highly advanced hotel review agent.
|
|
122
|
+
Prioritize clarity and helpfulness.
|
|
123
|
+
Use tools effectively to gather information.
|
|
124
|
+
config:
|
|
125
|
+
temperature: 0.5
|
|
126
|
+
toolConfig:
|
|
127
|
+
functionCallingConfig:
|
|
128
|
+
mode: 'auto'
|
|
129
|
+
|
|
130
|
+
tools:
|
|
131
|
+
- name: getHotelReviewsTool
|
|
132
|
+
description: Get a review of a specific hotel.
|
|
133
|
+
parameters:
|
|
134
|
+
type: object
|
|
135
|
+
properties:
|
|
136
|
+
hotelName:
|
|
137
|
+
type: string
|
|
138
|
+
description: The name of the hotel.
|
|
139
|
+
required:
|
|
140
|
+
- hotelName
|
|
141
|
+
|
|
142
|
+
discoverySchemas:
|
|
143
|
+
- name: hotel_review_agent_query
|
|
144
|
+
description: Perform a hotel review.
|
|
145
|
+
parameters:
|
|
146
|
+
type: object
|
|
147
|
+
properties:
|
|
148
|
+
hotelName:
|
|
149
|
+
type: string
|
|
150
|
+
description: The name of the hotel.
|
|
151
|
+
required:
|
|
152
|
+
- hotelName
|
|
153
|
+
|
|
154
|
+
---
|
|
155
|
+
apiVersion: smartagent.io/v1alpha1
|
|
156
|
+
kind: AgentDefinition
|
|
157
|
+
metadata:
|
|
158
|
+
name: bookingAgent
|
|
159
|
+
namespace: smartchat
|
|
160
|
+
spec:
|
|
161
|
+
io:
|
|
162
|
+
- type: NatsIO
|
|
163
|
+
bindings:
|
|
164
|
+
discoveryTopic: smartness.discovery
|
|
165
|
+
doHandoffsTo:
|
|
166
|
+
- "smartness.accomodation.*"
|
|
167
|
+
store:
|
|
168
|
+
type: Postgres
|
|
169
|
+
|
|
170
|
+
llm:
|
|
171
|
+
provider: Gemini
|
|
172
|
+
model: gemini-2.0-flash
|
|
173
|
+
systemInstruction: |
|
|
174
|
+
You are a highly advanced booking agent.
|
|
175
|
+
Prioritize clarity and helpfulness.
|
|
176
|
+
Use tools effectively to gather information.
|
|
177
|
+
config:
|
|
178
|
+
temperature: 0.5
|
|
179
|
+
toolConfig:
|
|
180
|
+
functionCallingConfig:
|
|
181
|
+
mode: 'auto'
|
|
182
|
+
|
|
183
|
+
tools:
|
|
184
|
+
- name: bookRoomTool
|
|
185
|
+
description: Book a room to a specific hotel and room.
|
|
186
|
+
parameters:
|
|
187
|
+
type: object
|
|
188
|
+
properties:
|
|
189
|
+
hotelName:
|
|
190
|
+
type: string
|
|
191
|
+
description: The name of the hotel.
|
|
192
|
+
roomName:
|
|
193
|
+
type: string
|
|
194
|
+
description: The name of the room.
|
|
195
|
+
checkinDate:
|
|
196
|
+
type: string
|
|
197
|
+
description: The check-in date.
|
|
198
|
+
checkoutDate:
|
|
199
|
+
type: string
|
|
200
|
+
description: The check-out date.
|
|
201
|
+
required:
|
|
202
|
+
- hotelName
|
|
203
|
+
|
|
204
|
+
discoverySchemas:
|
|
205
|
+
- name: booking_agent_query
|
|
206
|
+
description: Perform a booking to a specific hotel and room.
|
|
207
|
+
parameters:
|
|
208
|
+
type: object
|
|
209
|
+
properties:
|
|
210
|
+
hotelName:
|
|
211
|
+
type: string
|
|
212
|
+
description: The name of the hotel.
|
|
213
|
+
roomName:
|
|
214
|
+
type: string
|
|
215
|
+
description: The name of the room.
|
|
216
|
+
checkinDate:
|
|
217
|
+
type: string
|
|
218
|
+
description: The check-in date.
|
|
219
|
+
checkoutDate:
|
|
220
|
+
type: string
|
|
221
|
+
description: The check-out date.
|
|
222
|
+
required:
|
|
223
|
+
- hotelName
|
|
224
|
+
- roomName
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
apiVersion: smartagent.io/v1alpha1
|
|
228
|
+
kind: AgentDefinition
|
|
229
|
+
metadata:
|
|
230
|
+
name: pricingAgent
|
|
231
|
+
namespace: smartchat
|
|
232
|
+
spec:
|
|
233
|
+
io:
|
|
234
|
+
- type: NatsIO
|
|
235
|
+
bindings:
|
|
236
|
+
discoveryTopic: smartness.discovery
|
|
237
|
+
doHandoffsTo:
|
|
238
|
+
- "smartness.accomodation.*"
|
|
239
|
+
store:
|
|
240
|
+
type: Postgres
|
|
241
|
+
|
|
242
|
+
llm:
|
|
243
|
+
provider: Gemini
|
|
244
|
+
model: gemini-2.0-flash
|
|
245
|
+
systemInstruction: |
|
|
246
|
+
You are a highly advanced pricing agent.
|
|
247
|
+
Prioritize clarity and helpfulness.
|
|
248
|
+
Use tools effectively to gather information.
|
|
249
|
+
config:
|
|
250
|
+
temperature: 0.5
|
|
251
|
+
toolConfig:
|
|
252
|
+
functionCallingConfig:
|
|
253
|
+
mode: 'auto'
|
|
254
|
+
|
|
255
|
+
tools:
|
|
256
|
+
- name: getPricingTool
|
|
257
|
+
description: Get the pricing for a specific room.
|
|
258
|
+
parameters:
|
|
259
|
+
type: object
|
|
260
|
+
properties:
|
|
261
|
+
hotelName:
|
|
262
|
+
type: string
|
|
263
|
+
description: The name of the hotel.
|
|
264
|
+
roomName:
|
|
265
|
+
type: string
|
|
266
|
+
description: The name of the room.
|
|
267
|
+
checkinDate:
|
|
268
|
+
type: string
|
|
269
|
+
description: The check-in date.
|
|
270
|
+
checkoutDate:
|
|
271
|
+
type: string
|
|
272
|
+
description: The check-out date.
|
|
273
|
+
guests:
|
|
274
|
+
type: integer
|
|
275
|
+
description: Number of guests.
|
|
276
|
+
required:
|
|
277
|
+
- hotelName
|
|
278
|
+
- roomName
|
|
279
|
+
- checkinDate
|
|
280
|
+
- checkoutDate
|
|
281
|
+
|
|
282
|
+
discoverySchemas:
|
|
283
|
+
- name: pricing_agent_query
|
|
284
|
+
description: Get the pricing for a specific room.
|
|
285
|
+
parameters:
|
|
286
|
+
type: object
|
|
287
|
+
properties:
|
|
288
|
+
hotelName:
|
|
289
|
+
type: string
|
|
290
|
+
description: The name of the hotel.
|
|
291
|
+
roomName:
|
|
292
|
+
type: string
|
|
293
|
+
description: The name of the room.
|
|
294
|
+
checkinDate:
|
|
295
|
+
type: string
|
|
296
|
+
description: The check-in date.
|
|
297
|
+
checkoutDate:
|
|
298
|
+
type: string
|
|
299
|
+
description: The check-out date.
|
|
300
|
+
guests:
|
|
301
|
+
type: integer
|
|
302
|
+
description: Number of guests.
|
|
303
|
+
required:
|
|
304
|
+
- hotelName
|
|
305
|
+
- roomName
|
|
306
|
+
- checkinDate
|
|
307
|
+
- checkoutDate
|
|
308
|
+
- guests
|
|
@@ -0,0 +1,394 @@
|
|
|
1
|
+
---
|
|
2
|
+
apiVersion: smartagent.io/v1alpha1
|
|
3
|
+
kind: AgentDefinition
|
|
4
|
+
metadata:
|
|
5
|
+
name: advancedTravelAgent
|
|
6
|
+
namespace: smartchat
|
|
7
|
+
spec:
|
|
8
|
+
io:
|
|
9
|
+
- type: NatsIO
|
|
10
|
+
config:
|
|
11
|
+
servers:
|
|
12
|
+
- nats://localhost:4222
|
|
13
|
+
bindings:
|
|
14
|
+
discoveryTopic: smartness.discovery
|
|
15
|
+
doHandoffsTo:
|
|
16
|
+
- "location.weather.*"
|
|
17
|
+
|
|
18
|
+
llm:
|
|
19
|
+
provider: Gemini
|
|
20
|
+
model: gemini-2.0-flash
|
|
21
|
+
systemInstruction: |
|
|
22
|
+
You are a highly advanced travel concierge.
|
|
23
|
+
Prioritize clarity and helpfulness.
|
|
24
|
+
Use tools effectively to gather information.
|
|
25
|
+
config:
|
|
26
|
+
temperature: 0.5
|
|
27
|
+
toolConfig:
|
|
28
|
+
functionCallingConfig:
|
|
29
|
+
mode: 'auto'
|
|
30
|
+
|
|
31
|
+
tools:
|
|
32
|
+
- name: flightSearchTool
|
|
33
|
+
description: Searches for available flights based on criteria.
|
|
34
|
+
parameters:
|
|
35
|
+
type: object
|
|
36
|
+
properties:
|
|
37
|
+
origin:
|
|
38
|
+
type: string
|
|
39
|
+
description: The origin city.
|
|
40
|
+
destination:
|
|
41
|
+
type: string
|
|
42
|
+
description: The destination city.
|
|
43
|
+
required:
|
|
44
|
+
- origin
|
|
45
|
+
- destination
|
|
46
|
+
|
|
47
|
+
- name: hotelBookingTool
|
|
48
|
+
description: Books a hotel room.
|
|
49
|
+
parameters:
|
|
50
|
+
type: object
|
|
51
|
+
properties:
|
|
52
|
+
checkin:
|
|
53
|
+
type: string
|
|
54
|
+
description: The check-in date.
|
|
55
|
+
required:
|
|
56
|
+
- checkin
|
|
57
|
+
|
|
58
|
+
---
|
|
59
|
+
apiVersion: smartagent.io/v1alpha1
|
|
60
|
+
kind: AgentDefinition
|
|
61
|
+
metadata:
|
|
62
|
+
name: weatherAgent
|
|
63
|
+
namespace: smartchat
|
|
64
|
+
spec:
|
|
65
|
+
io:
|
|
66
|
+
- type: NatsIO
|
|
67
|
+
config:
|
|
68
|
+
servers:
|
|
69
|
+
- nats://localhost:4222
|
|
70
|
+
bindings:
|
|
71
|
+
discoveryTopic: smartness.discovery
|
|
72
|
+
llm:
|
|
73
|
+
provider: Gemini
|
|
74
|
+
model: gemini-2.0-flash
|
|
75
|
+
systemInstruction: |
|
|
76
|
+
You are a highly advanced weather agent.
|
|
77
|
+
Prioritize clarity and helpfulness.
|
|
78
|
+
Use tools effectively to gather information.
|
|
79
|
+
config:
|
|
80
|
+
temperature: 0.5
|
|
81
|
+
toolConfig:
|
|
82
|
+
functionCallingConfig:
|
|
83
|
+
mode: 'auto'
|
|
84
|
+
|
|
85
|
+
tools:
|
|
86
|
+
- name: weatherSearchTool
|
|
87
|
+
description: Searches for available weather based on criteria.
|
|
88
|
+
parameters:
|
|
89
|
+
type: object
|
|
90
|
+
properties:
|
|
91
|
+
location:
|
|
92
|
+
type: string
|
|
93
|
+
description: The location to search for weather.
|
|
94
|
+
required:
|
|
95
|
+
- location
|
|
96
|
+
|
|
97
|
+
requiredStateKeys:
|
|
98
|
+
- sessionId
|
|
99
|
+
|
|
100
|
+
discoverySchemas:
|
|
101
|
+
- name: weather_agent_query
|
|
102
|
+
#type: function
|
|
103
|
+
description: Ask a general weather question to the weather agent.
|
|
104
|
+
parameters:
|
|
105
|
+
type: object
|
|
106
|
+
properties:
|
|
107
|
+
location:
|
|
108
|
+
type: string
|
|
109
|
+
description: The location to search for weather.
|
|
110
|
+
required:
|
|
111
|
+
- location
|
|
112
|
+
---
|
|
113
|
+
apiVersion: smartagent.io/v1alpha1
|
|
114
|
+
kind: AgentDefinition
|
|
115
|
+
metadata:
|
|
116
|
+
name: newsAgent
|
|
117
|
+
namespace: smartchat
|
|
118
|
+
spec:
|
|
119
|
+
io:
|
|
120
|
+
- type: NatsIO
|
|
121
|
+
config:
|
|
122
|
+
servers:
|
|
123
|
+
- nats://localhost:4222
|
|
124
|
+
bindings:
|
|
125
|
+
discoveryTopic: smartness.discovery
|
|
126
|
+
llm:
|
|
127
|
+
provider: Gemini
|
|
128
|
+
model: gemini-2.0-flash
|
|
129
|
+
systemInstruction: |
|
|
130
|
+
You are a helpful news agent.
|
|
131
|
+
Provide concise and relevant news updates.
|
|
132
|
+
config:
|
|
133
|
+
temperature: 0.7
|
|
134
|
+
toolConfig:
|
|
135
|
+
functionCallingConfig:
|
|
136
|
+
mode: 'auto'
|
|
137
|
+
tools:
|
|
138
|
+
- name: newsSearchTool
|
|
139
|
+
description: Searches for news articles based on keywords or topics.
|
|
140
|
+
parameters:
|
|
141
|
+
type: object
|
|
142
|
+
properties:
|
|
143
|
+
query:
|
|
144
|
+
type: string
|
|
145
|
+
description: The news topic or keywords to search for.
|
|
146
|
+
required:
|
|
147
|
+
- query
|
|
148
|
+
discoverySchemas:
|
|
149
|
+
- name: news_agent_query
|
|
150
|
+
description: Ask for news updates.
|
|
151
|
+
parameters:
|
|
152
|
+
type: object
|
|
153
|
+
properties:
|
|
154
|
+
topic:
|
|
155
|
+
type: string
|
|
156
|
+
description: The topic to get news about.
|
|
157
|
+
required:
|
|
158
|
+
- topic
|
|
159
|
+
---
|
|
160
|
+
apiVersion: smartagent.io/v1alpha1
|
|
161
|
+
kind: AgentDefinition
|
|
162
|
+
metadata:
|
|
163
|
+
name: calculatorAgent
|
|
164
|
+
namespace: smartchat
|
|
165
|
+
spec:
|
|
166
|
+
io:
|
|
167
|
+
- type: NatsIO
|
|
168
|
+
config:
|
|
169
|
+
servers:
|
|
170
|
+
- nats://localhost:4222
|
|
171
|
+
bindings:
|
|
172
|
+
discoveryTopic: smartness.discovery
|
|
173
|
+
llm:
|
|
174
|
+
provider: Gemini
|
|
175
|
+
model: gemini-2.0-flash
|
|
176
|
+
systemInstruction: |
|
|
177
|
+
You are a precise calculator agent.
|
|
178
|
+
Perform calculations accurately.
|
|
179
|
+
config:
|
|
180
|
+
temperature: 0.2
|
|
181
|
+
toolConfig:
|
|
182
|
+
functionCallingConfig:
|
|
183
|
+
mode: 'auto'
|
|
184
|
+
tools:
|
|
185
|
+
- name: calculationTool
|
|
186
|
+
description: Performs mathematical calculations.
|
|
187
|
+
parameters:
|
|
188
|
+
type: object
|
|
189
|
+
properties:
|
|
190
|
+
expression:
|
|
191
|
+
type: string
|
|
192
|
+
description: The mathematical expression to evaluate.
|
|
193
|
+
required:
|
|
194
|
+
- expression
|
|
195
|
+
discoverySchemas:
|
|
196
|
+
- name: calculator_agent_query
|
|
197
|
+
description: Perform a calculation.
|
|
198
|
+
parameters:
|
|
199
|
+
type: object
|
|
200
|
+
properties:
|
|
201
|
+
expression:
|
|
202
|
+
type: string
|
|
203
|
+
description: The mathematical expression.
|
|
204
|
+
required:
|
|
205
|
+
- expression
|
|
206
|
+
---
|
|
207
|
+
apiVersion: smartagent.io/v1alpha1
|
|
208
|
+
kind: AgentDefinition
|
|
209
|
+
metadata:
|
|
210
|
+
name: translationAgent
|
|
211
|
+
namespace: smartchat
|
|
212
|
+
spec:
|
|
213
|
+
io:
|
|
214
|
+
- type: NatsIO
|
|
215
|
+
config:
|
|
216
|
+
servers:
|
|
217
|
+
- nats://localhost:4222
|
|
218
|
+
bindings:
|
|
219
|
+
discoveryTopic: smartness.discovery
|
|
220
|
+
llm:
|
|
221
|
+
provider: Gemini
|
|
222
|
+
model: gemini-2.0-flash
|
|
223
|
+
systemInstruction: |
|
|
224
|
+
You are an accurate translation agent.
|
|
225
|
+
Translate text between specified languages.
|
|
226
|
+
config:
|
|
227
|
+
temperature: 0.5
|
|
228
|
+
toolConfig:
|
|
229
|
+
functionCallingConfig:
|
|
230
|
+
mode: 'auto'
|
|
231
|
+
tools:
|
|
232
|
+
- name: translationTool
|
|
233
|
+
description: Translates text from a source language to a target language.
|
|
234
|
+
parameters:
|
|
235
|
+
type: object
|
|
236
|
+
properties:
|
|
237
|
+
text:
|
|
238
|
+
type: string
|
|
239
|
+
description: The text to translate.
|
|
240
|
+
sourceLanguage:
|
|
241
|
+
type: string
|
|
242
|
+
description: The language of the input text (e.g., en, es, fr).
|
|
243
|
+
targetLanguage:
|
|
244
|
+
type: string
|
|
245
|
+
description: The language to translate the text to (e.g., en, es, fr).
|
|
246
|
+
required:
|
|
247
|
+
- text
|
|
248
|
+
- targetLanguage
|
|
249
|
+
discoverySchemas:
|
|
250
|
+
- name: translation_agent_query
|
|
251
|
+
description: Translate text.
|
|
252
|
+
parameters:
|
|
253
|
+
type: object
|
|
254
|
+
properties:
|
|
255
|
+
textToTranslate:
|
|
256
|
+
type: string
|
|
257
|
+
description: The text content to be translated.
|
|
258
|
+
targetLang:
|
|
259
|
+
type: string
|
|
260
|
+
description: The target language for translation.
|
|
261
|
+
required:
|
|
262
|
+
- textToTranslate
|
|
263
|
+
- targetLang
|
|
264
|
+
---
|
|
265
|
+
apiVersion: smartagent.io/v1alpha1
|
|
266
|
+
kind: AgentDefinition
|
|
267
|
+
metadata:
|
|
268
|
+
name: calendarAgent
|
|
269
|
+
namespace: smartchat
|
|
270
|
+
spec:
|
|
271
|
+
io:
|
|
272
|
+
- type: NatsIO
|
|
273
|
+
config:
|
|
274
|
+
servers:
|
|
275
|
+
- nats://localhost:4222
|
|
276
|
+
bindings:
|
|
277
|
+
discoveryTopic: smartness.discovery
|
|
278
|
+
llm:
|
|
279
|
+
provider: Gemini
|
|
280
|
+
model: gemini-2.0-flash
|
|
281
|
+
systemInstruction: |
|
|
282
|
+
You are an organized calendar agent.
|
|
283
|
+
Help manage schedules and appointments.
|
|
284
|
+
config:
|
|
285
|
+
temperature: 0.6
|
|
286
|
+
toolConfig:
|
|
287
|
+
functionCallingConfig:
|
|
288
|
+
mode: 'auto'
|
|
289
|
+
tools:
|
|
290
|
+
- name: createEventTool
|
|
291
|
+
description: Creates a new calendar event.
|
|
292
|
+
parameters:
|
|
293
|
+
type: object
|
|
294
|
+
properties:
|
|
295
|
+
title:
|
|
296
|
+
type: string
|
|
297
|
+
description: The title of the event.
|
|
298
|
+
startTime:
|
|
299
|
+
type: string
|
|
300
|
+
description: The start date and time of the event.
|
|
301
|
+
endTime:
|
|
302
|
+
type: string
|
|
303
|
+
description: The end date and time of the event.
|
|
304
|
+
description:
|
|
305
|
+
type: string
|
|
306
|
+
description: A description of the event.
|
|
307
|
+
required:
|
|
308
|
+
- title
|
|
309
|
+
- startTime
|
|
310
|
+
- name: listEventsTool
|
|
311
|
+
description: Lists calendar events for a given period.
|
|
312
|
+
parameters:
|
|
313
|
+
type: object
|
|
314
|
+
properties:
|
|
315
|
+
startDate:
|
|
316
|
+
type: string
|
|
317
|
+
description: The start date of the period.
|
|
318
|
+
endDate:
|
|
319
|
+
type: string
|
|
320
|
+
description: The end date of the period.
|
|
321
|
+
required:
|
|
322
|
+
- startDate
|
|
323
|
+
discoverySchemas:
|
|
324
|
+
- name: calendar_agent_create_event_query
|
|
325
|
+
description: Create a new calendar event.
|
|
326
|
+
parameters:
|
|
327
|
+
type: object
|
|
328
|
+
properties:
|
|
329
|
+
eventTitle:
|
|
330
|
+
type: string
|
|
331
|
+
description: Title of the event.
|
|
332
|
+
eventStartTime:
|
|
333
|
+
type: string
|
|
334
|
+
description: Start time for the event.
|
|
335
|
+
required:
|
|
336
|
+
- eventTitle
|
|
337
|
+
- eventStartTime
|
|
338
|
+
- name: calendar_agent_list_events_query
|
|
339
|
+
description: List calendar events.
|
|
340
|
+
parameters:
|
|
341
|
+
type: object
|
|
342
|
+
properties:
|
|
343
|
+
periodStartDate:
|
|
344
|
+
type: string
|
|
345
|
+
description: Start date for listing events.
|
|
346
|
+
required:
|
|
347
|
+
- periodStartDate
|
|
348
|
+
---
|
|
349
|
+
apiVersion: smartagent.io/v1alpha1
|
|
350
|
+
kind: AgentDefinition
|
|
351
|
+
metadata:
|
|
352
|
+
name: stockTickerAgent
|
|
353
|
+
namespace: smartchat
|
|
354
|
+
spec:
|
|
355
|
+
io:
|
|
356
|
+
- type: NatsIO
|
|
357
|
+
config:
|
|
358
|
+
servers:
|
|
359
|
+
- nats://localhost:4222
|
|
360
|
+
bindings:
|
|
361
|
+
discoveryTopic: smartness.discovery
|
|
362
|
+
llm:
|
|
363
|
+
provider: Gemini
|
|
364
|
+
model: gemini-2.0-flash
|
|
365
|
+
systemInstruction: |
|
|
366
|
+
You are a knowledgeable stock ticker agent.
|
|
367
|
+
Provide current stock prices and market information.
|
|
368
|
+
config:
|
|
369
|
+
temperature: 0.4
|
|
370
|
+
toolConfig:
|
|
371
|
+
functionCallingConfig:
|
|
372
|
+
mode: 'auto'
|
|
373
|
+
tools:
|
|
374
|
+
- name: stockPriceTool
|
|
375
|
+
description: Gets the current price for a stock symbol.
|
|
376
|
+
parameters:
|
|
377
|
+
type: object
|
|
378
|
+
properties:
|
|
379
|
+
symbol:
|
|
380
|
+
type: string
|
|
381
|
+
description: The stock symbol (e.g., GOOGL, AAPL).
|
|
382
|
+
required:
|
|
383
|
+
- symbol
|
|
384
|
+
discoverySchemas:
|
|
385
|
+
- name: stock_agent_query
|
|
386
|
+
description: Get stock information.
|
|
387
|
+
parameters:
|
|
388
|
+
type: object
|
|
389
|
+
properties:
|
|
390
|
+
stockSymbol:
|
|
391
|
+
type: string
|
|
392
|
+
description: The stock symbol.
|
|
393
|
+
required:
|
|
394
|
+
- stockSymbol
|