digitalkin 0.3.2.dev2__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.
Files changed (131) hide show
  1. base_server/__init__.py +1 -0
  2. base_server/mock/__init__.py +5 -0
  3. base_server/mock/mock_pb2.py +39 -0
  4. base_server/mock/mock_pb2_grpc.py +102 -0
  5. base_server/server_async_insecure.py +125 -0
  6. base_server/server_async_secure.py +143 -0
  7. base_server/server_sync_insecure.py +103 -0
  8. base_server/server_sync_secure.py +122 -0
  9. digitalkin/__init__.py +8 -0
  10. digitalkin/__version__.py +8 -0
  11. digitalkin/core/__init__.py +1 -0
  12. digitalkin/core/common/__init__.py +9 -0
  13. digitalkin/core/common/factories.py +156 -0
  14. digitalkin/core/job_manager/__init__.py +1 -0
  15. digitalkin/core/job_manager/base_job_manager.py +288 -0
  16. digitalkin/core/job_manager/single_job_manager.py +354 -0
  17. digitalkin/core/job_manager/taskiq_broker.py +311 -0
  18. digitalkin/core/job_manager/taskiq_job_manager.py +541 -0
  19. digitalkin/core/task_manager/__init__.py +1 -0
  20. digitalkin/core/task_manager/base_task_manager.py +539 -0
  21. digitalkin/core/task_manager/local_task_manager.py +108 -0
  22. digitalkin/core/task_manager/remote_task_manager.py +87 -0
  23. digitalkin/core/task_manager/surrealdb_repository.py +266 -0
  24. digitalkin/core/task_manager/task_executor.py +249 -0
  25. digitalkin/core/task_manager/task_session.py +406 -0
  26. digitalkin/grpc_servers/__init__.py +1 -0
  27. digitalkin/grpc_servers/_base_server.py +486 -0
  28. digitalkin/grpc_servers/module_server.py +208 -0
  29. digitalkin/grpc_servers/module_servicer.py +516 -0
  30. digitalkin/grpc_servers/utils/__init__.py +1 -0
  31. digitalkin/grpc_servers/utils/exceptions.py +29 -0
  32. digitalkin/grpc_servers/utils/grpc_client_wrapper.py +88 -0
  33. digitalkin/grpc_servers/utils/grpc_error_handler.py +53 -0
  34. digitalkin/grpc_servers/utils/utility_schema_extender.py +97 -0
  35. digitalkin/logger.py +157 -0
  36. digitalkin/mixins/__init__.py +19 -0
  37. digitalkin/mixins/base_mixin.py +10 -0
  38. digitalkin/mixins/callback_mixin.py +24 -0
  39. digitalkin/mixins/chat_history_mixin.py +110 -0
  40. digitalkin/mixins/cost_mixin.py +76 -0
  41. digitalkin/mixins/file_history_mixin.py +93 -0
  42. digitalkin/mixins/filesystem_mixin.py +46 -0
  43. digitalkin/mixins/logger_mixin.py +51 -0
  44. digitalkin/mixins/storage_mixin.py +79 -0
  45. digitalkin/models/__init__.py +8 -0
  46. digitalkin/models/core/__init__.py +1 -0
  47. digitalkin/models/core/job_manager_models.py +36 -0
  48. digitalkin/models/core/task_monitor.py +70 -0
  49. digitalkin/models/grpc_servers/__init__.py +1 -0
  50. digitalkin/models/grpc_servers/models.py +275 -0
  51. digitalkin/models/grpc_servers/types.py +24 -0
  52. digitalkin/models/module/__init__.py +25 -0
  53. digitalkin/models/module/module.py +40 -0
  54. digitalkin/models/module/module_context.py +149 -0
  55. digitalkin/models/module/module_types.py +393 -0
  56. digitalkin/models/module/utility.py +146 -0
  57. digitalkin/models/services/__init__.py +10 -0
  58. digitalkin/models/services/cost.py +54 -0
  59. digitalkin/models/services/registry.py +42 -0
  60. digitalkin/models/services/storage.py +44 -0
  61. digitalkin/modules/__init__.py +11 -0
  62. digitalkin/modules/_base_module.py +517 -0
  63. digitalkin/modules/archetype_module.py +23 -0
  64. digitalkin/modules/tool_module.py +23 -0
  65. digitalkin/modules/trigger_handler.py +48 -0
  66. digitalkin/modules/triggers/__init__.py +12 -0
  67. digitalkin/modules/triggers/healthcheck_ping_trigger.py +45 -0
  68. digitalkin/modules/triggers/healthcheck_services_trigger.py +63 -0
  69. digitalkin/modules/triggers/healthcheck_status_trigger.py +52 -0
  70. digitalkin/py.typed +0 -0
  71. digitalkin/services/__init__.py +30 -0
  72. digitalkin/services/agent/__init__.py +6 -0
  73. digitalkin/services/agent/agent_strategy.py +19 -0
  74. digitalkin/services/agent/default_agent.py +13 -0
  75. digitalkin/services/base_strategy.py +22 -0
  76. digitalkin/services/communication/__init__.py +7 -0
  77. digitalkin/services/communication/communication_strategy.py +76 -0
  78. digitalkin/services/communication/default_communication.py +101 -0
  79. digitalkin/services/communication/grpc_communication.py +223 -0
  80. digitalkin/services/cost/__init__.py +14 -0
  81. digitalkin/services/cost/cost_strategy.py +100 -0
  82. digitalkin/services/cost/default_cost.py +114 -0
  83. digitalkin/services/cost/grpc_cost.py +138 -0
  84. digitalkin/services/filesystem/__init__.py +7 -0
  85. digitalkin/services/filesystem/default_filesystem.py +417 -0
  86. digitalkin/services/filesystem/filesystem_strategy.py +252 -0
  87. digitalkin/services/filesystem/grpc_filesystem.py +317 -0
  88. digitalkin/services/identity/__init__.py +6 -0
  89. digitalkin/services/identity/default_identity.py +15 -0
  90. digitalkin/services/identity/identity_strategy.py +14 -0
  91. digitalkin/services/registry/__init__.py +27 -0
  92. digitalkin/services/registry/default_registry.py +141 -0
  93. digitalkin/services/registry/exceptions.py +47 -0
  94. digitalkin/services/registry/grpc_registry.py +306 -0
  95. digitalkin/services/registry/registry_models.py +43 -0
  96. digitalkin/services/registry/registry_strategy.py +98 -0
  97. digitalkin/services/services_config.py +200 -0
  98. digitalkin/services/services_models.py +65 -0
  99. digitalkin/services/setup/__init__.py +1 -0
  100. digitalkin/services/setup/default_setup.py +219 -0
  101. digitalkin/services/setup/grpc_setup.py +343 -0
  102. digitalkin/services/setup/setup_strategy.py +145 -0
  103. digitalkin/services/snapshot/__init__.py +6 -0
  104. digitalkin/services/snapshot/default_snapshot.py +39 -0
  105. digitalkin/services/snapshot/snapshot_strategy.py +30 -0
  106. digitalkin/services/storage/__init__.py +7 -0
  107. digitalkin/services/storage/default_storage.py +228 -0
  108. digitalkin/services/storage/grpc_storage.py +214 -0
  109. digitalkin/services/storage/storage_strategy.py +273 -0
  110. digitalkin/services/user_profile/__init__.py +12 -0
  111. digitalkin/services/user_profile/default_user_profile.py +55 -0
  112. digitalkin/services/user_profile/grpc_user_profile.py +69 -0
  113. digitalkin/services/user_profile/user_profile_strategy.py +40 -0
  114. digitalkin/utils/__init__.py +29 -0
  115. digitalkin/utils/arg_parser.py +92 -0
  116. digitalkin/utils/development_mode_action.py +51 -0
  117. digitalkin/utils/dynamic_schema.py +483 -0
  118. digitalkin/utils/llm_ready_schema.py +75 -0
  119. digitalkin/utils/package_discover.py +357 -0
  120. digitalkin-0.3.2.dev2.dist-info/METADATA +602 -0
  121. digitalkin-0.3.2.dev2.dist-info/RECORD +131 -0
  122. digitalkin-0.3.2.dev2.dist-info/WHEEL +5 -0
  123. digitalkin-0.3.2.dev2.dist-info/licenses/LICENSE +430 -0
  124. digitalkin-0.3.2.dev2.dist-info/top_level.txt +4 -0
  125. modules/__init__.py +0 -0
  126. modules/cpu_intensive_module.py +280 -0
  127. modules/dynamic_setup_module.py +338 -0
  128. modules/minimal_llm_module.py +347 -0
  129. modules/text_transform_module.py +203 -0
  130. services/filesystem_module.py +200 -0
  131. services/storage_module.py +206 -0
@@ -0,0 +1,602 @@
1
+ Metadata-Version: 2.4
2
+ Name: digitalkin
3
+ Version: 0.3.2.dev2
4
+ Summary: SDK to build kin used in DigitalKin
5
+ Author-email: "DigitalKin.ai" <contact@digitalkin.ai>
6
+ License: Attribution-NonCommercial-ShareAlike 4.0 International
7
+
8
+ =======================================================================
9
+
10
+ Creative Commons Corporation ("Creative Commons") is not a law firm and
11
+ does not provide legal services or legal advice. Distribution of
12
+ Creative Commons public licenses does not create a lawyer-client or
13
+ other relationship. Creative Commons makes its licenses and related
14
+ information available on an "as-is" basis. Creative Commons gives no
15
+ warranties regarding its licenses, any material licensed under their
16
+ terms and conditions, or any related information. Creative Commons
17
+ disclaims all liability for damages resulting from their use to the
18
+ fullest extent possible.
19
+
20
+ Using Creative Commons Public Licenses
21
+
22
+ Creative Commons public licenses provide a standard set of terms and
23
+ conditions that creators and other rights holders may use to share
24
+ original works of authorship and other material subject to copyright
25
+ and certain other rights specified in the public license below. The
26
+ following considerations are for informational purposes only, are not
27
+ exhaustive, and do not form part of our licenses.
28
+
29
+ Considerations for licensors: Our public licenses are
30
+ intended for use by those authorized to give the public
31
+ permission to use material in ways otherwise restricted by
32
+ copyright and certain other rights. Our licenses are
33
+ irrevocable. Licensors should read and understand the terms
34
+ and conditions of the license they choose before applying it.
35
+ Licensors should also secure all rights necessary before
36
+ applying our licenses so that the public can reuse the
37
+ material as expected. Licensors should clearly mark any
38
+ material not subject to the license. This includes other CC-
39
+ licensed material, or material used under an exception or
40
+ limitation to copyright. More considerations for licensors:
41
+ wiki.creativecommons.org/Considerations_for_licensors
42
+
43
+ Considerations for the public: By using one of our public
44
+ licenses, a licensor grants the public permission to use the
45
+ licensed material under specified terms and conditions. If
46
+ the licensor's permission is not necessary for any reason--for
47
+ example, because of any applicable exception or limitation to
48
+ copyright--then that use is not regulated by the license. Our
49
+ licenses grant only permissions under copyright and certain
50
+ other rights that a licensor has authority to grant. Use of
51
+ the licensed material may still be restricted for other
52
+ reasons, including because others have copyright or other
53
+ rights in the material. A licensor may make special requests,
54
+ such as asking that all changes be marked or described.
55
+ Although not required by our licenses, you are encouraged to
56
+ respect those requests where reasonable. More considerations
57
+ for the public:
58
+ wiki.creativecommons.org/Considerations_for_licensees
59
+
60
+ =======================================================================
61
+
62
+ Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International
63
+ Public License
64
+
65
+ By exercising the Licensed Rights (defined below), You accept and agree
66
+ to be bound by the terms and conditions of this Creative Commons
67
+ Attribution-NonCommercial-ShareAlike 4.0 International Public License
68
+ ("Public License"). To the extent this Public License may be
69
+ interpreted as a contract, You are granted the Licensed Rights in
70
+ consideration of Your acceptance of these terms and conditions, and the
71
+ Licensor grants You such rights in consideration of benefits the
72
+ Licensor receives from making the Licensed Material available under
73
+ these terms and conditions.
74
+
75
+ Section 1 -- Definitions.
76
+
77
+ a. Adapted Material means material subject to Copyright and Similar
78
+ Rights that is derived from or based upon the Licensed Material
79
+ and in which the Licensed Material is translated, altered,
80
+ arranged, transformed, or otherwise modified in a manner requiring
81
+ permission under the Copyright and Similar Rights held by the
82
+ Licensor. For purposes of this Public License, where the Licensed
83
+ Material is a musical work, performance, or sound recording,
84
+ Adapted Material is always produced where the Licensed Material is
85
+ synched in timed relation with a moving image.
86
+
87
+ b. Adapter's License means the license You apply to Your Copyright
88
+ and Similar Rights in Your contributions to Adapted Material in
89
+ accordance with the terms and conditions of this Public License.
90
+
91
+ c. BY-NC-SA Compatible License means a license listed at
92
+ creativecommons.org/compatiblelicenses, approved by Creative
93
+ Commons as essentially the equivalent of this Public License.
94
+
95
+ d. Copyright and Similar Rights means copyright and/or similar rights
96
+ closely related to copyright including, without limitation,
97
+ performance, broadcast, sound recording, and Sui Generis Database
98
+ Rights, without regard to how the rights are labeled or
99
+ categorized. For purposes of this Public License, the rights
100
+ specified in Section 2(b)(1)-(2) are not Copyright and Similar
101
+ Rights.
102
+
103
+ e. Effective Technological Measures means those measures that, in the
104
+ absence of proper authority, may not be circumvented under laws
105
+ fulfilling obligations under Article 11 of the WIPO Copyright
106
+ Treaty adopted on December 20, 1996, and/or similar international
107
+ agreements.
108
+
109
+ f. Exceptions and Limitations means fair use, fair dealing, and/or
110
+ any other exception or limitation to Copyright and Similar Rights
111
+ that applies to Your use of the Licensed Material.
112
+
113
+ g. License Elements means the license attributes listed in the name
114
+ of a Creative Commons Public License. The License Elements of this
115
+ Public License are Attribution, NonCommercial, and ShareAlike.
116
+
117
+ h. Licensed Material means the artistic or literary work, database,
118
+ or other material to which the Licensor applied this Public
119
+ License.
120
+
121
+ i. Licensed Rights means the rights granted to You subject to the
122
+ terms and conditions of this Public License, which are limited to
123
+ all Copyright and Similar Rights that apply to Your use of the
124
+ Licensed Material and that the Licensor has authority to license.
125
+
126
+ j. Licensor means the individual(s) or entity(ies) granting rights
127
+ under this Public License.
128
+
129
+ k. NonCommercial means not primarily intended for or directed towards
130
+ commercial advantage or monetary compensation. For purposes of
131
+ this Public License, the exchange of the Licensed Material for
132
+ other material subject to Copyright and Similar Rights by digital
133
+ file-sharing or similar means is NonCommercial provided there is
134
+ no payment of monetary compensation in connection with the
135
+ exchange.
136
+
137
+ l. Share means to provide material to the public by any means or
138
+ process that requires permission under the Licensed Rights, such
139
+ as reproduction, public display, public performance, distribution,
140
+ dissemination, communication, or importation, and to make material
141
+ available to the public including in ways that members of the
142
+ public may access the material from a place and at a time
143
+ individually chosen by them.
144
+
145
+ m. Sui Generis Database Rights means rights other than copyright
146
+ resulting from Directive 96/9/EC of the European Parliament and of
147
+ the Council of 11 March 1996 on the legal protection of databases,
148
+ as amended and/or succeeded, as well as other essentially
149
+ equivalent rights anywhere in the world.
150
+
151
+ n. You means the individual or entity exercising the Licensed Rights
152
+ under this Public License. Your has a corresponding meaning.
153
+
154
+ Section 2 -- Scope.
155
+
156
+ a. License grant.
157
+
158
+ 1. Subject to the terms and conditions of this Public License,
159
+ the Licensor hereby grants You a worldwide, royalty-free,
160
+ non-sublicensable, non-exclusive, irrevocable license to
161
+ exercise the Licensed Rights in the Licensed Material to:
162
+
163
+ a. reproduce and Share the Licensed Material, in whole or
164
+ in part, for NonCommercial purposes only; and
165
+
166
+ b. produce, reproduce, and Share Adapted Material for
167
+ NonCommercial purposes only.
168
+
169
+ 2. Exceptions and Limitations. For the avoidance of doubt, where
170
+ Exceptions and Limitations apply to Your use, this Public
171
+ License does not apply, and You do not need to comply with
172
+ its terms and conditions.
173
+
174
+ 3. Term. The term of this Public License is specified in Section
175
+ 6(a).
176
+
177
+ 4. Media and formats; technical modifications allowed. The
178
+ Licensor authorizes You to exercise the Licensed Rights in
179
+ all media and formats whether now known or hereafter created,
180
+ and to make technical modifications necessary to do so. The
181
+ Licensor waives and/or agrees not to assert any right or
182
+ authority to forbid You from making technical modifications
183
+ necessary to exercise the Licensed Rights, including
184
+ technical modifications necessary to circumvent Effective
185
+ Technological Measures. For purposes of this Public License,
186
+ simply making modifications authorized by this Section 2(a)
187
+ (4) never produces Adapted Material.
188
+
189
+ 5. Downstream recipients.
190
+
191
+ a. Offer from the Licensor -- Licensed Material. Every
192
+ recipient of the Licensed Material automatically
193
+ receives an offer from the Licensor to exercise the
194
+ Licensed Rights under the terms and conditions of this
195
+ Public License.
196
+
197
+ b. Additional offer from the Licensor -- Adapted Material.
198
+ Every recipient of Adapted Material from You
199
+ automatically receives an offer from the Licensor to
200
+ exercise the Licensed Rights in the Adapted Material
201
+ under the conditions of the Adapter's License You apply.
202
+
203
+ c. No downstream restrictions. You may not offer or impose
204
+ any additional or different terms or conditions on, or
205
+ apply any Effective Technological Measures to, the
206
+ Licensed Material if doing so restricts exercise of the
207
+ Licensed Rights by any recipient of the Licensed
208
+ Material.
209
+
210
+ 6. No endorsement. Nothing in this Public License constitutes or
211
+ may be construed as permission to assert or imply that You
212
+ are, or that Your use of the Licensed Material is, connected
213
+ with, or sponsored, endorsed, or granted official status by,
214
+ the Licensor or others designated to receive attribution as
215
+ provided in Section 3(a)(1)(A)(i).
216
+
217
+ b. Other rights.
218
+
219
+ 1. Moral rights, such as the right of integrity, are not
220
+ licensed under this Public License, nor are publicity,
221
+ privacy, and/or other similar personality rights; however, to
222
+ the extent possible, the Licensor waives and/or agrees not to
223
+ assert any such rights held by the Licensor to the limited
224
+ extent necessary to allow You to exercise the Licensed
225
+ Rights, but not otherwise.
226
+
227
+ 2. Patent and trademark rights are not licensed under this
228
+ Public License.
229
+
230
+ 3. To the extent possible, the Licensor waives any right to
231
+ collect royalties from You for the exercise of the Licensed
232
+ Rights, whether directly or through a collecting society
233
+ under any voluntary or waivable statutory or compulsory
234
+ licensing scheme. In all other cases the Licensor expressly
235
+ reserves any right to collect such royalties, including when
236
+ the Licensed Material is used other than for NonCommercial
237
+ purposes.
238
+
239
+ Section 3 -- License Conditions.
240
+
241
+ Your exercise of the Licensed Rights is expressly made subject to the
242
+ following conditions.
243
+
244
+ a. Attribution.
245
+
246
+ 1. If You Share the Licensed Material (including in modified
247
+ form), You must:
248
+
249
+ a. retain the following if it is supplied by the Licensor
250
+ with the Licensed Material:
251
+
252
+ i. identification of the creator(s) of the Licensed
253
+ Material and any others designated to receive
254
+ attribution, in any reasonable manner requested by
255
+ the Licensor (including by pseudonym if
256
+ designated);
257
+
258
+ ii. a copyright notice;
259
+
260
+ iii. a notice that refers to this Public License;
261
+
262
+ iv. a notice that refers to the disclaimer of
263
+ warranties;
264
+
265
+ v. a URI or hyperlink to the Licensed Material to the
266
+ extent reasonably practicable;
267
+
268
+ b. indicate if You modified the Licensed Material and
269
+ retain an indication of any previous modifications; and
270
+
271
+ c. indicate the Licensed Material is licensed under this
272
+ Public License, and include the text of, or the URI or
273
+ hyperlink to, this Public License.
274
+
275
+ 2. You may satisfy the conditions in Section 3(a)(1) in any
276
+ reasonable manner based on the medium, means, and context in
277
+ which You Share the Licensed Material. For example, it may be
278
+ reasonable to satisfy the conditions by providing a URI or
279
+ hyperlink to a resource that includes the required
280
+ information.
281
+ 3. If requested by the Licensor, You must remove any of the
282
+ information required by Section 3(a)(1)(A) to the extent
283
+ reasonably practicable.
284
+
285
+ b. ShareAlike.
286
+
287
+ In addition to the conditions in Section 3(a), if You Share
288
+ Adapted Material You produce, the following conditions also apply.
289
+
290
+ 1. The Adapter's License You apply must be a Creative Commons
291
+ license with the same License Elements, this version or
292
+ later, or a BY-NC-SA Compatible License.
293
+
294
+ 2. You must include the text of, or the URI or hyperlink to, the
295
+ Adapter's License You apply. You may satisfy this condition
296
+ in any reasonable manner based on the medium, means, and
297
+ context in which You Share Adapted Material.
298
+
299
+ 3. You may not offer or impose any additional or different terms
300
+ or conditions on, or apply any Effective Technological
301
+ Measures to, Adapted Material that restrict exercise of the
302
+ rights granted under the Adapter's License You apply.
303
+
304
+ Section 4 -- Sui Generis Database Rights.
305
+
306
+ Where the Licensed Rights include Sui Generis Database Rights that
307
+ apply to Your use of the Licensed Material:
308
+
309
+ a. for the avoidance of doubt, Section 2(a)(1) grants You the right
310
+ to extract, reuse, reproduce, and Share all or a substantial
311
+ portion of the contents of the database for NonCommercial purposes
312
+ only;
313
+
314
+ b. if You include all or a substantial portion of the database
315
+ contents in a database in which You have Sui Generis Database
316
+ Rights, then the database in which You have Sui Generis Database
317
+ Rights (but not its individual contents) is Adapted Material,
318
+ including for purposes of Section 3(b); and
319
+
320
+ c. You must comply with the conditions in Section 3(a) if You Share
321
+ all or a substantial portion of the contents of the database.
322
+
323
+ For the avoidance of doubt, this Section 4 supplements and does not
324
+ replace Your obligations under this Public License where the Licensed
325
+ Rights include other Copyright and Similar Rights.
326
+
327
+ Section 5 -- Disclaimer of Warranties and Limitation of Liability.
328
+
329
+ a. UNLESS OTHERWISE SEPARATELY UNDERTAKEN BY THE LICENSOR, TO THE
330
+ EXTENT POSSIBLE, THE LICENSOR OFFERS THE LICENSED MATERIAL AS-IS
331
+ AND AS-AVAILABLE, AND MAKES NO REPRESENTATIONS OR WARRANTIES OF
332
+ ANY KIND CONCERNING THE LICENSED MATERIAL, WHETHER EXPRESS,
333
+ IMPLIED, STATUTORY, OR OTHER. THIS INCLUDES, WITHOUT LIMITATION,
334
+ WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
335
+ PURPOSE, NON-INFRINGEMENT, ABSENCE OF LATENT OR OTHER DEFECTS,
336
+ ACCURACY, OR THE PRESENCE OR ABSENCE OF ERRORS, WHETHER OR NOT
337
+ KNOWN OR DISCOVERABLE. WHERE DISCLAIMERS OF WARRANTIES ARE NOT
338
+ ALLOWED IN FULL OR IN PART, THIS DISCLAIMER MAY NOT APPLY TO YOU.
339
+
340
+ b. TO THE EXTENT POSSIBLE, IN NO EVENT WILL THE LICENSOR BE LIABLE
341
+ TO YOU ON ANY LEGAL THEORY (INCLUDING, WITHOUT LIMITATION,
342
+ NEGLIGENCE) OR OTHERWISE FOR ANY DIRECT, SPECIAL, INDIRECT,
343
+ INCIDENTAL, CONSEQUENTIAL, PUNITIVE, EXEMPLARY, OR OTHER LOSSES,
344
+ COSTS, EXPENSES, OR DAMAGES ARISING OUT OF THIS PUBLIC LICENSE OR
345
+ USE OF THE LICENSED MATERIAL, EVEN IF THE LICENSOR HAS BEEN
346
+ ADVISED OF THE POSSIBILITY OF SUCH LOSSES, COSTS, EXPENSES, OR
347
+ DAMAGES. WHERE A LIMITATION OF LIABILITY IS NOT ALLOWED IN FULL OR
348
+ IN PART, THIS LIMITATION MAY NOT APPLY TO YOU.
349
+
350
+ c. The disclaimer of warranties and limitation of liability provided
351
+ above shall be interpreted in a manner that, to the extent
352
+ possible, most closely approximates an absolute disclaimer and
353
+ waiver of all liability.
354
+
355
+ Section 6 -- Term and Termination.
356
+
357
+ a. This Public License applies for the term of the Copyright and
358
+ Similar Rights licensed here. However, if You fail to comply with
359
+ this Public License, then Your rights under this Public License
360
+ terminate automatically.
361
+
362
+ b. Where Your right to use the Licensed Material has terminated under
363
+ Section 6(a), it reinstates:
364
+
365
+ 1. automatically as of the date the violation is cured, provided
366
+ it is cured within 30 days of Your discovery of the
367
+ violation; or
368
+
369
+ 2. upon express reinstatement by the Licensor.
370
+
371
+ For the avoidance of doubt, this Section 6(b) does not affect any
372
+ right the Licensor may have to seek remedies for Your violations
373
+ of this Public License.
374
+
375
+ c. For the avoidance of doubt, the Licensor may also offer the
376
+ Licensed Material under separate terms or conditions or stop
377
+ distributing the Licensed Material at any time; however, doing so
378
+ will not terminate this Public License.
379
+
380
+ d. Sections 1, 5, 6, 7, and 8 survive termination of this Public
381
+ License.
382
+
383
+ Section 7 -- Other Terms and Conditions.
384
+
385
+ a. The Licensor shall not be bound by any additional or different
386
+ terms or conditions communicated by You unless expressly agreed.
387
+
388
+ b. Any arrangements, understandings, or agreements regarding the
389
+ Licensed Material not stated herein are separate from and
390
+ independent of the terms and conditions of this Public License.
391
+
392
+ Section 8 -- Interpretation.
393
+
394
+ a. For the avoidance of doubt, this Public License does not, and
395
+ shall not be interpreted to, reduce, limit, restrict, or impose
396
+ conditions on any use of the Licensed Material that could lawfully
397
+ be made without permission under this Public License.
398
+
399
+ b. To the extent possible, if any provision of this Public License is
400
+ deemed unenforceable, it shall be automatically reformed to the
401
+ minimum extent necessary to make it enforceable. If the provision
402
+ cannot be reformed, it shall be severed from this Public License
403
+ without affecting the enforceability of the remaining terms and
404
+ conditions.
405
+
406
+ c. No term or condition of this Public License will be waived and no
407
+ failure to comply consented to unless expressly agreed to by the
408
+ Licensor.
409
+
410
+ d. Nothing in this Public License constitutes or may be interpreted
411
+ as a limitation upon, or waiver of, any privileges and immunities
412
+ that apply to the Licensor or You, including from the legal
413
+ processes of any jurisdiction or authority.
414
+
415
+ =======================================================================
416
+
417
+ Creative Commons is not a party to its public
418
+ licenses. Notwithstanding, Creative Commons may elect to apply one of
419
+ its public licenses to material it publishes and in those instances
420
+ will be considered the “Licensor.” The text of the Creative Commons
421
+ public licenses is dedicated to the public domain under the CC0 Public
422
+ Domain Dedication. Except for the limited purpose of indicating that
423
+ material is shared under a Creative Commons public license or as
424
+ otherwise permitted by the Creative Commons policies published at
425
+ creativecommons.org/policies, Creative Commons does not authorize the
426
+ use of the trademark "Creative Commons" or any other trademark or logo
427
+ of Creative Commons without its prior written consent including,
428
+ without limitation, in connection with any unauthorized modifications
429
+ to any of its public licenses or any other arrangements,
430
+ understandings, or agreements concerning use of licensed material. For
431
+ the avoidance of doubt, this paragraph does not form part of the
432
+ public licenses.
433
+
434
+ Creative Commons may be contacted at creativecommons.org.
435
+ https://creativecommons.org/licenses/by-nc-sa/4.0/
436
+
437
+ Project-URL: Homepage, https://github.com/DigitalKin-ai/digitalkin
438
+ Project-URL: Documentation, https://github.com/DigitalKin-ai/digitalkin
439
+ Project-URL: Issues, https://github.com/DigitalKin-ai/digitalkin/issues
440
+ Keywords: digitalkin,kin,agent,gprc,sdk
441
+ Classifier: Development Status :: 3 - Alpha
442
+ Classifier: Intended Audience :: Developers
443
+ Classifier: Operating System :: OS Independent
444
+ Classifier: Topic :: Software Development :: Libraries
445
+ Classifier: Programming Language :: Python
446
+ Classifier: Programming Language :: Python :: 3.10
447
+ Classifier: Programming Language :: Python :: 3.11
448
+ Classifier: Programming Language :: Python :: 3.12
449
+ Classifier: Programming Language :: Python :: 3.13
450
+ Classifier: Programming Language :: Python :: 3 :: Only
451
+ Classifier: License :: Other/Proprietary License
452
+ Requires-Python: >=3.10
453
+ Description-Content-Type: text/markdown
454
+ License-File: LICENSE
455
+ Requires-Dist: agentic-mesh-protocol==0.2.1.dev0
456
+ Requires-Dist: grpcio-health-checking>=1.76.0
457
+ Requires-Dist: grpcio-reflection>=1.76.0
458
+ Requires-Dist: grpcio-status>=1.76.0
459
+ Requires-Dist: pydantic>=2.12.5
460
+ Requires-Dist: surrealdb>=1.0.7
461
+ Provides-Extra: taskiq
462
+ Requires-Dist: rstream>=0.40.0; extra == "taskiq"
463
+ Requires-Dist: taskiq-aio-pika>=0.5.0; extra == "taskiq"
464
+ Requires-Dist: taskiq-redis>=1.2.0; extra == "taskiq"
465
+ Requires-Dist: taskiq[reload]>=0.12.1; extra == "taskiq"
466
+ Dynamic: license-file
467
+
468
+ # DigitalKin Python SDK
469
+
470
+ [![CI](https://github.com/DigitalKin-ai/digitalkin/actions/workflows/ci.yml/badge.svg)](https://github.com/DigitalKin-ai/digitalkin/actions/workflows/ci.yml)
471
+ [![PyPI](https://img.shields.io/pypi/v/digitalkin.svg)](https://pypi.org/project/digitalkin/)
472
+ [![Python Version](https://img.shields.io/pypi/pyversions/digitalkin.svg)](https://pypi.org/project/digitalkin/)
473
+ [![License](https://img.shields.io/github/license/DigitalKin-ai/digitalkin)](https://github.com/DigitalKin-ai/digitalkin/blob/main/LICENSE)
474
+
475
+ Welcome to the DigitalKin Python SDK, a powerful tool designed for developers
476
+ who aim to build and manage agents within multi-agent systems according to the
477
+ innovative DigitalKin agentic mesh standards. This SDK streamlines the process
478
+ of creating and managing custom Tools, Triggers, and Kin Archetypes while
479
+ ensuring full compliance with the DigitalKin ecosystem's standards.
480
+
481
+ ## 🚀 Features
482
+
483
+ - **Seamless Integration**: Easily integrate with DigitalKin's services using
484
+ our comprehensive gRPC support.
485
+ - **Customizable Agents**: Build custom agents and manage their lifecycle
486
+ efficiently.
487
+ - **Standards Compliance**: Adhere to the latest DigitalKin agentic mesh
488
+ standards.
489
+ - **Robust Development Tools**: Utilize advanced development tools for testing,
490
+ building, and deploying your projects.
491
+
492
+ ## 📦 Installation
493
+
494
+ To install the DigitalKin SDK, simply run:
495
+
496
+ ```bash
497
+ pip install digitalkin
498
+ ```
499
+
500
+ **Optional Taskiq Integration**: Asynchronous task execution powered by Taskiq, backed by RabbitMQ and Redis
501
+ To enable the Rabbitmq streaming capabilities, run:
502
+
503
+ ```sh
504
+ sudo rabbitmq-plugins enable rabbitmq_stream
505
+
506
+ # Core + Taskiq integration (RabbitMQ broker)
507
+ pip install digitalkin[taskiq]
508
+ ```
509
+
510
+ ## 🛠️ Usage
511
+
512
+ ### Basic Import
513
+
514
+ Start by importing the necessary modules:
515
+
516
+ ```python
517
+ import digitalkin
518
+ ```
519
+
520
+ ## Features
521
+
522
+ ### Taskiq with RabbitMQ
523
+
524
+ TaskIQ intergration allows the module to scale for heavy CPU tasks by having the request's stateless module in a new instance.
525
+
526
+ - **Decoupled Scalability**: RabbitMQ brokers messages, letting producers and consumers scale independently.
527
+ - **Reliability**: Durable queues, acknowledgements, and dead-lettering ensure tasks aren’t lost.
528
+ - **Concurrency Control**: Taskiq’s worker pool manages parallel execution without custom schedulers.
529
+ - **Flexibility**: Built-in retries, exponential backoff, and Redis result-backend for resilient workflows.
530
+ - **Ecosystem**: Battle-tested `aio-pika` AMQP client plus Taskiq’s decorator-based API.
531
+
532
+ By combining Taskiq’s async API with RabbitMQ’s guarantees, you get a robust, production-ready queue with minimal boilerplate.
533
+
534
+ ## 👷‍♂️ Development
535
+
536
+ ### Prerequisites
537
+
538
+ Ensure you have the following installed:
539
+
540
+ - Python 3.10+
541
+ - [uv](https://astral.sh/uv) - Modern Python package management
542
+ - [buf](https://buf.build/docs/installation) - Protocol buffer toolkit
543
+ - [protoc](https://grpc.io/docs/protoc-installation/) - Protocol Buffers
544
+ compiler
545
+ - [Task](https://taskfile.dev/) - Task runner
546
+
547
+ ### Setting Up Your Development Environment
548
+
549
+ Clone the repository and set up your environment with these commands:
550
+
551
+ ```bash
552
+ # Clone the repository with submodules
553
+ git clone --recurse-submodules https://github.com/DigitalKin-ai/digitalkin.git
554
+ cd digitalkin
555
+
556
+ # Setup development environment
557
+ task setup-dev
558
+ task setup-dev
559
+ source .venv/bin/activate
560
+ ```
561
+
562
+ ### Common Development Tasks
563
+
564
+ Utilize the following commands for common tasks:
565
+
566
+ ```bash
567
+ # Build the package
568
+ task build-package
569
+
570
+ # Run tests
571
+ task run-tests
572
+
573
+ # Format code using Ruff linter and formatter
574
+ task linter
575
+
576
+ # Clean build artifacts
577
+ task clean
578
+
579
+ # Bump version (major, minor, patch)
580
+ task bump-version -- major|minor|patch
581
+ ```
582
+
583
+ ### Publishing Process
584
+
585
+ 1. Update code and commit changes. (following conventional branch/commit
586
+ standard)
587
+ 2. Use `task bump-version -- major|minor|patch` command to commit new version.
588
+ 3. Use GitHub "Create Release" workflow to plublish the new version.
589
+ 4. Workflow automatically publishes to Test PyPI and PyPI.
590
+
591
+ ## 📄 License
592
+
593
+ This project is licensed under the terms specified in the LICENSE file.
594
+
595
+ ---
596
+
597
+ For more information, please visit our
598
+ [Homepage](https://github.com/DigitalKin-ai/digitalkin), check our
599
+ [Documentation](https://github.com/DigitalKin-ai/digitalkin), or report issues
600
+ on our [Issues page](https://github.com/DigitalKin-ai/digitalkin/issues).
601
+
602
+ Happy coding! 🎉🚀