construct-labs-crm-env 0.1.1__py3-none-any.whl → 0.1.3__py3-none-any.whl
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.
- construct_labs_crm_env/__init__.py +7 -2
- construct_labs_crm_env/client.py +65 -554
- construct_labs_crm_env/models.py +1 -2
- construct_labs_crm_env/tools.py +611 -0
- {construct_labs_crm_env-0.1.1.dist-info → construct_labs_crm_env-0.1.3.dist-info}/METADATA +2 -1
- construct_labs_crm_env-0.1.3.dist-info/RECORD +10 -0
- construct_labs_crm_env-0.1.3.dist-info/licenses/LICENSE +56 -0
- construct_labs_crm_env/_vendored/LICENSE.openenv +0 -28
- construct_labs_crm_env/_vendored/__init__.py +0 -14
- construct_labs_crm_env/_vendored/_client.py +0 -216
- construct_labs_crm_env/_vendored/_types.py +0 -82
- construct_labs_crm_env-0.1.1.dist-info/RECORD +0 -13
- construct_labs_crm_env-0.1.1.dist-info/licenses/LICENSE +0 -42
- {construct_labs_crm_env-0.1.1.dist-info → construct_labs_crm_env-0.1.3.dist-info}/WHEEL +0 -0
construct_labs_crm_env/models.py
CHANGED
|
@@ -9,10 +9,9 @@ from __future__ import annotations
|
|
|
9
9
|
from enum import Enum
|
|
10
10
|
from typing import Any
|
|
11
11
|
|
|
12
|
+
from openenv.core import Action, Observation, State
|
|
12
13
|
from pydantic import ConfigDict, Field
|
|
13
14
|
|
|
14
|
-
from ._vendored import Action, Observation, State
|
|
15
|
-
|
|
16
15
|
|
|
17
16
|
class CRMActionType(str, Enum):
|
|
18
17
|
"""Types of actions available in the CRM environment.
|
|
@@ -0,0 +1,611 @@
|
|
|
1
|
+
"""Tool definitions for the CRM Agent Environment.
|
|
2
|
+
|
|
3
|
+
This module contains the static tool definitions in OpenAI function calling format.
|
|
4
|
+
These define the available actions an agent can take in the CRM environment.
|
|
5
|
+
"""
|
|
6
|
+
|
|
7
|
+
from typing import Any
|
|
8
|
+
|
|
9
|
+
# Type alias for tool definitions
|
|
10
|
+
ToolDefinition = dict[str, Any]
|
|
11
|
+
|
|
12
|
+
# =============================================================================
|
|
13
|
+
# Company Tools
|
|
14
|
+
# =============================================================================
|
|
15
|
+
|
|
16
|
+
LIST_COMPANIES: ToolDefinition = {
|
|
17
|
+
"type": "function",
|
|
18
|
+
"function": {
|
|
19
|
+
"name": "list_companies",
|
|
20
|
+
"description": "List all companies in the CRM",
|
|
21
|
+
"parameters": {
|
|
22
|
+
"type": "object",
|
|
23
|
+
"properties": {
|
|
24
|
+
"limit": {
|
|
25
|
+
"type": "integer",
|
|
26
|
+
"default": 60,
|
|
27
|
+
"description": "Maximum number of companies to return (max 200)",
|
|
28
|
+
},
|
|
29
|
+
"starting_after": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"description": "Cursor for pagination - returns objects after this ID",
|
|
32
|
+
},
|
|
33
|
+
"ending_before": {
|
|
34
|
+
"type": "string",
|
|
35
|
+
"description": "Cursor for pagination - returns objects before this ID",
|
|
36
|
+
},
|
|
37
|
+
"order_by": {
|
|
38
|
+
"type": "string",
|
|
39
|
+
"description": "Order by: field_name[ASC|DESC]",
|
|
40
|
+
},
|
|
41
|
+
"filter": {
|
|
42
|
+
"type": "string",
|
|
43
|
+
"description": "Filter: field[eq|gt|lt|contains]:value",
|
|
44
|
+
},
|
|
45
|
+
"depth": {
|
|
46
|
+
"type": "integer",
|
|
47
|
+
"default": 1,
|
|
48
|
+
"description": "Relation depth: 0=primary only, 1=include relations",
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
"required": [],
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
GET_COMPANY: ToolDefinition = {
|
|
57
|
+
"type": "function",
|
|
58
|
+
"function": {
|
|
59
|
+
"name": "get_company",
|
|
60
|
+
"description": "Get details of a specific company",
|
|
61
|
+
"parameters": {
|
|
62
|
+
"type": "object",
|
|
63
|
+
"properties": {
|
|
64
|
+
"record_id": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"description": "ID of the company to retrieve",
|
|
67
|
+
},
|
|
68
|
+
"depth": {
|
|
69
|
+
"type": "integer",
|
|
70
|
+
"default": 1,
|
|
71
|
+
"description": "Relation depth: 0=primary only, 1=include relations",
|
|
72
|
+
},
|
|
73
|
+
},
|
|
74
|
+
"required": ["record_id"],
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
CREATE_COMPANY: ToolDefinition = {
|
|
80
|
+
"type": "function",
|
|
81
|
+
"function": {
|
|
82
|
+
"name": "create_company",
|
|
83
|
+
"description": "Create a new company in the CRM",
|
|
84
|
+
"parameters": {
|
|
85
|
+
"type": "object",
|
|
86
|
+
"properties": {
|
|
87
|
+
"company_name": {
|
|
88
|
+
"type": "string",
|
|
89
|
+
"description": "Name of the company",
|
|
90
|
+
},
|
|
91
|
+
"company_domain": {
|
|
92
|
+
"type": "string",
|
|
93
|
+
"description": "Domain/website of the company",
|
|
94
|
+
},
|
|
95
|
+
"company_address": {
|
|
96
|
+
"type": "string",
|
|
97
|
+
"description": "Address of the company",
|
|
98
|
+
},
|
|
99
|
+
"company_employees": {
|
|
100
|
+
"type": "integer",
|
|
101
|
+
"description": "Number of employees",
|
|
102
|
+
},
|
|
103
|
+
},
|
|
104
|
+
"required": ["company_name"],
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
UPDATE_COMPANY: ToolDefinition = {
|
|
110
|
+
"type": "function",
|
|
111
|
+
"function": {
|
|
112
|
+
"name": "update_company",
|
|
113
|
+
"description": "Update an existing company",
|
|
114
|
+
"parameters": {
|
|
115
|
+
"type": "object",
|
|
116
|
+
"properties": {
|
|
117
|
+
"record_id": {
|
|
118
|
+
"type": "string",
|
|
119
|
+
"description": "ID of the company to update",
|
|
120
|
+
},
|
|
121
|
+
"company_name": {"type": "string"},
|
|
122
|
+
"company_domain": {"type": "string"},
|
|
123
|
+
"company_address": {"type": "string"},
|
|
124
|
+
"company_employees": {"type": "integer"},
|
|
125
|
+
},
|
|
126
|
+
"required": ["record_id"],
|
|
127
|
+
},
|
|
128
|
+
},
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
DELETE_COMPANY: ToolDefinition = {
|
|
132
|
+
"type": "function",
|
|
133
|
+
"function": {
|
|
134
|
+
"name": "delete_company",
|
|
135
|
+
"description": "Delete a company from the CRM",
|
|
136
|
+
"parameters": {
|
|
137
|
+
"type": "object",
|
|
138
|
+
"properties": {
|
|
139
|
+
"record_id": {
|
|
140
|
+
"type": "string",
|
|
141
|
+
"description": "ID of the company to delete",
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
"required": ["record_id"],
|
|
145
|
+
},
|
|
146
|
+
},
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
# =============================================================================
|
|
150
|
+
# Person/Contact Tools
|
|
151
|
+
# =============================================================================
|
|
152
|
+
|
|
153
|
+
LIST_PEOPLE: ToolDefinition = {
|
|
154
|
+
"type": "function",
|
|
155
|
+
"function": {
|
|
156
|
+
"name": "list_people",
|
|
157
|
+
"description": "List all contacts/people in the CRM",
|
|
158
|
+
"parameters": {
|
|
159
|
+
"type": "object",
|
|
160
|
+
"properties": {
|
|
161
|
+
"limit": {
|
|
162
|
+
"type": "integer",
|
|
163
|
+
"default": 60,
|
|
164
|
+
"description": "Maximum number of contacts to return (max 200)",
|
|
165
|
+
},
|
|
166
|
+
"starting_after": {"type": "string"},
|
|
167
|
+
"ending_before": {"type": "string"},
|
|
168
|
+
"order_by": {"type": "string"},
|
|
169
|
+
"filter": {"type": "string"},
|
|
170
|
+
"depth": {"type": "integer", "default": 1},
|
|
171
|
+
},
|
|
172
|
+
"required": [],
|
|
173
|
+
},
|
|
174
|
+
},
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
GET_PERSON: ToolDefinition = {
|
|
178
|
+
"type": "function",
|
|
179
|
+
"function": {
|
|
180
|
+
"name": "get_person",
|
|
181
|
+
"description": "Get details of a specific contact",
|
|
182
|
+
"parameters": {
|
|
183
|
+
"type": "object",
|
|
184
|
+
"properties": {
|
|
185
|
+
"record_id": {
|
|
186
|
+
"type": "string",
|
|
187
|
+
"description": "ID of the contact to retrieve",
|
|
188
|
+
},
|
|
189
|
+
"depth": {"type": "integer", "default": 1},
|
|
190
|
+
},
|
|
191
|
+
"required": ["record_id"],
|
|
192
|
+
},
|
|
193
|
+
},
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
CREATE_PERSON: ToolDefinition = {
|
|
197
|
+
"type": "function",
|
|
198
|
+
"function": {
|
|
199
|
+
"name": "create_person",
|
|
200
|
+
"description": "Create a new contact/person in the CRM",
|
|
201
|
+
"parameters": {
|
|
202
|
+
"type": "object",
|
|
203
|
+
"properties": {
|
|
204
|
+
"person_first_name": {
|
|
205
|
+
"type": "string",
|
|
206
|
+
"description": "First name",
|
|
207
|
+
},
|
|
208
|
+
"person_last_name": {
|
|
209
|
+
"type": "string",
|
|
210
|
+
"description": "Last name",
|
|
211
|
+
},
|
|
212
|
+
"person_email": {
|
|
213
|
+
"type": "string",
|
|
214
|
+
"description": "Email address",
|
|
215
|
+
},
|
|
216
|
+
"person_phone": {
|
|
217
|
+
"type": "string",
|
|
218
|
+
"description": "Phone number",
|
|
219
|
+
},
|
|
220
|
+
"person_company_id": {
|
|
221
|
+
"type": "string",
|
|
222
|
+
"description": "ID of associated company",
|
|
223
|
+
},
|
|
224
|
+
"person_job_title": {
|
|
225
|
+
"type": "string",
|
|
226
|
+
"description": "Job title",
|
|
227
|
+
},
|
|
228
|
+
},
|
|
229
|
+
"required": ["person_first_name", "person_last_name"],
|
|
230
|
+
},
|
|
231
|
+
},
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
UPDATE_PERSON: ToolDefinition = {
|
|
235
|
+
"type": "function",
|
|
236
|
+
"function": {
|
|
237
|
+
"name": "update_person",
|
|
238
|
+
"description": "Update an existing contact",
|
|
239
|
+
"parameters": {
|
|
240
|
+
"type": "object",
|
|
241
|
+
"properties": {
|
|
242
|
+
"record_id": {
|
|
243
|
+
"type": "string",
|
|
244
|
+
"description": "ID of the contact to update",
|
|
245
|
+
},
|
|
246
|
+
"person_first_name": {"type": "string"},
|
|
247
|
+
"person_last_name": {"type": "string"},
|
|
248
|
+
"person_email": {"type": "string"},
|
|
249
|
+
"person_phone": {"type": "string"},
|
|
250
|
+
"person_job_title": {"type": "string"},
|
|
251
|
+
},
|
|
252
|
+
"required": ["record_id"],
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
DELETE_PERSON: ToolDefinition = {
|
|
258
|
+
"type": "function",
|
|
259
|
+
"function": {
|
|
260
|
+
"name": "delete_person",
|
|
261
|
+
"description": "Delete a contact from the CRM",
|
|
262
|
+
"parameters": {
|
|
263
|
+
"type": "object",
|
|
264
|
+
"properties": {
|
|
265
|
+
"record_id": {
|
|
266
|
+
"type": "string",
|
|
267
|
+
"description": "ID of the contact to delete",
|
|
268
|
+
},
|
|
269
|
+
},
|
|
270
|
+
"required": ["record_id"],
|
|
271
|
+
},
|
|
272
|
+
},
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
# =============================================================================
|
|
276
|
+
# Opportunity Tools
|
|
277
|
+
# =============================================================================
|
|
278
|
+
|
|
279
|
+
LIST_OPPORTUNITIES: ToolDefinition = {
|
|
280
|
+
"type": "function",
|
|
281
|
+
"function": {
|
|
282
|
+
"name": "list_opportunities",
|
|
283
|
+
"description": "List all opportunities/deals in the CRM",
|
|
284
|
+
"parameters": {
|
|
285
|
+
"type": "object",
|
|
286
|
+
"properties": {
|
|
287
|
+
"limit": {
|
|
288
|
+
"type": "integer",
|
|
289
|
+
"default": 60,
|
|
290
|
+
"description": "Maximum number to return (max 200)",
|
|
291
|
+
},
|
|
292
|
+
"starting_after": {"type": "string"},
|
|
293
|
+
"ending_before": {"type": "string"},
|
|
294
|
+
"order_by": {"type": "string"},
|
|
295
|
+
"filter": {"type": "string"},
|
|
296
|
+
"depth": {"type": "integer", "default": 1},
|
|
297
|
+
},
|
|
298
|
+
"required": [],
|
|
299
|
+
},
|
|
300
|
+
},
|
|
301
|
+
}
|
|
302
|
+
|
|
303
|
+
GET_OPPORTUNITY: ToolDefinition = {
|
|
304
|
+
"type": "function",
|
|
305
|
+
"function": {
|
|
306
|
+
"name": "get_opportunity",
|
|
307
|
+
"description": "Get details of a specific opportunity",
|
|
308
|
+
"parameters": {
|
|
309
|
+
"type": "object",
|
|
310
|
+
"properties": {
|
|
311
|
+
"record_id": {
|
|
312
|
+
"type": "string",
|
|
313
|
+
"description": "ID of the opportunity",
|
|
314
|
+
},
|
|
315
|
+
"depth": {"type": "integer", "default": 1},
|
|
316
|
+
},
|
|
317
|
+
"required": ["record_id"],
|
|
318
|
+
},
|
|
319
|
+
},
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
CREATE_OPPORTUNITY: ToolDefinition = {
|
|
323
|
+
"type": "function",
|
|
324
|
+
"function": {
|
|
325
|
+
"name": "create_opportunity",
|
|
326
|
+
"description": "Create a new opportunity/deal",
|
|
327
|
+
"parameters": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"properties": {
|
|
330
|
+
"opportunity_name": {
|
|
331
|
+
"type": "string",
|
|
332
|
+
"description": "Name of the opportunity",
|
|
333
|
+
},
|
|
334
|
+
"opportunity_amount": {
|
|
335
|
+
"type": "number",
|
|
336
|
+
"description": "Deal value",
|
|
337
|
+
},
|
|
338
|
+
"opportunity_stage": {
|
|
339
|
+
"type": "string",
|
|
340
|
+
"enum": ["NEW", "MEETING", "PROPOSAL", "WON", "LOST"],
|
|
341
|
+
"description": "Sales stage",
|
|
342
|
+
},
|
|
343
|
+
"opportunity_close_date": {
|
|
344
|
+
"type": "string",
|
|
345
|
+
"description": "Expected close date (ISO format)",
|
|
346
|
+
},
|
|
347
|
+
"opportunity_company_id": {
|
|
348
|
+
"type": "string",
|
|
349
|
+
"description": "Associated company ID",
|
|
350
|
+
},
|
|
351
|
+
"opportunity_person_id": {
|
|
352
|
+
"type": "string",
|
|
353
|
+
"description": "Point of contact ID",
|
|
354
|
+
},
|
|
355
|
+
},
|
|
356
|
+
"required": ["opportunity_name"],
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
UPDATE_OPPORTUNITY: ToolDefinition = {
|
|
362
|
+
"type": "function",
|
|
363
|
+
"function": {
|
|
364
|
+
"name": "update_opportunity",
|
|
365
|
+
"description": "Update an existing opportunity",
|
|
366
|
+
"parameters": {
|
|
367
|
+
"type": "object",
|
|
368
|
+
"properties": {
|
|
369
|
+
"record_id": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"description": "ID of the opportunity to update",
|
|
372
|
+
},
|
|
373
|
+
"opportunity_name": {"type": "string"},
|
|
374
|
+
"opportunity_amount": {"type": "number"},
|
|
375
|
+
"opportunity_stage": {
|
|
376
|
+
"type": "string",
|
|
377
|
+
"enum": ["NEW", "MEETING", "PROPOSAL", "WON", "LOST"],
|
|
378
|
+
},
|
|
379
|
+
"opportunity_close_date": {"type": "string"},
|
|
380
|
+
},
|
|
381
|
+
"required": ["record_id"],
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
}
|
|
385
|
+
|
|
386
|
+
DELETE_OPPORTUNITY: ToolDefinition = {
|
|
387
|
+
"type": "function",
|
|
388
|
+
"function": {
|
|
389
|
+
"name": "delete_opportunity",
|
|
390
|
+
"description": "Delete an opportunity",
|
|
391
|
+
"parameters": {
|
|
392
|
+
"type": "object",
|
|
393
|
+
"properties": {
|
|
394
|
+
"record_id": {
|
|
395
|
+
"type": "string",
|
|
396
|
+
"description": "ID of the opportunity to delete",
|
|
397
|
+
},
|
|
398
|
+
},
|
|
399
|
+
"required": ["record_id"],
|
|
400
|
+
},
|
|
401
|
+
},
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
# =============================================================================
|
|
405
|
+
# Note Tools
|
|
406
|
+
# =============================================================================
|
|
407
|
+
|
|
408
|
+
LIST_NOTES: ToolDefinition = {
|
|
409
|
+
"type": "function",
|
|
410
|
+
"function": {
|
|
411
|
+
"name": "list_notes",
|
|
412
|
+
"description": "List all notes in the CRM",
|
|
413
|
+
"parameters": {
|
|
414
|
+
"type": "object",
|
|
415
|
+
"properties": {
|
|
416
|
+
"limit": {
|
|
417
|
+
"type": "integer",
|
|
418
|
+
"default": 10,
|
|
419
|
+
"description": "Maximum number of notes to return",
|
|
420
|
+
},
|
|
421
|
+
},
|
|
422
|
+
"required": [],
|
|
423
|
+
},
|
|
424
|
+
},
|
|
425
|
+
}
|
|
426
|
+
|
|
427
|
+
CREATE_NOTE: ToolDefinition = {
|
|
428
|
+
"type": "function",
|
|
429
|
+
"function": {
|
|
430
|
+
"name": "create_note",
|
|
431
|
+
"description": "Create a note attached to a record",
|
|
432
|
+
"parameters": {
|
|
433
|
+
"type": "object",
|
|
434
|
+
"properties": {
|
|
435
|
+
"note_body": {
|
|
436
|
+
"type": "string",
|
|
437
|
+
"description": "Content of the note",
|
|
438
|
+
},
|
|
439
|
+
"note_target_id": {
|
|
440
|
+
"type": "string",
|
|
441
|
+
"description": "ID of record to attach note to",
|
|
442
|
+
},
|
|
443
|
+
"note_target_type": {
|
|
444
|
+
"type": "string",
|
|
445
|
+
"enum": ["company", "person", "opportunity"],
|
|
446
|
+
"description": "Type of record",
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
"required": ["note_body"],
|
|
450
|
+
},
|
|
451
|
+
},
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
# =============================================================================
|
|
455
|
+
# Task Tools
|
|
456
|
+
# =============================================================================
|
|
457
|
+
|
|
458
|
+
LIST_TASKS: ToolDefinition = {
|
|
459
|
+
"type": "function",
|
|
460
|
+
"function": {
|
|
461
|
+
"name": "list_tasks",
|
|
462
|
+
"description": "List all tasks in the CRM",
|
|
463
|
+
"parameters": {
|
|
464
|
+
"type": "object",
|
|
465
|
+
"properties": {
|
|
466
|
+
"limit": {
|
|
467
|
+
"type": "integer",
|
|
468
|
+
"default": 10,
|
|
469
|
+
"description": "Maximum number of tasks to return",
|
|
470
|
+
},
|
|
471
|
+
},
|
|
472
|
+
"required": [],
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
CREATE_TASK: ToolDefinition = {
|
|
478
|
+
"type": "function",
|
|
479
|
+
"function": {
|
|
480
|
+
"name": "create_task",
|
|
481
|
+
"description": "Create a task, optionally linked to a record",
|
|
482
|
+
"parameters": {
|
|
483
|
+
"type": "object",
|
|
484
|
+
"properties": {
|
|
485
|
+
"task_title": {
|
|
486
|
+
"type": "string",
|
|
487
|
+
"description": "Title of the task",
|
|
488
|
+
},
|
|
489
|
+
"task_body": {
|
|
490
|
+
"type": "string",
|
|
491
|
+
"description": "Description",
|
|
492
|
+
},
|
|
493
|
+
"task_due_date": {
|
|
494
|
+
"type": "string",
|
|
495
|
+
"description": "Due date (ISO format)",
|
|
496
|
+
},
|
|
497
|
+
"task_status": {
|
|
498
|
+
"type": "string",
|
|
499
|
+
"enum": ["TODO", "IN_PROGRESS", "DONE"],
|
|
500
|
+
"description": "Status",
|
|
501
|
+
},
|
|
502
|
+
"task_target_id": {
|
|
503
|
+
"type": "string",
|
|
504
|
+
"description": "ID of record to link task to",
|
|
505
|
+
},
|
|
506
|
+
"task_target_type": {
|
|
507
|
+
"type": "string",
|
|
508
|
+
"enum": ["company", "person", "opportunity"],
|
|
509
|
+
"description": "Type of record",
|
|
510
|
+
},
|
|
511
|
+
},
|
|
512
|
+
"required": ["task_title"],
|
|
513
|
+
},
|
|
514
|
+
},
|
|
515
|
+
}
|
|
516
|
+
|
|
517
|
+
UPDATE_TASK: ToolDefinition = {
|
|
518
|
+
"type": "function",
|
|
519
|
+
"function": {
|
|
520
|
+
"name": "update_task",
|
|
521
|
+
"description": "Update an existing task",
|
|
522
|
+
"parameters": {
|
|
523
|
+
"type": "object",
|
|
524
|
+
"properties": {
|
|
525
|
+
"record_id": {
|
|
526
|
+
"type": "string",
|
|
527
|
+
"description": "ID of the task to update",
|
|
528
|
+
},
|
|
529
|
+
"task_title": {"type": "string"},
|
|
530
|
+
"task_body": {"type": "string"},
|
|
531
|
+
"task_due_date": {"type": "string"},
|
|
532
|
+
},
|
|
533
|
+
"required": ["record_id"],
|
|
534
|
+
},
|
|
535
|
+
},
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
COMPLETE_TASK: ToolDefinition = {
|
|
539
|
+
"type": "function",
|
|
540
|
+
"function": {
|
|
541
|
+
"name": "complete_task",
|
|
542
|
+
"description": "Mark a task as complete",
|
|
543
|
+
"parameters": {
|
|
544
|
+
"type": "object",
|
|
545
|
+
"properties": {
|
|
546
|
+
"record_id": {
|
|
547
|
+
"type": "string",
|
|
548
|
+
"description": "ID of the task to complete",
|
|
549
|
+
},
|
|
550
|
+
},
|
|
551
|
+
"required": ["record_id"],
|
|
552
|
+
},
|
|
553
|
+
},
|
|
554
|
+
}
|
|
555
|
+
|
|
556
|
+
# =============================================================================
|
|
557
|
+
# Submit Answer Tool
|
|
558
|
+
# =============================================================================
|
|
559
|
+
|
|
560
|
+
SUBMIT_ANSWER: ToolDefinition = {
|
|
561
|
+
"type": "function",
|
|
562
|
+
"function": {
|
|
563
|
+
"name": "submit_answer",
|
|
564
|
+
"description": "Submit final answer and end the session",
|
|
565
|
+
"parameters": {
|
|
566
|
+
"type": "object",
|
|
567
|
+
"properties": {
|
|
568
|
+
"answer": {
|
|
569
|
+
"type": "string",
|
|
570
|
+
"description": "The final answer based on CRM data",
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
"required": ["answer"],
|
|
574
|
+
},
|
|
575
|
+
},
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
# =============================================================================
|
|
579
|
+
# All Tools - Combined list
|
|
580
|
+
# =============================================================================
|
|
581
|
+
|
|
582
|
+
DEFAULT_TOOLS: list[ToolDefinition] = [
|
|
583
|
+
# Company
|
|
584
|
+
LIST_COMPANIES,
|
|
585
|
+
GET_COMPANY,
|
|
586
|
+
CREATE_COMPANY,
|
|
587
|
+
UPDATE_COMPANY,
|
|
588
|
+
DELETE_COMPANY,
|
|
589
|
+
# Person
|
|
590
|
+
LIST_PEOPLE,
|
|
591
|
+
GET_PERSON,
|
|
592
|
+
CREATE_PERSON,
|
|
593
|
+
UPDATE_PERSON,
|
|
594
|
+
DELETE_PERSON,
|
|
595
|
+
# Opportunity
|
|
596
|
+
LIST_OPPORTUNITIES,
|
|
597
|
+
GET_OPPORTUNITY,
|
|
598
|
+
CREATE_OPPORTUNITY,
|
|
599
|
+
UPDATE_OPPORTUNITY,
|
|
600
|
+
DELETE_OPPORTUNITY,
|
|
601
|
+
# Note
|
|
602
|
+
LIST_NOTES,
|
|
603
|
+
CREATE_NOTE,
|
|
604
|
+
# Task
|
|
605
|
+
LIST_TASKS,
|
|
606
|
+
CREATE_TASK,
|
|
607
|
+
UPDATE_TASK,
|
|
608
|
+
COMPLETE_TASK,
|
|
609
|
+
# Answer
|
|
610
|
+
SUBMIT_ANSWER,
|
|
611
|
+
]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: construct-labs-crm-env
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.3
|
|
4
4
|
Summary: CRM Agent Environment SDK by Construct Labs - Train RL agents to interact with CRM systems
|
|
5
5
|
Project-URL: Homepage, https://construct-labs.com
|
|
6
6
|
Author-email: Construct Labs GmbH <hello@construct-labs.com>
|
|
@@ -19,6 +19,7 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
19
19
|
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
20
20
|
Classifier: Typing :: Typed
|
|
21
21
|
Requires-Python: >=3.10
|
|
22
|
+
Requires-Dist: openenv-core>=0.2.0
|
|
22
23
|
Requires-Dist: pydantic>=2.0.0
|
|
23
24
|
Requires-Dist: websockets>=12.0
|
|
24
25
|
Provides-Extra: dev
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
construct_labs_crm_env/__init__.py,sha256=XRei6wERXV6MMV168AkgeAMlsZLRSdXA2pPg8icfWQ4,917
|
|
2
|
+
construct_labs_crm_env/client.py,sha256=OPXcNT1QTNST_-OdI1jQtcVVrdIQKmmpH5JmJCNVS14,18980
|
|
3
|
+
construct_labs_crm_env/models.py,sha256=bs-n9FcWcR8DqKvurmm0wUebWBWp9hG6Zaj6s7jEptg,9200
|
|
4
|
+
construct_labs_crm_env/protocol.py,sha256=h_7-0XaV9gBNHiSXoW4aITSD9K21R1Swc5yZR6LF50A,671
|
|
5
|
+
construct_labs_crm_env/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
construct_labs_crm_env/tools.py,sha256=zdYlJfTr5d3El9awlg-VeTommJ6nCNAd13E09drxv8E,18854
|
|
7
|
+
construct_labs_crm_env-0.1.3.dist-info/METADATA,sha256=oPrpeZNalu8QgHjAF34NgyO6vIvrrfp_1Le5TfVraAU,11923
|
|
8
|
+
construct_labs_crm_env-0.1.3.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
9
|
+
construct_labs_crm_env-0.1.3.dist-info/licenses/LICENSE,sha256=zPT_KqeG9QTE0zTfKGheMHluFJB1fn_bNgNehnnpXGM,2210
|
|
10
|
+
construct_labs_crm_env-0.1.3.dist-info/RECORD,,
|