ag2-assistant 0.5.0__tar.gz

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 (202) hide show
  1. ag2_assistant-0.5.0/LICENSE +201 -0
  2. ag2_assistant-0.5.0/PKG-INFO +280 -0
  3. ag2_assistant-0.5.0/README.md +245 -0
  4. ag2_assistant-0.5.0/pyproject.toml +105 -0
  5. ag2_assistant-0.5.0/setup.cfg +4 -0
  6. ag2_assistant-0.5.0/src/ag2_assistant.egg-info/PKG-INFO +280 -0
  7. ag2_assistant-0.5.0/src/ag2_assistant.egg-info/SOURCES.txt +200 -0
  8. ag2_assistant-0.5.0/src/ag2_assistant.egg-info/dependency_links.txt +1 -0
  9. ag2_assistant-0.5.0/src/ag2_assistant.egg-info/entry_points.txt +2 -0
  10. ag2_assistant-0.5.0/src/ag2_assistant.egg-info/requires.txt +27 -0
  11. ag2_assistant-0.5.0/src/ag2_assistant.egg-info/top_level.txt +1 -0
  12. ag2_assistant-0.5.0/src/assistant/__init__.py +5 -0
  13. ag2_assistant-0.5.0/src/assistant/a2ui.py +843 -0
  14. ag2_assistant-0.5.0/src/assistant/agent.py +696 -0
  15. ag2_assistant-0.5.0/src/assistant/attachments.py +107 -0
  16. ag2_assistant-0.5.0/src/assistant/channels/__init__.py +19 -0
  17. ag2_assistant-0.5.0/src/assistant/channels/base.py +72 -0
  18. ag2_assistant-0.5.0/src/assistant/channels/discord.py +199 -0
  19. ag2_assistant-0.5.0/src/assistant/channels/formatting.py +122 -0
  20. ag2_assistant-0.5.0/src/assistant/channels/slack.py +254 -0
  21. ag2_assistant-0.5.0/src/assistant/channels/telegram.py +246 -0
  22. ag2_assistant-0.5.0/src/assistant/cli.py +759 -0
  23. ag2_assistant-0.5.0/src/assistant/codex_auth.py +491 -0
  24. ag2_assistant-0.5.0/src/assistant/coding/__init__.py +7 -0
  25. ag2_assistant-0.5.0/src/assistant/coding/bridge_client.py +75 -0
  26. ag2_assistant-0.5.0/src/assistant/coding/bridge_protocol.py +33 -0
  27. ag2_assistant-0.5.0/src/assistant/coding/bridge_server.py +167 -0
  28. ag2_assistant-0.5.0/src/assistant/coding/config.py +56 -0
  29. ag2_assistant-0.5.0/src/assistant/coding/detect.py +110 -0
  30. ag2_assistant-0.5.0/src/assistant/coding/diff.py +174 -0
  31. ag2_assistant-0.5.0/src/assistant/coding/session.py +215 -0
  32. ag2_assistant-0.5.0/src/assistant/coding/surface.py +60 -0
  33. ag2_assistant-0.5.0/src/assistant/config.py +373 -0
  34. ag2_assistant-0.5.0/src/assistant/events.py +195 -0
  35. ag2_assistant-0.5.0/src/assistant/feedback.py +116 -0
  36. ag2_assistant-0.5.0/src/assistant/filesearch.py +177 -0
  37. ag2_assistant-0.5.0/src/assistant/folders.py +464 -0
  38. ag2_assistant-0.5.0/src/assistant/gateway/__init__.py +11 -0
  39. ag2_assistant-0.5.0/src/assistant/gateway/app.py +3611 -0
  40. ag2_assistant-0.5.0/src/assistant/gateway/core.py +1167 -0
  41. ag2_assistant-0.5.0/src/assistant/gateway/profile_manager.py +489 -0
  42. ag2_assistant-0.5.0/src/assistant/gateway/repair.py +158 -0
  43. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/cloudy-CiNZVDOc.js +1 -0
  44. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/engine-CpCNOAM6.js +1 -0
  45. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/foggy-BZ4SJ3Hu.js +1 -0
  46. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/helvetiker_bold.typeface-Ct6_dhxe.json +1 -0
  47. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/index-B_FRiNkg.js +111 -0
  48. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/index-CD90qz96.css +1 -0
  49. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/ollama-2ntROlNc.svg +3 -0
  50. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/rainy-CFa3pJsA.js +1 -0
  51. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/snow-B7Sk1MXh.js +1 -0
  52. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/sunny-BtijXi7m.js +1 -0
  53. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/thunderstorm-CZs-O6EA.js +1 -0
  54. ag2_assistant-0.5.0/src/assistant/gateway/static/app/assets/windy-98cnJk20.js +1 -0
  55. ag2_assistant-0.5.0/src/assistant/gateway/static/app/index.html +28 -0
  56. ag2_assistant-0.5.0/src/assistant/gateway/static/favicondark.svg +1 -0
  57. ag2_assistant-0.5.0/src/assistant/gateway/static/faviconlight.svg +1 -0
  58. ag2_assistant-0.5.0/src/assistant/gateway/stream_bridge.py +64 -0
  59. ag2_assistant-0.5.0/src/assistant/gateway/tasks_service.py +597 -0
  60. ag2_assistant-0.5.0/src/assistant/gateway/wire.py +26 -0
  61. ag2_assistant-0.5.0/src/assistant/hitl/__init__.py +29 -0
  62. ag2_assistant-0.5.0/src/assistant/hitl/base.py +73 -0
  63. ag2_assistant-0.5.0/src/assistant/hitl/channel.py +39 -0
  64. ag2_assistant-0.5.0/src/assistant/hitl/desktop.py +304 -0
  65. ag2_assistant-0.5.0/src/assistant/hitl/gateway.py +41 -0
  66. ag2_assistant-0.5.0/src/assistant/hitl/inquiry.py +318 -0
  67. ag2_assistant-0.5.0/src/assistant/integrations/__init__.py +1 -0
  68. ag2_assistant-0.5.0/src/assistant/integrations/google_auth.py +273 -0
  69. ag2_assistant-0.5.0/src/assistant/live_configs.py +219 -0
  70. ag2_assistant-0.5.0/src/assistant/llm_configs.py +355 -0
  71. ag2_assistant-0.5.0/src/assistant/memory.py +386 -0
  72. ag2_assistant-0.5.0/src/assistant/middleware.py +186 -0
  73. ag2_assistant-0.5.0/src/assistant/observability.py +135 -0
  74. ag2_assistant-0.5.0/src/assistant/observers.py +227 -0
  75. ag2_assistant-0.5.0/src/assistant/onboarding.py +185 -0
  76. ag2_assistant-0.5.0/src/assistant/permissions.py +594 -0
  77. ag2_assistant-0.5.0/src/assistant/profiles.py +299 -0
  78. ag2_assistant-0.5.0/src/assistant/scheduler_lock.py +60 -0
  79. ag2_assistant-0.5.0/src/assistant/secrets.py +490 -0
  80. ag2_assistant-0.5.0/src/assistant/self_tools.py +145 -0
  81. ag2_assistant-0.5.0/src/assistant/settings.py +311 -0
  82. ag2_assistant-0.5.0/src/assistant/skills/email-drafting/SKILL.md +37 -0
  83. ag2_assistant-0.5.0/src/assistant/skills/pdf-tools/SKILL.md +49 -0
  84. ag2_assistant-0.5.0/src/assistant/skills/self-knowledge/SKILL.md +135 -0
  85. ag2_assistant-0.5.0/src/assistant/skills/web-research/SKILL.md +40 -0
  86. ag2_assistant-0.5.0/src/assistant/skills.py +346 -0
  87. ag2_assistant-0.5.0/src/assistant/skills_install.py +351 -0
  88. ag2_assistant-0.5.0/src/assistant/storage.py +49 -0
  89. ag2_assistant-0.5.0/src/assistant/system_tools.py +311 -0
  90. ag2_assistant-0.5.0/src/assistant/tasks/__init__.py +38 -0
  91. ag2_assistant-0.5.0/src/assistant/tasks/model.py +137 -0
  92. ag2_assistant-0.5.0/src/assistant/tasks/scheduling.py +170 -0
  93. ag2_assistant-0.5.0/src/assistant/tasks/store.py +214 -0
  94. ag2_assistant-0.5.0/src/assistant/tasks/summary.py +82 -0
  95. ag2_assistant-0.5.0/src/assistant/title.py +49 -0
  96. ag2_assistant-0.5.0/src/assistant/tools/__init__.py +289 -0
  97. ag2_assistant-0.5.0/src/assistant/tools/_mcp_compat.py +70 -0
  98. ag2_assistant-0.5.0/src/assistant/tools/approval.py +34 -0
  99. ag2_assistant-0.5.0/src/assistant/tools/ask.py +62 -0
  100. ag2_assistant-0.5.0/src/assistant/tools/coding.py +94 -0
  101. ag2_assistant-0.5.0/src/assistant/tools/docker_sandbox.py +170 -0
  102. ag2_assistant-0.5.0/src/assistant/tools/files.py +166 -0
  103. ag2_assistant-0.5.0/src/assistant/tools/finance.py +225 -0
  104. ag2_assistant-0.5.0/src/assistant/tools/google.py +371 -0
  105. ag2_assistant-0.5.0/src/assistant/tools/image_gen.py +183 -0
  106. ag2_assistant-0.5.0/src/assistant/tools/mcp.py +309 -0
  107. ag2_assistant-0.5.0/src/assistant/tools/weather.py +232 -0
  108. ag2_assistant-0.5.0/src/assistant/tools/web_fetch.py +67 -0
  109. ag2_assistant-0.5.0/src/assistant/usage.py +139 -0
  110. ag2_assistant-0.5.0/src/assistant/version.py +11 -0
  111. ag2_assistant-0.5.0/src/assistant/voice.py +221 -0
  112. ag2_assistant-0.5.0/src/assistant/voice_providers.py +256 -0
  113. ag2_assistant-0.5.0/src/assistant/workspace.py +453 -0
  114. ag2_assistant-0.5.0/tests/test_a2ui.py +198 -0
  115. ag2_assistant-0.5.0/tests/test_agent.py +26 -0
  116. ag2_assistant-0.5.0/tests/test_attachments.py +107 -0
  117. ag2_assistant-0.5.0/tests/test_channel_notify.py +147 -0
  118. ag2_assistant-0.5.0/tests/test_channels.py +135 -0
  119. ag2_assistant-0.5.0/tests/test_chat_update.py +104 -0
  120. ag2_assistant-0.5.0/tests/test_cli_profiles.py +294 -0
  121. ag2_assistant-0.5.0/tests/test_codex_auth.py +365 -0
  122. ag2_assistant-0.5.0/tests/test_codex_gateway.py +135 -0
  123. ag2_assistant-0.5.0/tests/test_coding_bridge.py +263 -0
  124. ag2_assistant-0.5.0/tests/test_coding_config.py +61 -0
  125. ag2_assistant-0.5.0/tests/test_coding_detect.py +58 -0
  126. ag2_assistant-0.5.0/tests/test_coding_diff.py +92 -0
  127. ag2_assistant-0.5.0/tests/test_coding_integration.py +60 -0
  128. ag2_assistant-0.5.0/tests/test_coding_session.py +236 -0
  129. ag2_assistant-0.5.0/tests/test_coding_surface.py +103 -0
  130. ag2_assistant-0.5.0/tests/test_coding_tool.py +84 -0
  131. ag2_assistant-0.5.0/tests/test_config.py +319 -0
  132. ag2_assistant-0.5.0/tests/test_context.py +154 -0
  133. ag2_assistant-0.5.0/tests/test_discord.py +106 -0
  134. ag2_assistant-0.5.0/tests/test_docker_sandbox.py +140 -0
  135. ag2_assistant-0.5.0/tests/test_events.py +65 -0
  136. ag2_assistant-0.5.0/tests/test_feedback.py +89 -0
  137. ag2_assistant-0.5.0/tests/test_file_tools.py +72 -0
  138. ag2_assistant-0.5.0/tests/test_finance_tool.py +104 -0
  139. ag2_assistant-0.5.0/tests/test_folders.py +455 -0
  140. ag2_assistant-0.5.0/tests/test_formatting.py +69 -0
  141. ag2_assistant-0.5.0/tests/test_gateway.py +1436 -0
  142. ag2_assistant-0.5.0/tests/test_gateway_channels.py +504 -0
  143. ag2_assistant-0.5.0/tests/test_gateway_files.py +195 -0
  144. ag2_assistant-0.5.0/tests/test_gateway_files_mentions.py +229 -0
  145. ag2_assistant-0.5.0/tests/test_gateway_files_search.py +297 -0
  146. ag2_assistant-0.5.0/tests/test_gateway_folder_files.py +136 -0
  147. ag2_assistant-0.5.0/tests/test_gateway_folder_mutate.py +391 -0
  148. ag2_assistant-0.5.0/tests/test_gateway_folder_tree.py +309 -0
  149. ag2_assistant-0.5.0/tests/test_gateway_folders.py +152 -0
  150. ag2_assistant-0.5.0/tests/test_gateway_permissions.py +78 -0
  151. ag2_assistant-0.5.0/tests/test_gateway_profiles.py +479 -0
  152. ag2_assistant-0.5.0/tests/test_gateway_skills.py +90 -0
  153. ag2_assistant-0.5.0/tests/test_gateway_skills_delete.py +210 -0
  154. ag2_assistant-0.5.0/tests/test_gateway_skills_install.py +181 -0
  155. ag2_assistant-0.5.0/tests/test_gateway_skills_profile.py +157 -0
  156. ag2_assistant-0.5.0/tests/test_gateway_skills_source.py +256 -0
  157. ag2_assistant-0.5.0/tests/test_gateway_streams.py +10 -0
  158. ag2_assistant-0.5.0/tests/test_gateway_task_routes.py +211 -0
  159. ag2_assistant-0.5.0/tests/test_google.py +323 -0
  160. ag2_assistant-0.5.0/tests/test_hitl.py +102 -0
  161. ag2_assistant-0.5.0/tests/test_image_gen.py +88 -0
  162. ag2_assistant-0.5.0/tests/test_inquiry.py +128 -0
  163. ag2_assistant-0.5.0/tests/test_live_configs.py +85 -0
  164. ag2_assistant-0.5.0/tests/test_llm_configs.py +398 -0
  165. ag2_assistant-0.5.0/tests/test_memory.py +170 -0
  166. ag2_assistant-0.5.0/tests/test_middleware.py +201 -0
  167. ag2_assistant-0.5.0/tests/test_no_global_defaults.py +139 -0
  168. ag2_assistant-0.5.0/tests/test_observability.py +99 -0
  169. ag2_assistant-0.5.0/tests/test_observers.py +170 -0
  170. ag2_assistant-0.5.0/tests/test_onboarding.py +124 -0
  171. ag2_assistant-0.5.0/tests/test_packaging.py +20 -0
  172. ag2_assistant-0.5.0/tests/test_permissions.py +705 -0
  173. ag2_assistant-0.5.0/tests/test_profile_isolation.py +484 -0
  174. ag2_assistant-0.5.0/tests/test_profile_manager.py +386 -0
  175. ag2_assistant-0.5.0/tests/test_profiles.py +243 -0
  176. ag2_assistant-0.5.0/tests/test_run_stream_task_resolution.py +44 -0
  177. ag2_assistant-0.5.0/tests/test_scheduler_lock.py +69 -0
  178. ag2_assistant-0.5.0/tests/test_scheduling.py +60 -0
  179. ag2_assistant-0.5.0/tests/test_secret_store.py +219 -0
  180. ag2_assistant-0.5.0/tests/test_secrets.py +126 -0
  181. ag2_assistant-0.5.0/tests/test_seen.py +72 -0
  182. ag2_assistant-0.5.0/tests/test_self_tools.py +211 -0
  183. ag2_assistant-0.5.0/tests/test_settings.py +170 -0
  184. ag2_assistant-0.5.0/tests/test_settings_config.py +133 -0
  185. ag2_assistant-0.5.0/tests/test_skills.py +225 -0
  186. ag2_assistant-0.5.0/tests/test_skills_state.py +284 -0
  187. ag2_assistant-0.5.0/tests/test_slack.py +76 -0
  188. ag2_assistant-0.5.0/tests/test_slack_formatting.py +60 -0
  189. ag2_assistant-0.5.0/tests/test_stream_bridge.py +80 -0
  190. ag2_assistant-0.5.0/tests/test_system_tools.py +112 -0
  191. ag2_assistant-0.5.0/tests/test_task_model.py +67 -0
  192. ag2_assistant-0.5.0/tests/test_task_scheduling.py +27 -0
  193. ag2_assistant-0.5.0/tests/test_task_store.py +127 -0
  194. ag2_assistant-0.5.0/tests/test_task_summary.py +59 -0
  195. ag2_assistant-0.5.0/tests/test_tasks_service.py +432 -0
  196. ag2_assistant-0.5.0/tests/test_title.py +22 -0
  197. ag2_assistant-0.5.0/tests/test_tools.py +319 -0
  198. ag2_assistant-0.5.0/tests/test_turn_persistence.py +151 -0
  199. ag2_assistant-0.5.0/tests/test_turn_recovery.py +293 -0
  200. ag2_assistant-0.5.0/tests/test_usage.py +41 -0
  201. ag2_assistant-0.5.0/tests/test_weather_tool.py +128 -0
  202. ag2_assistant-0.5.0/tests/test_workspace.py +412 -0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright ag2ai organization, i.e., https://github.com/ag2ai, owners.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,280 @@
1
+ Metadata-Version: 2.4
2
+ Name: ag2-assistant
3
+ Version: 0.5.0
4
+ Summary: AG2 Assistant — a personal AI assistant powered by AG2's framework
5
+ License-Expression: Apache-2.0
6
+ Requires-Python: >=3.12
7
+ Description-Content-Type: text/markdown
8
+ License-File: LICENSE
9
+ Requires-Dist: ag2[acp,ddgs,gemini,openai]>=1.0.0b0
10
+ Requires-Dist: typer>=0.15.0
11
+ Requires-Dist: python-dotenv>=1.0.0
12
+ Requires-Dist: pydantic>=2.0.0
13
+ Requires-Dist: pyyaml>=6.0
14
+ Requires-Dist: mcp>=1.9.0
15
+ Requires-Dist: httpx>=0.28.0
16
+ Requires-Dist: beautifulsoup4>=4.12.0
17
+ Requires-Dist: cronsim>=2.7
18
+ Requires-Dist: cron-descriptor>=1.4
19
+ Requires-Dist: fastapi>=0.115.0
20
+ Requires-Dist: uvicorn[standard]>=0.34.0
21
+ Requires-Dist: python-telegram-bot>=21.0
22
+ Requires-Dist: discord.py>=2.4
23
+ Requires-Dist: slack-bolt>=1.18
24
+ Provides-Extra: dev
25
+ Requires-Dist: pytest>=8.0.0; extra == "dev"
26
+ Requires-Dist: pytest-asyncio>=0.25.0; extra == "dev"
27
+ Requires-Dist: ruff<0.16,>=0.15.18; extra == "dev"
28
+ Requires-Dist: pre-commit>=4.0.0; extra == "dev"
29
+ Provides-Extra: google
30
+ Requires-Dist: google-api-python-client>=2.0; extra == "google"
31
+ Requires-Dist: google-auth>=2.0; extra == "google"
32
+ Requires-Dist: google-auth-oauthlib>=1.0; extra == "google"
33
+ Requires-Dist: pypdf>=5.0; extra == "google"
34
+ Dynamic: license-file
35
+
36
+ # AG2 Assistant
37
+
38
+ An open-source personal AI assistant powered by [AG2](https://ag2.ai)'s Beta framework, built in Python.
39
+
40
+ > Public product name: **AG2 Assistant**. `ag2-assistant` remains the internal package, CLI command, and data-dir name.
41
+
42
+ AG2 Assistant is a web app (with optional messaging-channel and CLI front-ends) that acts as your personal AI agent — it searches the web, runs code, generates images, reads your project files, and runs scheduled tasks, all while showing its work in the open. Every reply is a projection of the underlying AG2 event stream.
43
+
44
+ ## Quick Start
45
+
46
+ ### 1. Install
47
+
48
+ The quickest way — one line, no clone, no Python setup (the script installs [uv](https://docs.astral.sh/uv/) if needed, and uv brings its own Python):
49
+
50
+ ```bash
51
+ curl -fsSL https://raw.githubusercontent.com/ag2ai/ag2-assistant/main/scripts/install.sh | sh
52
+ ```
53
+
54
+ On Windows:
55
+
56
+ ```powershell
57
+ powershell -ExecutionPolicy Bypass -c "irm https://raw.githubusercontent.com/ag2ai/ag2-assistant/main/scripts/install.ps1 | iex"
58
+ ```
59
+
60
+ Re-run the same script any time to upgrade. Or clone for a development checkout:
61
+
62
+ ```bash
63
+ git clone https://github.com/ag2ai/ag2-assistant.git
64
+ cd ag2-assistant
65
+ python -m venv .venv
66
+ source .venv/bin/activate
67
+ pip install -e ".[dev]"
68
+ ```
69
+
70
+ The repo also ships a `uv.lock`, so `uv run ag2-assistant …` and `uv run pytest` work without setting up a venv yourself.
71
+
72
+ Or just install the CLI globally yourself, no clone (git = latest commit; releases publish to PyPI from the first tagged version):
73
+
74
+ ```bash
75
+ uv tool install "git+https://github.com/ag2ai/ag2-assistant.git" # or: pipx install "git+https://github.com/ag2ai/ag2-assistant.git"
76
+ ```
77
+
78
+ Prefer to run it as an always-on container? See [Deployment](#deployment).
79
+
80
+ ### 2. Run
81
+
82
+ ```bash
83
+ ag2-assistant run # gateway + web UI (+ any configured channels), one process
84
+ ```
85
+
86
+ Then open **http://localhost:8800/** and follow the first-run setup — six short steps:
87
+
88
+ 1. **Welcome** — your name.
89
+ 2. **About you** — location, working hours, preferred answer style (all optional, shared by every profile).
90
+ 3. **Connect** — add a provider key (Gemini is the default and recommended — get one at [aistudio.google.com](https://aistudio.google.com/apikey)), or **sign in with ChatGPT** to run on your existing ChatGPT subscription instead of an API key. You can't continue until one of the two works.
91
+ 4. **Profiles** — create at least one profile (e.g. *Personal*), each a colour-coded, fully isolated workspace.
92
+ 5. **Set up** — per profile: an optional folder to grant it read access to, and the kinds of work you want help with.
93
+ 6. **Ready** — pick a theme and start.
94
+
95
+ Everything here is changeable later in **Settings**.
96
+
97
+ > Prefer to set the key up front? Put `GEMINI_API_KEY=your-key` in a `.env` (see `.env.example`) before running — keys can come from the environment, and setup will pick them up.
98
+
99
+ To serve the API/UI without any messaging channels, use `ag2-assistant gateway` instead of `run`.
100
+
101
+ ## Profiles
102
+
103
+ The assistant is organised into **profiles** — separate, colour-coded workspaces you switch between from the sidebar (or ⌘1–⌘9). A profile has its own chats, tasks, memory, files, folder grants, MCP servers and permissions, so a *Work* profile never sees your *Personal* one.
104
+
105
+ Provider keys, the model configuration, and who you are are shared install-wide (the global `~/.ag2assistant/config.yaml`); everything else is per profile, overlaid from that profile's `~/.ag2assistant/profiles/<id>/config.yaml`. State lives in `~/.ag2assistant/profiles/<id>/` and generated files in `~/Documents/AG2 Assistant/<Profile>/`. Override the install root with `--data-dir` (or `AG2ASSISTANT_DATA_DIR`).
106
+
107
+ ## The web app
108
+
109
+ The primary interface is the Svelte web UI served at `/` (→ `/app`). It includes:
110
+
111
+ - **Chat** — multi-turn conversations with live, streamed agent events (tool calls, code runs, web searches) rendered inline. Attach images or documents and ask about them.
112
+ - **Rich answers** — where structure beats prose, the agent renders a live surface instead: a weather panel, market board, news digest, agenda, inbox brief, or decision matrix.
113
+ - **Steer or stop a turn while it runs** — send a message mid-turn and the agent folds it into the work it's already doing, or hit **Stop** to end the turn — keeping whatever it produced up to that point, so the conversation carries on with that context.
114
+ - **Tasks** — standing jobs the agent runs on a schedule. A task is just a prompt + an optional model + a schedule (hourly/daily/weekly/weekdays, custom cron, one-shot, or manual), editable in place at any time — or created for you by the agent from chat. Every run is a real chat: open it to watch the agent work, steer it mid-run, stop it, or keep talking in it after it finishes. Recent run outcomes feed the next run, and tasks created from Telegram/Slack/Discord report their results back there.
115
+ - **It asks when it's unsure** — mid-task the agent can put a question to you (with tappable options) and resume with your answer, in the web UI or on a connected channel.
116
+ - **Image generation** — generated images are saved to the shared workspace and shown as clickable inline thumbnails.
117
+ - **Files** — browse, preview, download and delete everything the assistant has saved.
118
+ - **Memory** — the assistant passively learns your preferences; 👍/👎 feedback (with a reason) feeds a memory-aware learner that dedupes and prunes conflicting notes.
119
+ - **Folders** — register folders outside the workspace and grant a profile (or a single chat) **read** or **read + write** access, so the assistant can work with your code/notes. Access is granted, never blanket — a first-touch prompt can mint a grant on the fly.
120
+ - **Permissions** — you decide what commands it can run: approve shell commands once or always.
121
+ - **Voice** — talk to the assistant (Gemini Live / OpenAI realtime) over a browser audio bridge.
122
+ - **Usage** — tokens and estimated cost, per profile and across the install.
123
+ - **Settings** — models, API keys, voice, MCP servers, Google, channels, folders, permissions, profiles, and re-run setup.
124
+
125
+ ### Models
126
+
127
+ Set up as many named model configurations as you like (Gemini, OpenAI, Anthropic, Ollama, or any OpenAI-compatible endpoint), test them, and switch the active one at any time in **Settings → Models**. Two OpenAI paths are supported: a normal **API key**, or **Sign in with ChatGPT**, which runs on your ChatGPT/Codex subscription instead of paying per token (unofficial — see `ag2-assistant auth --help`).
128
+
129
+ ### Google
130
+
131
+ Connect Google in Settings and the assistant can search and read your Gmail, draft and send mail (with your approval), read and create calendar events, and read Drive/Docs/Sheets.
132
+
133
+ ## CLI
134
+
135
+ The web app is the main experience, but the CLI is handy for quick one-shots and scripting:
136
+
137
+ ```bash
138
+ ag2-assistant run # everything in one process (gateway + UI + channels)
139
+ ag2-assistant gateway # REST + WebSocket API + web UI only
140
+ ag2-assistant chat # interactive multi-turn chat in the terminal
141
+ ag2-assistant agent "message" # single-shot prompt → reply
142
+ ag2-assistant onboard # first-run interview (name, location, hours, style)
143
+ ag2-assistant version # show version
144
+
145
+ ag2-assistant profiles list # profiles: list / create
146
+ ag2-assistant profile show # the active profile's memory; `profile clear` wipes it
147
+ ag2-assistant permissions list # folder + command grants: allow / revoke / block / unblock
148
+ ag2-assistant auth login # sign in with a ChatGPT subscription (also: logout, status)
149
+ ag2-assistant google login # connect Gmail/Calendar/Drive (also: logout, status)
150
+
151
+ ag2-assistant telegram # run on Telegram (needs TELEGRAM_BOT_TOKEN)
152
+ ag2-assistant discord # run on Discord (needs DISCORD_BOT_TOKEN)
153
+ ag2-assistant slack # run on Slack (needs SLACK_BOT_TOKEN + SLACK_APP_TOKEN)
154
+ ```
155
+
156
+ Channel tokens can also be pasted into **Settings → Channels** instead of the environment.
157
+
158
+ ### Examples
159
+
160
+ ```bash
161
+ ag2-assistant agent "What's the current AG2 version? Search the web."
162
+ ag2-assistant agent "Calculate the first 20 Fibonacci numbers"
163
+ ag2-assistant agent "Compare FastAPI vs Flask. Search the web for current benchmarks."
164
+ ```
165
+
166
+ ## Deployment
167
+
168
+ The Quick Start above is the developer setup. For other ways to run it — see
169
+ [docs/deployment.md](docs/deployment.md) for the full guide:
170
+
171
+ | Tier | For | How |
172
+ |------|-----|-----|
173
+ | **Contributor** | hacking on the code | `git clone` + `pip install -e ".[dev]"` |
174
+ | **CLI user** | running locally, no clone | `curl -fsSL https://raw.githubusercontent.com/ag2ai/ag2-assistant/main/scripts/install.sh \| sh` |
175
+ | **Self-hosted** | an always-on instance | `docker compose up -d` |
176
+ | **PyPI** | released versions | `uv tool install ag2-assistant` (from the first release) |
177
+
178
+ ### Docker (self-hosted)
179
+
180
+ No clone needed — tagged releases publish a prebuilt image to GHCR (`:latest` moves on
181
+ each release):
182
+
183
+ ```bash
184
+ docker run -d --name ag2-assistant -p 8800:8800 \
185
+ -v ag2_data:/data -v ag2_workspace:/workspace \
186
+ ghcr.io/ag2ai/ag2-assistant:latest
187
+ ```
188
+
189
+ Or from a checkout, with Compose:
190
+
191
+ ```bash
192
+ cp .env.example .env # add a provider key (e.g. GEMINI_API_KEY) — optional
193
+ docker compose up -d # build + run; open http://localhost:8800/
194
+ ```
195
+
196
+ State and the agent's file workspace persist in named volumes. Code execution runs
197
+ in-container by default (no host Docker socket); see
198
+ [docs/deployment.md](docs/deployment.md) for the docker-out-of-docker option and channel
199
+ setup.
200
+
201
+ > The gateway has no built-in auth. Only expose port 8800 beyond localhost behind a reverse
202
+ > proxy that handles TLS and authentication.
203
+
204
+ ## Running Tests
205
+
206
+ ```bash
207
+ pytest # the default suite (integration tests are excluded automatically)
208
+ pytest -m integration # only the tests that call a real LLM / network (needs API keys)
209
+ pytest -m "" # everything
210
+ ```
211
+
212
+ ## Architecture
213
+
214
+ **[docs/architecture.md](docs/architecture.md)** is the full system design — every service, agent, endpoint, event type, data flow, and on-disk store — with a companion diagram, [docs/architecture.svg](docs/architecture.svg):
215
+
216
+ [![AG2 Assistant architecture](docs/architecture.svg)](docs/architecture.md)
217
+
218
+ A text sketch of the same shape:
219
+
220
+ ```
221
+ Web UI (Svelte) · Messaging channels · CLI
222
+ | REST + WebSocket (event stream) |
223
+ +-----------+
224
+ | Gateway | (FastAPI: /api/p/{profile}/message, /api/p/{profile}/stream,
225
+ | | /api/health, /app)
226
+ +-----------+
227
+ | per-profile, per-chat isolation; events streamed to every client
228
+ +-----------+
229
+ | Agent | (AG2 + Gemini / OpenAI / Anthropic / Ollama)
230
+ | Tools | (web search, web fetch, weather, markets, shell, code exec,
231
+ | | image gen, files, folder read/write, tasks/scheduling, Google,
232
+ | | skills, your own MCP servers)
233
+ +-----------+
234
+ |
235
+ +-----------+
236
+ | Memory | (preferences learned passively + from 👍/👎 feedback → SQLite)
237
+ +-----------+
238
+ ```
239
+
240
+ Install-wide state lives under `~/.ag2assistant/` — the global `config.yaml` (model configs live in its `llm_configs:` section), `secrets.json` (provider keys), and the profile registry; each profile keeps its own `config.yaml` overlay, chats, tasks and memory in `~/.ag2assistant/profiles/<id>/`, and its generated files in `~/Documents/AG2 Assistant/<Profile>/`. The install root is overridable with `--data-dir` / `AG2ASSISTANT_DATA_DIR`.
241
+
242
+ ## Project Status
243
+
244
+ - [x] Core agent with multi-provider support (Gemini, OpenAI, Anthropic, Ollama)
245
+ - [x] Named model configurations + "Sign in with ChatGPT" subscription auth
246
+ - [x] Profiles — isolated, colour-coded workspaces (own chats, tasks, memory, files)
247
+ - [x] CLI (run, gateway, chat, agent, onboard, profiles, permissions, auth, google)
248
+ - [x] Tools (web search, web fetch, weather, markets, shell, code execution, image generation, files)
249
+ - [x] Memory — passively learns preferences and from 👍/👎 feedback; persists across chats
250
+ - [x] Multi-turn conversations (per-chat isolation)
251
+ - [x] Gateway (REST + WebSocket event-stream API)
252
+ - [x] Web UI — chat, tasks, files, images, voice, memory, usage, permissions, onboarding, settings
253
+ - [x] Generative UI — rich live surfaces (weather, markets, news, agenda, inbox, decisions)
254
+ - [x] Tasks — standing scheduled jobs (manual/once/cron); every run is a steerable, stoppable chat
255
+ - [x] Human-in-the-loop — the agent asks you questions and waits, on any surface
256
+ - [x] Permissions — shell-command approval (folder access is Folders + Grants)
257
+ - [x] Voice (Gemini Live / OpenAI realtime over a browser audio bridge)
258
+ - [x] Folders — install-wide registry with per-profile/per-chat read & read+write grants; user-extensible MCP servers
259
+ - [x] Google — Gmail, Calendar, Drive
260
+ - [x] Channels: Telegram, Discord, Slack (DM + group @mention gating)
261
+ - [x] Skills — searches & installs from the skills.sh registry, runs them
262
+ - [ ] More channels (WhatsApp)
263
+ - [ ] Desktop / mobile clients
264
+
265
+ ## Documentation
266
+
267
+ - [Architecture](docs/architecture.md) — full system design: services, agents, endpoints, event model, data flow ([diagram](docs/architecture.svg))
268
+ - [Usage Guide](docs/usage.md) — CLI commands, configuration, channels
269
+ - [Deployment](docs/deployment.md) — install tiers, Docker/Compose, self-hosting
270
+
271
+ ## Contributing
272
+
273
+ Contributions are welcome — see [CONTRIBUTING.md](CONTRIBUTING.md) to get set up
274
+ and [AGENTS.md](AGENTS.md) for the development guidelines. To report a security
275
+ issue, follow [.github/SECURITY.md](.github/SECURITY.md) (please don't open a
276
+ public issue).
277
+
278
+ ## License
279
+
280
+ [Apache License 2.0](LICENSE)