lionagi 0.8.6__tar.gz → 0.8.7__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 (254) hide show
  1. {lionagi-0.8.6 → lionagi-0.8.7}/PKG-INFO +73 -246
  2. lionagi-0.8.7/README.md +145 -0
  3. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/ReAct/ReAct.py +9 -5
  4. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/tools/reader.py +1 -1
  5. lionagi-0.8.7/lionagi/version.py +1 -0
  6. {lionagi-0.8.6 → lionagi-0.8.7}/pyproject.toml +1 -1
  7. {lionagi-0.8.6 → lionagi-0.8.7}/uv.lock +1 -1
  8. lionagi-0.8.6/README.md +0 -318
  9. lionagi-0.8.6/lionagi/version.py +0 -1
  10. {lionagi-0.8.6 → lionagi-0.8.7}/.env.example +0 -0
  11. {lionagi-0.8.6 → lionagi-0.8.7}/.github/FUNDING.yml +0 -0
  12. {lionagi-0.8.6 → lionagi-0.8.7}/.github/dependabot.yml +0 -0
  13. {lionagi-0.8.6 → lionagi-0.8.7}/.github/workflows/ci.yml +0 -0
  14. {lionagi-0.8.6 → lionagi-0.8.7}/.github/workflows/codeql.yml +0 -0
  15. {lionagi-0.8.6 → lionagi-0.8.7}/.github/workflows/docs.yml +0 -0
  16. {lionagi-0.8.6 → lionagi-0.8.7}/.github/workflows/release.yml +0 -0
  17. {lionagi-0.8.6 → lionagi-0.8.7}/.gitignore +0 -0
  18. {lionagi-0.8.6 → lionagi-0.8.7}/.pre-commit-config.yaml +0 -0
  19. {lionagi-0.8.6 → lionagi-0.8.7}/CODE_OF_CONDUCT.md +0 -0
  20. {lionagi-0.8.6 → lionagi-0.8.7}/CONTRIBUTING.md +0 -0
  21. {lionagi-0.8.6 → lionagi-0.8.7}/LICENSE +0 -0
  22. {lionagi-0.8.6 → lionagi-0.8.7}/cookbooks/ch01_get_started.md +0 -0
  23. {lionagi-0.8.6 → lionagi-0.8.7}/cookbooks/ch02_concepts.md +0 -0
  24. {lionagi-0.8.6 → lionagi-0.8.7}/dev_tools/count_code_base_lines.py +0 -0
  25. {lionagi-0.8.6 → lionagi-0.8.7}/docs/Makefile +0 -0
  26. {lionagi-0.8.6 → lionagi-0.8.7}/docs/_static/custom.css +0 -0
  27. {lionagi-0.8.6 → lionagi-0.8.7}/docs/_templates/layout.html +0 -0
  28. {lionagi-0.8.6 → lionagi-0.8.7}/docs/conf.py +0 -0
  29. {lionagi-0.8.6 → lionagi-0.8.7}/docs/index.rst +0 -0
  30. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/action.rst +0 -0
  31. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/adapter.rst +0 -0
  32. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/branch.rst +0 -0
  33. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/branch_operations.rst +0 -0
  34. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/concepts.rst +0 -0
  35. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/element_id.rst +0 -0
  36. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/event.rst +0 -0
  37. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/form.rst +0 -0
  38. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/graph.rst +0 -0
  39. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/index.rst +0 -0
  40. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/instruct.rst +0 -0
  41. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/lib_file.rst +0 -0
  42. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/lib_nested.rst +0 -0
  43. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/lib_package.rst +0 -0
  44. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/lib_schema.rst +0 -0
  45. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/lib_validate.rst +0 -0
  46. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/log.rst +0 -0
  47. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/mail.rst +0 -0
  48. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/message.rst +0 -0
  49. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/models.rst +0 -0
  50. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/operative_step.rst +0 -0
  51. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/pile.rst +0 -0
  52. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/processor.rst +0 -0
  53. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/progression.rst +0 -0
  54. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/service.rst +0 -0
  55. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/session.rst +0 -0
  56. {lionagi-0.8.6 → lionagi-0.8.7}/docs/modules/utils.rst +0 -0
  57. {lionagi-0.8.6 → lionagi-0.8.7}/docs/tutorials/get_started.rst +0 -0
  58. {lionagi-0.8.6 → lionagi-0.8.7}/docs/tutorials/get_started_pt2.rst +0 -0
  59. {lionagi-0.8.6 → lionagi-0.8.7}/docs/tutorials/get_started_pt3.rst +0 -0
  60. {lionagi-0.8.6 → lionagi-0.8.7}/docs/tutorials/index.rst +0 -0
  61. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/__init__.py +0 -0
  62. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/_class_registry.py +0 -0
  63. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/_errors.py +0 -0
  64. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/_types.py +0 -0
  65. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/__init__.py +0 -0
  66. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/file/__init__.py +0 -0
  67. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/file/chunk.py +0 -0
  68. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/file/file_ops.py +0 -0
  69. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/file/params.py +0 -0
  70. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/file/process.py +0 -0
  71. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/file/save.py +0 -0
  72. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/__init__.py +0 -0
  73. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/flatten.py +0 -0
  74. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/nfilter.py +0 -0
  75. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/nget.py +0 -0
  76. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/ninsert.py +0 -0
  77. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/nmerge.py +0 -0
  78. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/npop.py +0 -0
  79. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/nset.py +0 -0
  80. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/unflatten.py +0 -0
  81. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/nested/utils.py +0 -0
  82. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/package/__init__.py +0 -0
  83. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/package/imports.py +0 -0
  84. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/package/management.py +0 -0
  85. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/package/params.py +0 -0
  86. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/package/system.py +0 -0
  87. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/parse.py +0 -0
  88. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/schema/__init__.py +0 -0
  89. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/schema/as_readable.py +0 -0
  90. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/schema/extract_code_block.py +0 -0
  91. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/schema/extract_docstring.py +0 -0
  92. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/schema/function_to_schema.py +0 -0
  93. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/schema/json_schema.py +0 -0
  94. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/token_transform/__init__.py +0 -0
  95. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/token_transform/llmlingua.py +0 -0
  96. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/token_transform/perplexity.py +0 -0
  97. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/token_transform/synthlang.py +0 -0
  98. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/validate/__init__.py +0 -0
  99. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/validate/common_field_validators.py +0 -0
  100. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/validate/fuzzy_match_keys.py +0 -0
  101. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/validate/fuzzy_validate_mapping.py +0 -0
  102. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/validate/string_similarity.py +0 -0
  103. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/libs/validate/validate_boolean.py +0 -0
  104. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/ReAct/__init__.py +0 -0
  105. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/ReAct/utils.py +0 -0
  106. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/__init__.py +0 -0
  107. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/_act/__init__.py +0 -0
  108. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/_act/act.py +0 -0
  109. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/brainstorm/__init__.py +0 -0
  110. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/brainstorm/brainstorm.py +0 -0
  111. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/brainstorm/prompt.py +0 -0
  112. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/chat/__init__.py +0 -0
  113. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/chat/chat.py +0 -0
  114. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/communicate/__init__.py +0 -0
  115. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/communicate/communicate.py +0 -0
  116. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/instruct/__init__.py +0 -0
  117. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/instruct/instruct.py +0 -0
  118. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/interpret/__init__.py +0 -0
  119. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/interpret/interpret.py +0 -0
  120. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/manager.py +0 -0
  121. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/operate/__init__.py +0 -0
  122. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/operate/operate.py +0 -0
  123. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/parse/__init__.py +0 -0
  124. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/parse/parse.py +0 -0
  125. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/plan/__init__.py +0 -0
  126. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/plan/plan.py +0 -0
  127. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/plan/prompt.py +0 -0
  128. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/select/__init__.py +0 -0
  129. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/select/select.py +0 -0
  130. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/select/utils.py +0 -0
  131. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/translate/__init__.py +0 -0
  132. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/translate/translate.py +0 -0
  133. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/types.py +0 -0
  134. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operations/utils.py +0 -0
  135. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/__init__.py +0 -0
  136. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/action/__init__.py +0 -0
  137. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/action/function_calling.py +0 -0
  138. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/action/manager.py +0 -0
  139. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/action/request_response_model.py +0 -0
  140. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/action/tool.py +0 -0
  141. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/action/utils.py +0 -0
  142. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/forms/__init__.py +0 -0
  143. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/forms/base.py +0 -0
  144. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/forms/flow.py +0 -0
  145. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/forms/form.py +0 -0
  146. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/forms/report.py +0 -0
  147. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/instruct/__init__.py +0 -0
  148. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/instruct/base.py +0 -0
  149. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/instruct/instruct.py +0 -0
  150. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/instruct/instruct_collection.py +0 -0
  151. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/instruct/node.py +0 -0
  152. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/instruct/prompts.py +0 -0
  153. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/instruct/reason.py +0 -0
  154. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/manager.py +0 -0
  155. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/models/__init__.py +0 -0
  156. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/models/field_model.py +0 -0
  157. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/models/model_params.py +0 -0
  158. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/models/note.py +0 -0
  159. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/models/operable_model.py +0 -0
  160. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/models/schema_model.py +0 -0
  161. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/operative.py +0 -0
  162. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/step.py +0 -0
  163. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/__init__.py +0 -0
  164. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/base.py +0 -0
  165. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/concurrent.py +0 -0
  166. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/concurrent_chunk.py +0 -0
  167. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/concurrent_sequential_chunk.py +0 -0
  168. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/params.py +0 -0
  169. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/sequential.py +0 -0
  170. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/sequential_chunk.py +0 -0
  171. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/sequential_concurrent_chunk.py +0 -0
  172. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/strategies/utils.py +0 -0
  173. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/operatives/types.py +0 -0
  174. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/__init__.py +0 -0
  175. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/_concepts.py +0 -0
  176. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/__init__.py +0 -0
  177. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/adapter.py +0 -0
  178. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/json_adapter.py +0 -0
  179. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/pandas_/__init__.py +0 -0
  180. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/pandas_/csv_adapter.py +0 -0
  181. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/pandas_/excel_adapter.py +0 -0
  182. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/pandas_/pd_dataframe_adapter.py +0 -0
  183. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/pandas_/pd_series_adapter.py +0 -0
  184. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/adapters/types.py +0 -0
  185. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/generic/__init__.py +0 -0
  186. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/generic/element.py +0 -0
  187. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/generic/event.py +0 -0
  188. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/generic/log.py +0 -0
  189. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/generic/pile.py +0 -0
  190. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/generic/processor.py +0 -0
  191. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/generic/progression.py +0 -0
  192. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/graph/__init__.py +0 -0
  193. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/graph/edge.py +0 -0
  194. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/graph/graph.py +0 -0
  195. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/graph/node.py +0 -0
  196. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/mail/__init__.py +0 -0
  197. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/mail/exchange.py +0 -0
  198. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/mail/mail.py +0 -0
  199. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/mail/mailbox.py +0 -0
  200. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/mail/manager.py +0 -0
  201. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/mail/package.py +0 -0
  202. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/__init__.py +0 -0
  203. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/action_request.py +0 -0
  204. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/action_response.py +0 -0
  205. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/assistant_response.py +0 -0
  206. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/base.py +0 -0
  207. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/instruction.py +0 -0
  208. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/manager.py +0 -0
  209. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/message.py +0 -0
  210. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/system.py +0 -0
  211. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/templates/README.md +0 -0
  212. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/templates/action_request.jinja2 +0 -0
  213. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/templates/action_response.jinja2 +0 -0
  214. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/templates/assistant_response.jinja2 +0 -0
  215. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/templates/instruction_message.jinja2 +0 -0
  216. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/templates/system_message.jinja2 +0 -0
  217. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/messages/templates/tool_schemas.jinja2 +0 -0
  218. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/protocols/types.py +0 -0
  219. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/__init__.py +0 -0
  220. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/endpoints/__init__.py +0 -0
  221. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/endpoints/base.py +0 -0
  222. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/endpoints/chat_completion.py +0 -0
  223. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/endpoints/match_endpoint.py +0 -0
  224. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/endpoints/rate_limited_processor.py +0 -0
  225. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/endpoints/token_calculator.py +0 -0
  226. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/imodel.py +0 -0
  227. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/manager.py +0 -0
  228. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/__init__.py +0 -0
  229. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/anthropic_/__init__.py +0 -0
  230. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/anthropic_/messages.py +0 -0
  231. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/exa_/__init__.py +0 -0
  232. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/exa_/models.py +0 -0
  233. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/exa_/search.py +0 -0
  234. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/exa_/types.py +0 -0
  235. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/groq_/__init__.py +0 -0
  236. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/groq_/chat_completions.py +0 -0
  237. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/openai_/__init__.py +0 -0
  238. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/openai_/chat_completions.py +0 -0
  239. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/openrouter_/__init__.py +0 -0
  240. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/openrouter_/chat_completions.py +0 -0
  241. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/perplexity_/__init__.py +0 -0
  242. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/perplexity_/chat_completions.py +0 -0
  243. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/perplexity_/models.py +0 -0
  244. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/providers/types.py +0 -0
  245. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/service/types.py +0 -0
  246. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/session/__init__.py +0 -0
  247. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/session/branch.py +0 -0
  248. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/session/session.py +0 -0
  249. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/settings.py +0 -0
  250. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/tools/__init__.py +0 -0
  251. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/tools/base.py +0 -0
  252. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/tools/types.py +0 -0
  253. {lionagi-0.8.6 → lionagi-0.8.7}/lionagi/utils.py +0 -0
  254. {lionagi-0.8.6 → lionagi-0.8.7}/prompts/doc_style.md +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: lionagi
3
- Version: 0.8.6
3
+ Version: 0.8.7
4
4
  Summary: An Intelligence Operating System.
5
5
  Author-email: HaiyangLi <quantocean.li@gmail.com>
6
6
  License: Apache License
@@ -235,310 +235,134 @@ Description-Content-Type: text/markdown
235
235
 
236
236
  [Documentation](https://lion-agi.github.io/lionagi/) | [Discord](https://discord.gg/aqSJ2v46vu) | [PyPI](https://pypi.org/project/lionagi/) | [Roadmap](https://trello.com/b/3seomsrI/lionagi)
237
237
 
238
- # LION Framework
239
- ### Language InterOperable Network - The Future of Controlled AI Operations
238
+ # LION - Language InterOperable Network
240
239
 
241
- > Harness the power of next-generation AI while maintaining complete control and reliability.
240
+ ## An Intelligence Operating System
242
241
 
243
- ## Why LION?
242
+ LionAGI is a robust framework for orchestrating multi-step AI operations with precise control. Bring together multiple models, advanced ReAct reasoning, tool integrations, and custom validations in a single coherent pipeline.
244
243
 
245
- The AI revolution is transforming how we work - but with great power comes great responsibility. LION provides the control mechanisms and reliability features needed to safely integrate advanced AI capabilities into enterprise workflows.
246
-
247
- LION is designed to be:
248
- - 🔒 **Controlled**: Built-in safety mechanisms and verification
249
- - 🎯 **Precise**: Exact control over AI behaviors
250
- - 🔧 **Flexible**: Build any workflow you need
251
- - 🚀 **Efficient**: Minimal dependencies, maximum performance
244
+ ## Why LionAGI?
252
245
 
246
+ - **Structured**: LLM interactions are validated and typed (via Pydantic).
247
+ - **Expandable**: Integrate multiple providers (OpenAI, Anthropic, Perplexity, custom) with minimal friction.
248
+ - **Controlled**: Built-in safety checks, concurrency strategies, and advanced multi-step flows—like ReAct with verbose outputs.
249
+ - **Transparent**: Real-time logging, message introspection, and easy debugging of tool usage.
253
250
 
254
251
 
255
252
  ## Installation
256
253
 
257
- LION maintains minimal dependencies for maximum reliability:
258
-
259
- ```bash
260
- uv pip install lionagi
254
+ ```
255
+ pip install lionagi
261
256
  ```
262
257
 
263
258
  Dependencies:
264
- - litellm
265
- - jinja2
266
- - pandas
267
- - pillow
268
- - python-dotenv
269
-
259
+ litellm
260
+ jinja2
261
+ pandas
262
+ pillow
263
+ python-dotenv
270
264
 
271
265
  ## Quick Start
272
-
273
266
  ```python
274
- from lionagi import iModel, Branch
267
+ from lionagi import Branch, iModel
275
268
 
276
- # Initialize model
277
- gpt4o = iModel(provider="openai", task="chat", model="gpt-4o")
269
+ # Pick a model
270
+ gpt4o = iModel(provider="openai", model="gpt-4o")
278
271
 
272
+ # Create a Branch (conversation context)
279
273
  hunter = Branch(
280
- system="you are a hilarious dragon hunter who responds in 10 words rhymes",
281
- imodel=gpt4o,
274
+ system="you are a hilarious dragon hunter who responds in 10 words rhymes.",
275
+ chat_model=gpt4o,
282
276
  )
283
277
 
284
- # Chat asynchronously
285
- print(await hunter.communicate("I am a dragon"))
278
+ # Communicate asynchronously
279
+ response = await hunter.communicate("I am a dragon")
280
+ print(response)
286
281
  ```
287
282
 
288
283
  ```
289
284
  You claim to be a dragon, oh what a braggin'!
290
285
  ```
286
+ ### Structured Responses
291
287
 
292
- ## 📦 Features
293
-
294
- ### 1. Model Agnostic Structured Output
295
-
296
- LION provides a unified interface for interacting with any AI model, regardless of the underlying architecture. This allows you to easily switch between models without changing your code.
288
+ Use Pydantic to keep outputs structured:
297
289
 
298
290
  ```python
299
291
  from pydantic import BaseModel
300
292
 
301
293
  class Joke(BaseModel):
302
- joke: str
294
+ joke: str
303
295
 
304
- sonnet = iModel(
305
- provider="anthropic",
306
- model="claude-3-5-sonnet-20241022",
307
- max_tokens=100, # max_tokens is required for anthropic models
296
+ res = await hunter.communicate(
297
+ "Tell me a short dragon joke",
298
+ response_format=Joke
308
299
  )
309
-
310
- response = await hunter.communicate(
311
- instruction="I am a dragon",
312
- response_format=Joke, # structured output in given pydantic model
313
- clear_messages=True, # refresh the conversation
314
- imodel=sonnet, # use sonnet model, which doesn't support structured output
315
- )
316
-
317
300
  print(type(response))
318
301
  print(response.joke)
319
302
  ```
320
-
321
303
  ```
322
304
  <class '__main__.Joke'>
323
- Joke(joke='With fiery claws, dragons hide their laughter flaws!')
305
+ With fiery claws, dragons hide their laughter flaws!
324
306
  ```
325
307
 
308
+ ### ReAct and Tools
326
309
 
327
- ### 2. Complete Observability
310
+ LionAGI supports advanced multi-step reasoning with ReAct. Tools let the LLM invoke external actions:
328
311
 
329
312
  ```python
330
- # using perplexity model
331
- pplx_small = iModel(
332
- provider="perplexity",
333
- task="chat/completions",
334
- model="llama-3.1-sonar-small-128k-online",
335
- max_tokens=1000,
336
- )
337
-
338
- b = await hunter.communicate(
339
- instruction="What makes a well-behaved dragon?",
340
- clear_messages=True, # refresh the conversation
341
- imodel=pplx_small, # use perplexity model
313
+ from lionagi.tools.types import ReaderTool
314
+
315
+ branch = Branch(chat_model=gpt4o, tools=ReaderTool)
316
+ result = await branch.ReAct(
317
+ instruct={
318
+ "instruction": "Summarize my PDF and compare with relevant papers.",
319
+ "context": {"paper_file_path": "/path/to/paper.pdf"},
320
+ },
321
+ extension_allowed=True, # allow multi-round expansions
322
+ max_extensions=5,
323
+ verbose=True, # see step-by-step chain-of-thought
342
324
  )
343
-
344
- print(b)
345
- ```
346
-
347
- ```
348
- A well-behaved dragon is one that's calm and bright,
349
- No stress or fear, just a peaceful night.
350
- It's active, not lethargic, with a happy face,
351
- And behaviors like digging, not a frantic pace.
352
- It's social, friendly, and never a fright,
353
- Just a gentle soul, shining with delight
354
- ```
355
-
356
- ```python
357
- hunter.msgs.last_response.model_response
358
- ```
359
-
360
- ```
361
- {'id': '1be10f4c-0936-4050-ab48-91bd86ab11a5',
362
- 'model': 'llama-3.1-sonar-small-128k-online',
363
- 'object': 'chat.completion',
364
- 'created': 1734369700,
365
- 'choices': [{'index': 0,
366
- 'message': {'role': 'assistant',
367
- 'content': "A well-behaved dragon is one that's calm and bright,\nNo stress or fear, just a peaceful night.\nIt's active, not lethargic, with a happy face,\nAnd behaviors like digging, not a frantic pace.\nIt's social, friendly, and never a fright,\nJust a gentle soul, shining with delight"},
368
- 'finish_reason': 'stop',
369
- 'delta': {'role': 'assistant', 'content': ''}}],
370
- 'usage': {'prompt_tokens': 40, 'completion_tokens': 69, 'total_tokens': 109},
371
- 'citations': [{'url': 'https://dragonsdiet.com/blogs/dragon-care/15-bearded-dragon-behaviors-and-what-they-could-mean'},
372
- {'url': 'https://masterbraeokk.tripod.com/dragons/behavior.html'},
373
- {'url': 'https://files.eric.ed.gov/fulltext/ED247607.pdf'},
374
- {'url': 'https://www.travelchinaguide.com/intro/social_customs/zodiac/dragon/five-elements.htm'},
375
- {'url': 'https://www.travelchinaguide.com/intro/social_customs/zodiac/dragon/'}]}
325
+ print(result)
376
326
  ```
377
327
 
328
+ The LLM can now open the PDF, read in slices, fetch references, and produce a final structured summary.
378
329
 
379
- ### 3. Easy composition of complex workflows
380
-
330
+ ### Observability & Debugging
331
+ - Inspect messages:
381
332
  ```python
382
- # chain of thoughts
383
- from pydantic import Field
384
-
385
- class Reason(BaseModel):
386
- reason: str
387
- confidence_score: float
388
-
389
- class Thought(BaseModel):
390
- thought: str
391
-
392
- class Analysis(BaseModel):
393
- thought: list[Thought] = Field(
394
- default_factory=list,
395
- description="concise Chain of thoughts from you, 3 step, each in 8 words"
396
- )
397
- analysis: str = Field(
398
- ...,
399
- description="Final analysis of the dragon's psyche in 20 words",
400
- )
401
- reason: list[Reason] = Field(
402
- default_factory=list,
403
- description="Concise Reasoning behind the analysis, 3 support, each in 8 words"
404
- )
405
-
406
- context1 = "I am a dragon, I think therefore I am, I suffer from shiny objects syndrome"
407
- context2 = "I like food and poetry, I use uv sometimes, it's cool but I am not familiar with pip"
408
-
409
- async def analyze(context) -> Analysis:
410
- psychologist = Branch(
411
- system="you are a renowned dragon psychologist",
412
- imodel=gpt4o,
413
- )
414
- return await psychologist.communicate(
415
- instruction="analyze the dragon's psyche using chain of thoughts",
416
- guidance="think step by step, reason with logic",
417
- context=context,
418
- response_format=Analysis,
419
- )
420
-
333
+ df = branch.to_df()
334
+ print(df.tail())
421
335
  ```
336
+ - Action logs show each tool call, arguments, and outcomes.
337
+ - Verbose ReAct provides chain-of-thought analysis (helpful for debugging multi-step flows).
422
338
 
423
- ```python
424
- result1 = await analyze(context1)
425
-
426
- print("\nThoughts:")
427
- for i in result1.thought:
428
- print(i.thought)
429
-
430
- print("\nAnalysis:")
431
- print(result1.analysis)
432
-
433
- print("\nReasoning:")
434
- for i in result1.reason:
435
- print(i.reason)
436
- ```
437
-
438
- ```
439
-
440
- Thoughts:
441
- Dragons are attracted to shiny objects naturally.
442
- This suggests a strong affinity for hoarding.
443
- Reflects the dragon's inherent desire for possession.
444
-
445
- Analysis:
446
- The dragon demonstrates a compulsive hoarding behavior linked to attraction for shiny objects.
447
-
448
- Reasoning:
449
- Shiny objects trigger instinctual hoarding behavior.
450
- Possession indicates a symbol of power and security.
451
- Hoarding is reinforced by evolutionary survival mechanisms.
452
- ```
339
+ ### Example: Multi-Model Orchestration
453
340
 
454
341
  ```python
455
- result2 = await analyze(context2)
342
+ from lionagi import Branch, iModel
456
343
 
457
- print("\nThoughts:")
458
- for i in result2.thought:
459
- print(i.thought)
460
-
461
- print("\nAnalysis:")
462
- print(result2.analysis)
344
+ gpt4o = iModel(provider="openai", model="gpt-4o")
345
+ sonnet = iModel(
346
+ provider="anthropic",
347
+ model="claude-3-5-sonnet-20241022",
348
+ max_tokens=1000, # max_tokens is required for anthropic models
349
+ )
463
350
 
464
- print("\nReasoning:")
465
- for i in result2.reason:
466
- print(i.reason)
351
+ branch = Branch(chat_model=gpt4o)
352
+ # Switch mid-flow
353
+ analysis = await branch.communicate("Analyze these stats", imodel=sonnet)
467
354
  ```
468
355
 
469
- ```
470
- Thoughts:
471
- Dragon enjoys both food and poetry regularly.
472
- Dragon uses uv light with frequent interest.
473
- Dragon is unfamiliar and not comfortable with pip.
474
-
475
- Analysis:
476
- The dragon is curious and exploratory, yet selectively cautious about unfamiliar methodologies.
477
-
478
- Reasoning:
479
- Preference for food and poetry suggests curiosity.
480
- Frequent uv light use indicates exploratory nature.
481
- Discomfort with pip usage shows selective caution.
482
- ```
356
+ Seamlessly route to different models in the same workflow.
483
357
 
358
+ ## Community & Contributing
484
359
 
360
+ We welcome issues, ideas, and pull requests:
361
+ - Discord: Join to chat or get help
362
+ - Issues / PRs: GitHub
485
363
 
486
- ## 🌟 Example Workflow
487
-
488
- Below is an example of what you can build with LION. Note that these are sample implementations - LION provides the building blocks, you create the workflows that fit your needs.
489
-
490
- ```mermaid
491
- sequenceDiagram
492
- autonumber
493
- participant Client
494
- participant Orchestrator
495
- participant ResearchAgent
496
- participant AnalysisAgent
497
- participant ValidationAgent
498
- participant Tools
499
-
500
- Client->>+Orchestrator: Submit Complex Task
501
- Note over Orchestrator: Task Analysis & Planning
502
-
503
- %% Research Phase
504
- Orchestrator->>+ResearchAgent: Delegate Research
505
- activate ResearchAgent
506
- ResearchAgent->>Tools: Access Data Sources
507
- Tools-->>ResearchAgent: Raw Data
508
- ResearchAgent-->>-Orchestrator: Research Results
509
- deactivate ResearchAgent
510
-
511
- %% Analysis Phase
512
- Orchestrator->>+AnalysisAgent: Process Data
513
- activate AnalysisAgent
514
- AnalysisAgent->>Tools: Apply Models
515
- Tools-->>AnalysisAgent: Analysis Results
516
- AnalysisAgent-->>-Orchestrator: Processed Insights
517
- deactivate AnalysisAgent
518
-
519
- %% Validation Phase
520
- Orchestrator->>+ValidationAgent: Verify Results
521
- activate ValidationAgent
522
- ValidationAgent->>Tools: Apply Safety Checks
523
- Tools-->>ValidationAgent: Validation Status
524
- ValidationAgent-->>-Orchestrator: Verified Results
525
- deactivate ValidationAgent
526
-
527
- Orchestrator-->>-Client: Return Validated Output
364
+ ### Citation
528
365
  ```
529
-
530
-
531
- ## 🤝 Contributing
532
-
533
- Join our [Discord community](https://discord.gg/aqSJ2v46vu) to:
534
- - Share ideas
535
- - Report issues
536
- - Contribute code
537
- - Learn from others
538
-
539
- ## 📚 Citation
540
-
541
- ```bibtex
542
366
  @software{Li_LionAGI_2023,
543
367
  author = {Haiyang Li},
544
368
  month = {12},
@@ -547,3 +371,6 @@ Join our [Discord community](https://discord.gg/aqSJ2v46vu) to:
547
371
  url = {https://github.com/lion-agi/lionagi},
548
372
  }
549
373
  ```
374
+
375
+ **🦁 LionAGI**
376
+ > Because real AI orchestration demands more than a single prompt. Try it out and discover the next evolution in structured, multi-model, safe AI.
@@ -0,0 +1,145 @@
1
+ ![PyPI - Version](https://img.shields.io/pypi/v/lionagi?labelColor=233476aa&color=231fc935)
2
+ ![PyPI - Downloads](https://img.shields.io/pypi/dm/lionagi?color=blue)
3
+ ![Python Version](https://img.shields.io/badge/python-3.10%2B-blue)
4
+
5
+ [Documentation](https://lion-agi.github.io/lionagi/) | [Discord](https://discord.gg/aqSJ2v46vu) | [PyPI](https://pypi.org/project/lionagi/) | [Roadmap](https://trello.com/b/3seomsrI/lionagi)
6
+
7
+ # LION - Language InterOperable Network
8
+
9
+ ## An Intelligence Operating System
10
+
11
+ LionAGI is a robust framework for orchestrating multi-step AI operations with precise control. Bring together multiple models, advanced ReAct reasoning, tool integrations, and custom validations in a single coherent pipeline.
12
+
13
+ ## Why LionAGI?
14
+
15
+ - **Structured**: LLM interactions are validated and typed (via Pydantic).
16
+ - **Expandable**: Integrate multiple providers (OpenAI, Anthropic, Perplexity, custom) with minimal friction.
17
+ - **Controlled**: Built-in safety checks, concurrency strategies, and advanced multi-step flows—like ReAct with verbose outputs.
18
+ - **Transparent**: Real-time logging, message introspection, and easy debugging of tool usage.
19
+
20
+
21
+ ## Installation
22
+
23
+ ```
24
+ pip install lionagi
25
+ ```
26
+
27
+ Dependencies:
28
+ • litellm
29
+ • jinja2
30
+ • pandas
31
+ • pillow
32
+ • python-dotenv
33
+
34
+ ## Quick Start
35
+ ```python
36
+ from lionagi import Branch, iModel
37
+
38
+ # Pick a model
39
+ gpt4o = iModel(provider="openai", model="gpt-4o")
40
+
41
+ # Create a Branch (conversation context)
42
+ hunter = Branch(
43
+ system="you are a hilarious dragon hunter who responds in 10 words rhymes.",
44
+ chat_model=gpt4o,
45
+ )
46
+
47
+ # Communicate asynchronously
48
+ response = await hunter.communicate("I am a dragon")
49
+ print(response)
50
+ ```
51
+
52
+ ```
53
+ You claim to be a dragon, oh what a braggin'!
54
+ ```
55
+ ### Structured Responses
56
+
57
+ Use Pydantic to keep outputs structured:
58
+
59
+ ```python
60
+ from pydantic import BaseModel
61
+
62
+ class Joke(BaseModel):
63
+ joke: str
64
+
65
+ res = await hunter.communicate(
66
+ "Tell me a short dragon joke",
67
+ response_format=Joke
68
+ )
69
+ print(type(response))
70
+ print(response.joke)
71
+ ```
72
+ ```
73
+ <class '__main__.Joke'>
74
+ With fiery claws, dragons hide their laughter flaws!
75
+ ```
76
+
77
+ ### ReAct and Tools
78
+
79
+ LionAGI supports advanced multi-step reasoning with ReAct. Tools let the LLM invoke external actions:
80
+
81
+ ```python
82
+ from lionagi.tools.types import ReaderTool
83
+
84
+ branch = Branch(chat_model=gpt4o, tools=ReaderTool)
85
+ result = await branch.ReAct(
86
+ instruct={
87
+ "instruction": "Summarize my PDF and compare with relevant papers.",
88
+ "context": {"paper_file_path": "/path/to/paper.pdf"},
89
+ },
90
+ extension_allowed=True, # allow multi-round expansions
91
+ max_extensions=5,
92
+ verbose=True, # see step-by-step chain-of-thought
93
+ )
94
+ print(result)
95
+ ```
96
+
97
+ The LLM can now open the PDF, read in slices, fetch references, and produce a final structured summary.
98
+
99
+ ### Observability & Debugging
100
+ - Inspect messages:
101
+ ```python
102
+ df = branch.to_df()
103
+ print(df.tail())
104
+ ```
105
+ - Action logs show each tool call, arguments, and outcomes.
106
+ - Verbose ReAct provides chain-of-thought analysis (helpful for debugging multi-step flows).
107
+
108
+ ### Example: Multi-Model Orchestration
109
+
110
+ ```python
111
+ from lionagi import Branch, iModel
112
+
113
+ gpt4o = iModel(provider="openai", model="gpt-4o")
114
+ sonnet = iModel(
115
+ provider="anthropic",
116
+ model="claude-3-5-sonnet-20241022",
117
+ max_tokens=1000, # max_tokens is required for anthropic models
118
+ )
119
+
120
+ branch = Branch(chat_model=gpt4o)
121
+ # Switch mid-flow
122
+ analysis = await branch.communicate("Analyze these stats", imodel=sonnet)
123
+ ```
124
+
125
+ Seamlessly route to different models in the same workflow.
126
+
127
+ ## Community & Contributing
128
+
129
+ We welcome issues, ideas, and pull requests:
130
+ - Discord: Join to chat or get help
131
+ - Issues / PRs: GitHub
132
+
133
+ ### Citation
134
+ ```
135
+ @software{Li_LionAGI_2023,
136
+ author = {Haiyang Li},
137
+ month = {12},
138
+ year = {2023},
139
+ title = {LionAGI: Towards Automated General Intelligence},
140
+ url = {https://github.com/lion-agi/lionagi},
141
+ }
142
+ ```
143
+
144
+ **🦁 LionAGI**
145
+ > Because real AI orchestration demands more than a single prompt. Try it out and discover the next evolution in structured, multi-model, safe AI.
@@ -28,8 +28,8 @@ async def ReAct(
28
28
  tools: Any = None,
29
29
  tool_schemas: Any = None,
30
30
  response_format: type[BaseModel] | BaseModel = None,
31
- extension_allowed: bool = False,
32
- max_extensions: int | None = None,
31
+ extension_allowed: bool = True,
32
+ max_extensions: int | None = 3,
33
33
  response_kwargs: dict | None = None,
34
34
  return_analysis: bool = False,
35
35
  analysis_model: iModel | None = None,
@@ -54,6 +54,8 @@ async def ReAct(
54
54
  sample_writing=interpret_sample,
55
55
  **(interpret_kwargs or {}),
56
56
  )
57
+ if verbose_analysis:
58
+ print(f"Interpreted instruction: {instruction_str}")
57
59
 
58
60
  # Convert Instruct to dict if necessary
59
61
  instruct_dict = (
@@ -92,9 +94,11 @@ async def ReAct(
92
94
  )
93
95
 
94
96
  # Validate and clamp max_extensions if needed
95
- if max_extensions and max_extensions > 5:
96
- logging.warning("max_extensions should not exceed 5; defaulting to 5.")
97
- max_extensions = 5
97
+ if max_extensions and max_extensions > 100:
98
+ logging.warning(
99
+ "max_extensions should not exceed 100; defaulting to 100."
100
+ )
101
+ max_extensions = 100
98
102
 
99
103
  # Step 2: Possibly loop through expansions if extension_needed
100
104
  extensions = max_extensions
@@ -208,7 +208,7 @@ class ReaderTool(LionTool):
208
208
  e = min(length, end if end is not None else length)
209
209
 
210
210
  try:
211
- with open(path, "r", encoding="utf-8") as f:
211
+ with open(path, encoding="utf-8") as f:
212
212
  f.seek(s)
213
213
  content = f.read(e - s)
214
214
  except Exception as ex:
@@ -0,0 +1 @@
1
+ __version__ = "0.8.7"
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "lionagi"
3
- version = "0.8.6"
3
+ version = "0.8.7"
4
4
  description = "An Intelligence Operating System."
5
5
  authors = [
6
6
  { name = "HaiyangLi", email = "quantocean.li@gmail.com" },
@@ -1222,7 +1222,7 @@ wheels = [
1222
1222
 
1223
1223
  [[package]]
1224
1224
  name = "lionagi"
1225
- version = "0.8.6"
1225
+ version = "0.8.7"
1226
1226
  source = { editable = "." }
1227
1227
  dependencies = [
1228
1228
  { name = "aiocache" },