uipath-langchain 0.0.146__tar.gz → 0.0.148__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.

Potentially problematic release.


This version of uipath-langchain might be problematic. Click here for more details.

Files changed (301) hide show
  1. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/PKG-INFO +2 -2
  2. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/pyproject.toml +2 -2
  3. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_utils/_request_mixin.py +6 -2
  4. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/__init__.py +4 -3
  5. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/agent.py +6 -3
  6. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/init_node.py +1 -1
  7. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/llm_node.py +1 -1
  8. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/router.py +1 -1
  9. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/terminate_node.py +1 -1
  10. uipath_langchain-0.0.146/src/uipath_langchain/agent/react/state.py → uipath_langchain-0.0.148/src/uipath_langchain/agent/react/types.py +7 -0
  11. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/vectorstores/context_grounding_vectorstore.py +89 -109
  12. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/uv.lock +113 -113
  13. uipath_langchain-0.0.146/src/uipath_langchain/tools/__init__.py +0 -0
  14. uipath_langchain-0.0.146/src/uipath_langchain/tools/preconfigured.py +0 -220
  15. uipath_langchain-0.0.146/tests/tools/__init__.py +0 -1
  16. uipath_langchain-0.0.146/tests/tools/conftest.py +0 -72
  17. uipath_langchain-0.0.146/tests/tools/mocks/agent_definition.json +0 -226
  18. uipath_langchain-0.0.146/tests/tools/test_preconfigured.py +0 -94
  19. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.cursorrules +0 -0
  20. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.editorconfig +0 -0
  21. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.gitattributes +0 -0
  22. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/cd.yml +0 -0
  23. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/ci.yml +0 -0
  24. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/commitlint.yml +0 -0
  25. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/integration_tests.yml +0 -0
  26. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/lint-custom-version.yml +0 -0
  27. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/lint.yml +0 -0
  28. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/publish-dev.yml +0 -0
  29. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/publish-docs.yml +0 -0
  30. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/publish-prior-stable-version.yml +0 -0
  31. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/slack.yml +0 -0
  32. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/test-custom-version.yml +0 -0
  33. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.github/workflows/test.yml +0 -0
  34. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.gitignore +0 -0
  35. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.pre-commit-config.yaml +0 -0
  36. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.python-version +0 -0
  37. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.vscode/extensions.json +0 -0
  38. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/.vscode/settings.json +0 -0
  39. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/CONTRIBUTING.md +0 -0
  40. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/LICENSE +0 -0
  41. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/README.md +0 -0
  42. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/chat_models.md +0 -0
  43. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/context_grounding.md +0 -0
  44. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/human_in_the_loop.md +0 -0
  45. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/quick_start.md +0 -0
  46. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/quick_start_images/cloud_env_var_dark.png +0 -0
  47. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/quick_start_images/cloud_env_var_light.png +0 -0
  48. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/quick_start_images/invoke_output_dark.png +0 -0
  49. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/quick_start_images/invoke_output_light.png +0 -0
  50. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/click-storage-bucket.png +0 -0
  51. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/create-index-1.png +0 -0
  52. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/create-index-2.png +0 -0
  53. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/create-process.png +0 -0
  54. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/create-quiz-generator.png +0 -0
  55. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/create-storage-bucket-1.png +0 -0
  56. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/create-storage-bucket-2.png +0 -0
  57. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/folder-path.png +0 -0
  58. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/job-info.png +0 -0
  59. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/output.png +0 -0
  60. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/process-page.png +0 -0
  61. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/researcher-1.png +0 -0
  62. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/researcher-2.png +0 -0
  63. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/run-process-1.png +0 -0
  64. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/run-process-2.png +0 -0
  65. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/RAG/storage-bucket-content.png +0 -0
  66. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/multi-agent-distributed/coder-agent-package-overview.png +0 -0
  67. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/multi-agent-distributed/coder-agent-process-configuration.png +0 -0
  68. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/multi-agent-distributed/planner-agent-package-overview.png +0 -0
  69. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/multi-agent-distributed/planner-agent-process-configuration.png +0 -0
  70. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/multi-agent-distributed/researcher-agent-package-overview.png +0 -0
  71. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/multi-agent-distributed/researcher-agent-process-configuration.png +0 -0
  72. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/activate-apps.png +0 -0
  73. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/activate-deployment.png +0 -0
  74. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/copy-folder-path.png +0 -0
  75. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/deploy-solution-package-wizard.png +0 -0
  76. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/deploy-solution-package.png +0 -0
  77. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/monitor-agent.png +0 -0
  78. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/navigate-to-solution-folder.png +0 -0
  79. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/resume-condition.png +0 -0
  80. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/run-agent.png +0 -0
  81. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/solution-destination-folder.png +0 -0
  82. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/start-job.png +0 -0
  83. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/docs/sample_images/ticket-classification/upload-solution-package.png +0 -0
  84. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/README.md +0 -0
  85. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/env.example +0 -0
  86. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/input.example/quiz-generator-debug-input.json +0 -0
  87. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/input.example/researcher-debug-input.json +0 -0
  88. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/langgraph.json +0 -0
  89. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/pyproject.toml +0 -0
  90. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/quiz-generator-RAG-agent.mermaid +0 -0
  91. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/researcher-RAG-agent.mermaid +0 -0
  92. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/src/agents/quiz-generator-RAG-agent.py +0 -0
  93. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/src/agents/researcher-RAG-agent.py +0 -0
  94. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/uipath.json +0 -0
  95. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/RAG-quiz-generator/uv.lock +0 -0
  96. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/README.md +0 -0
  97. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/calculator-agent/graph.py +0 -0
  98. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/calculator-agent/langgraph.json +0 -0
  99. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/calculator-agent/pyproject.toml +0 -0
  100. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/calculator-agent/uipath.json +0 -0
  101. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/calculator-agent/uv.lock +0 -0
  102. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/chat-agent/.env.example +0 -0
  103. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/chat-agent/agent.mermaid +0 -0
  104. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/chat-agent/graph.py +0 -0
  105. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/chat-agent/langgraph.json +0 -0
  106. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/chat-agent/pyproject.toml +0 -0
  107. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/chat-agent/uipath.json +0 -0
  108. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/chat-agent/uv.lock +0 -0
  109. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/company-research-agent/.env.example +0 -0
  110. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/company-research-agent/agent.mermaid +0 -0
  111. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/company-research-agent/graph.py +0 -0
  112. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/company-research-agent/langgraph.json +0 -0
  113. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/company-research-agent/pyproject.toml +0 -0
  114. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/company-research-agent/uipath.json +0 -0
  115. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/company-research-agent/uv.lock +0 -0
  116. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/.env.template +0 -0
  117. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/.python-version +0 -0
  118. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/.vscode/launch.json +0 -0
  119. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/README.md +0 -0
  120. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/agent.mermaid +0 -0
  121. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/input.json +0 -0
  122. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/langgraph.json +0 -0
  123. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/pyproject.toml +0 -0
  124. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/src/email_organizer/__init__.py +0 -0
  125. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/src/email_organizer/main.py +0 -0
  126. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/src/email_organizer/outlook_client.py +0 -0
  127. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/uipath.json +0 -0
  128. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/email-organizer-agent/uv.lock +0 -0
  129. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/hitl-inbox-server/database.py +0 -0
  130. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/hitl-inbox-server/main.py +0 -0
  131. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/hitl-inbox-server/models.py +0 -0
  132. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/hitl-inbox-server/pyproject.toml +0 -0
  133. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/hitl-inbox-server/schemas.py +0 -0
  134. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/hitl-inbox-server/templates/index.html +0 -0
  135. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/hitl-inbox-server/uv.lock +0 -0
  136. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/.env.example +0 -0
  137. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/README.md +0 -0
  138. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/coder.mermaid +0 -0
  139. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/langgraph.json +0 -0
  140. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/planner.mermaid +0 -0
  141. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/pyproject.toml +0 -0
  142. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/researcher.mermaid +0 -0
  143. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/coder.py +0 -0
  144. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/planner.py +0 -0
  145. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/researcher.py +0 -0
  146. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/uipath.json +0 -0
  147. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-planner-researcher-coder-distributed/uv.lock +0 -0
  148. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-supervisor-researcher-coder/.env.example +0 -0
  149. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-supervisor-researcher-coder/README.md +0 -0
  150. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-supervisor-researcher-coder/agent.mermaid +0 -0
  151. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-supervisor-researcher-coder/graph.py +0 -0
  152. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-supervisor-researcher-coder/langgraph.json +0 -0
  153. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-supervisor-researcher-coder/pyproject.toml +0 -0
  154. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-supervisor-researcher-coder/uipath.json +0 -0
  155. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/multi-agent-supervisor-researcher-coder/uv.lock +0 -0
  156. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/oauth-external-apps-agent/.env.example +0 -0
  157. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/oauth-external-apps-agent/README.md +0 -0
  158. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/oauth-external-apps-agent/input.json +0 -0
  159. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/oauth-external-apps-agent/langgraph.json +0 -0
  160. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/oauth-external-apps-agent/main.py +0 -0
  161. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/oauth-external-apps-agent/pyproject.toml +0 -0
  162. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/oauth-external-apps-agent/uv.lock +0 -0
  163. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/retrieval-chain/.env.example +0 -0
  164. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/retrieval-chain/README.md +0 -0
  165. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/retrieval-chain/main.py +0 -0
  166. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/retrieval-chain/pyproject.toml +0 -0
  167. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/retrieval-chain/uipath.json +0 -0
  168. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/retrieval-chain/uv.lock +0 -0
  169. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/.env.example +0 -0
  170. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/README.md +0 -0
  171. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/agent.mermaid +0 -0
  172. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/langgraph.json +0 -0
  173. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/pyproject.toml +0 -0
  174. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/src/simple-local-mcp/graph.py +0 -0
  175. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/src/simple-local-mcp/math_server.py +0 -0
  176. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/src/simple-local-mcp/weather_server.py +0 -0
  177. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/uipath.json +0 -0
  178. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-local-mcp/uv.lock +0 -0
  179. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-remote-mcp/.env.example +0 -0
  180. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-remote-mcp/README.md +0 -0
  181. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-remote-mcp/agent.mermaid +0 -0
  182. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-remote-mcp/langgraph.json +0 -0
  183. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-remote-mcp/main.py +0 -0
  184. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-remote-mcp/pyproject.toml +0 -0
  185. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-remote-mcp/uipath.json +0 -0
  186. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/simple-remote-mcp/uv.lock +0 -0
  187. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/.env.example +0 -0
  188. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/README.md +0 -0
  189. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/agent.mermaid +0 -0
  190. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/escalation_app_solution/generic-escalation-app-solution-1.0.0.zip +0 -0
  191. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/langgraph.json +0 -0
  192. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/main.py +0 -0
  193. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/pyproject.toml +0 -0
  194. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/uipath.json +0 -0
  195. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/samples/ticket-classification/uv.lock +0 -0
  196. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/__init__.py +0 -0
  197. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/__init__.py +0 -0
  198. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_runtime/_context.py +0 -0
  199. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_runtime/_conversation.py +0 -0
  200. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_runtime/_exception.py +0 -0
  201. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_runtime/_graph_resolver.py +0 -0
  202. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_runtime/_input.py +0 -0
  203. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_runtime/_output.py +0 -0
  204. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_runtime/_runtime.py +0 -0
  205. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_templates/langgraph.json.template +0 -0
  206. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_templates/main.py.template +0 -0
  207. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_utils/_graph.py +0 -0
  208. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/_utils/_schema.py +0 -0
  209. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/cli_debug.py +0 -0
  210. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/cli_dev.py +0 -0
  211. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/cli_eval.py +0 -0
  212. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/cli_init.py +0 -0
  213. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/cli_new.py +0 -0
  214. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_cli/cli_run.py +0 -0
  215. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_resources/AGENTS.md +0 -0
  216. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_resources/REQUIRED_STRUCTURE.md +0 -0
  217. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_tracing/__init__.py +0 -0
  218. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_tracing/_instrument_traceable.py +0 -0
  219. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_tracing/_utils.py +0 -0
  220. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_utils/__init__.py +0 -0
  221. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_utils/_settings.py +0 -0
  222. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/_utils/_sleep_policy.py +0 -0
  223. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/constants.py +0 -0
  224. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/exceptions.py +0 -0
  225. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/tools/__init__.py +0 -0
  226. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/tools/tools.py +0 -0
  227. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/react/utils.py +0 -0
  228. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/tools/__init__.py +0 -0
  229. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/tools/context_tool.py +0 -0
  230. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/tools/process_tool.py +0 -0
  231. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/tools/tool_factory.py +0 -0
  232. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/tools/tool_node.py +0 -0
  233. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/agent/tools/utils.py +0 -0
  234. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/chat/__init__.py +0 -0
  235. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/chat/models.py +0 -0
  236. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/embeddings/__init__.py +0 -0
  237. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/embeddings/embeddings.py +0 -0
  238. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/middlewares.py +0 -0
  239. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/py.typed +0 -0
  240. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/retrievers/__init__.py +0 -0
  241. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/retrievers/context_grounding_retriever.py +0 -0
  242. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/runtime_factories.py +0 -0
  243. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/src/uipath_langchain/vectorstores/__init__.py +0 -0
  244. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/common/trace_assert.py +0 -0
  245. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/common/validate_output.sh +0 -0
  246. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/expected_raw.json +0 -0
  247. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/expected_traces.json +0 -0
  248. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/input.json +0 -0
  249. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/langgraph.json +0 -0
  250. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/pyproject.toml +0 -0
  251. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/run.sh +0 -0
  252. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/src/assert.py +0 -0
  253. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/src/graph.py +0 -0
  254. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/company-research-agent/uv.lock +0 -0
  255. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/init-flow/expected_traces.json +0 -0
  256. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/init-flow/input.json +0 -0
  257. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/init-flow/pyproject.toml +0 -0
  258. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/init-flow/run.sh +0 -0
  259. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/init-flow/src/assert.py +0 -0
  260. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/expected_traces.json +0 -0
  261. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/input.json +0 -0
  262. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/langgraph.json +0 -0
  263. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/pyproject.toml +0 -0
  264. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/run.sh +0 -0
  265. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/src/assert.py +0 -0
  266. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/src/simple-local-mcp/graph.py +0 -0
  267. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/src/simple-local-mcp/math_server.py +0 -0
  268. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/src/simple-local-mcp/weather_server.py +0 -0
  269. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/simple-local-mcp/uv.lock +0 -0
  270. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/expected_traces.json +0 -0
  271. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/input.json +0 -0
  272. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/langgraph.json +0 -0
  273. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/pyproject.toml +0 -0
  274. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/raw_traces.jsonl +0 -0
  275. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/run.sh +0 -0
  276. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/src/assert.py +0 -0
  277. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/src/main.py +0 -0
  278. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/testcases/ticket-classification/uv.lock +0 -0
  279. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/__init__.py +0 -0
  280. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/agent/react/__init__.py +0 -0
  281. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/agent/react/test_utils.py +0 -0
  282. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/cli/conftest.py +0 -0
  283. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/cli/mocks/langgraph.json +0 -0
  284. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/cli/mocks/simple_agent.py +0 -0
  285. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/cli/mocks/uipath.json +0 -0
  286. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/cli/test_init.py +0 -0
  287. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/cli/test_run.py +0 -0
  288. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/cli/test_schema.py +0 -0
  289. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/__init__.py +0 -0
  290. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/conftest.py +0 -0
  291. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/mocks/action_trigger_hitl.py +0 -0
  292. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/mocks/api_trigger_hitl.py +0 -0
  293. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/mocks/job_trigger_hitl.py +0 -0
  294. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/mocks/langgraph.json +0 -0
  295. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/mocks/uipath-default-escalation.json +0 -0
  296. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/mocks/uipath.json +0 -0
  297. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/test_action_trigger.py +0 -0
  298. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/test_hitl_api_trigger.py +0 -0
  299. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/test_hitl_default_escalation.py +0 -0
  300. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/hitl/test_hitl_job_trigger.py +0 -0
  301. {uipath_langchain-0.0.146 → uipath_langchain-0.0.148}/tests/test_dummy.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath-langchain
3
- Version: 0.0.146
3
+ Version: 0.0.148
4
4
  Summary: UiPath Langchain
5
5
  Project-URL: Homepage, https://uipath.com
6
6
  Project-URL: Repository, https://github.com/UiPath/uipath-langchain-python
@@ -26,7 +26,7 @@ Requires-Dist: openai>=1.65.5
26
26
  Requires-Dist: openinference-instrumentation-langchain>=0.1.50
27
27
  Requires-Dist: pydantic-settings>=2.6.0
28
28
  Requires-Dist: python-dotenv>=1.0.1
29
- Requires-Dist: uipath<2.2.0,>=2.1.110
29
+ Requires-Dist: uipath<2.2.0,>=2.1.123
30
30
  Provides-Extra: langchain
31
31
  Description-Content-Type: text/markdown
32
32
 
@@ -1,11 +1,11 @@
1
1
  [project]
2
2
  name = "uipath-langchain"
3
- version = "0.0.146"
3
+ version = "0.0.148"
4
4
  description = "UiPath Langchain"
5
5
  readme = { file = "README.md", content-type = "text/markdown" }
6
6
  requires-python = ">=3.10"
7
7
  dependencies = [
8
- "uipath>=2.1.110, <2.2.0",
8
+ "uipath>=2.1.123, <2.2.0",
9
9
  "langgraph>=0.5.0, <0.7.0",
10
10
  "langchain-core>=0.3.34",
11
11
  "langgraph-checkpoint-sqlite>=2.0.3",
@@ -17,7 +17,11 @@ from tenacity import (
17
17
  stop_after_attempt,
18
18
  wait_exponential_jitter,
19
19
  )
20
- from uipath._cli._runtime._contracts import UiPathErrorCategory, UiPathRuntimeError
20
+ from uipath._cli._runtime._contracts import (
21
+ UiPathErrorCategory,
22
+ UiPathErrorCode,
23
+ UiPathRuntimeError,
24
+ )
21
25
  from uipath._utils._ssl_context import get_httpx_client_kwargs
22
26
 
23
27
  from uipath_langchain._cli._runtime._exception import (
@@ -59,7 +63,7 @@ def _get_access_token(data):
59
63
  return get_uipath_token_header(settings)
60
64
  except ValidationError:
61
65
  raise UiPathRuntimeError(
62
- code="AUTHENTICATION_REQUIRED",
66
+ UiPathErrorCode.AUTHENTICATION_REQUIRED,
63
67
  title="Authorization required",
64
68
  detail="Authorization required. Please run uipath auth",
65
69
  category=UiPathErrorCategory.USER,
@@ -1,12 +1,13 @@
1
1
  """UiPath ReAct Agent implementation"""
2
2
 
3
3
  from .agent import create_agent
4
- from .state import AgentGraphNode, AgentGraphState
4
+ from .types import AgentGraphConfig, AgentGraphNode, AgentGraphState
5
5
  from .utils import resolve_output_model
6
6
 
7
7
  __all__ = [
8
8
  "create_agent",
9
- "AgentGraphState",
10
- "AgentGraphNode",
11
9
  "resolve_output_model",
10
+ "AgentGraphNode",
11
+ "AgentGraphState",
12
+ "AgentGraphConfig",
12
13
  ]
@@ -18,11 +18,11 @@ from .llm_node import (
18
18
  from .router import (
19
19
  route_agent,
20
20
  )
21
- from .state import AgentGraphNode, AgentGraphState
22
21
  from .terminate_node import (
23
22
  create_terminate_node,
24
23
  )
25
24
  from .tools import create_flow_control_tools
25
+ from .types import AgentGraphConfig, AgentGraphNode, AgentGraphState
26
26
 
27
27
 
28
28
  def create_agent(
@@ -32,13 +32,16 @@ def create_agent(
32
32
  *,
33
33
  state_schema: Type[AgentGraphState] = AgentGraphState,
34
34
  response_format: type[BaseModel] | None = None,
35
- recursion_limit: int = 50,
35
+ config: AgentGraphConfig | None = None,
36
36
  ) -> StateGraph[AgentGraphState]:
37
37
  """Build agent graph with INIT -> AGENT <-> TOOLS loop, terminated by control flow tools.
38
38
 
39
39
  Control flow tools (end_execution, raise_error) are auto-injected alongside regular tools.
40
40
  """
41
- os.environ["LANGCHAIN_RECURSION_LIMIT"] = str(recursion_limit)
41
+ if config is None:
42
+ config = AgentGraphConfig()
43
+
44
+ os.environ["LANGCHAIN_RECURSION_LIMIT"] = str(config.recursion_limit)
42
45
 
43
46
  agent_tools = list(tools)
44
47
  flow_control_tools: list[BaseTool] = create_flow_control_tools(response_format)
@@ -4,7 +4,7 @@ from typing import Sequence
4
4
 
5
5
  from langchain_core.messages import HumanMessage, SystemMessage
6
6
 
7
- from .state import AgentGraphState
7
+ from .types import AgentGraphState
8
8
 
9
9
 
10
10
  def create_init_node(
@@ -7,7 +7,7 @@ from langchain_core.messages import AIMessage, AnyMessage
7
7
  from langchain_core.tools import BaseTool
8
8
 
9
9
  from .constants import MAX_SUCCESSIVE_COMPLETIONS
10
- from .state import AgentGraphState
10
+ from .types import AgentGraphState
11
11
  from .utils import count_successive_completions
12
12
 
13
13
 
@@ -7,7 +7,7 @@ from uipath.agent.react import END_EXECUTION_TOOL, RAISE_ERROR_TOOL
7
7
 
8
8
  from .constants import MAX_SUCCESSIVE_COMPLETIONS
9
9
  from .exceptions import AgentNodeRoutingException
10
- from .state import AgentGraphNode, AgentGraphState
10
+ from .types import AgentGraphNode, AgentGraphState
11
11
  from .utils import count_successive_completions
12
12
 
13
13
  FLOW_CONTROL_TOOLS = [END_EXECUTION_TOOL.name, RAISE_ERROR_TOOL.name]
@@ -11,7 +11,7 @@ from .exceptions import (
11
11
  AgentNodeRoutingException,
12
12
  AgentTerminationException,
13
13
  )
14
- from .state import AgentGraphState
14
+ from .types import AgentGraphState
15
15
 
16
16
 
17
17
  def create_terminate_node(
@@ -3,6 +3,7 @@ from __future__ import annotations
3
3
  from enum import StrEnum
4
4
 
5
5
  from langgraph.graph import MessagesState
6
+ from pydantic import BaseModel, Field
6
7
 
7
8
 
8
9
  class AgentGraphState(MessagesState):
@@ -16,3 +17,9 @@ class AgentGraphNode(StrEnum):
16
17
  AGENT = "agent"
17
18
  TOOLS = "tools"
18
19
  TERMINATE = "terminate"
20
+
21
+
22
+ class AgentGraphConfig(BaseModel):
23
+ recursion_limit: int = Field(
24
+ default=50, ge=1, description="Maximum recursion limit for the agent graph"
25
+ )
@@ -2,23 +2,17 @@
2
2
  Vector store implementation that connects to UiPath Context Grounding as a backend.
3
3
 
4
4
  This is a read-only vector store that uses the UiPath Context Grounding API to retrieve documents.
5
-
6
- You need to set the following environment variables (also see .env.example):
7
- ### - UIPATH_URL="https://alpha.uipath.com/{ORG_ID}/{TENANT_ID}"
8
- ### - UIPATH_ACCESS_TOKEN={BEARER_TOKEN_WITH_CONTEXT_GROUNDING_PERMISSIONS}
9
- ### - UIPATH_FOLDER_PATH="" - this can be left empty
10
- ### - UIPATH_FOLDER_KEY="" - this can be left empty
11
5
  """
12
6
 
13
7
  from collections.abc import Iterable
14
- from typing import Any, Optional, TypeVar
8
+ from typing import Any, Self
15
9
 
16
10
  from langchain_core.documents import Document
17
11
  from langchain_core.embeddings import Embeddings
18
12
  from langchain_core.vectorstores import VectorStore
13
+ from typing_extensions import override
19
14
  from uipath import UiPath
20
-
21
- VST = TypeVar("VST", bound="ContextGroundingVectorStore")
15
+ from uipath.models.context_grounding import ContextGroundingQueryResponse
22
16
 
23
17
 
24
18
  class ContextGroundingVectorStore(VectorStore):
@@ -26,42 +20,32 @@ class ContextGroundingVectorStore(VectorStore):
26
20
 
27
21
  This class provides a straightforward implementation that connects to the
28
22
  UiPath Context Grounding API for semantic searching.
29
-
30
- Example:
31
- .. code-block:: python
32
-
33
- from uipath_agents_gym.tools.ecs_vectorstore import ContextGroundingVectorStore
34
-
35
- # Initialize the vector store with an index name
36
- vectorstore = ContextGroundingVectorStore(index_name="ECCN")
37
-
38
- # Perform similarity search
39
- docs_with_scores = vectorstore.similarity_search_with_score(
40
- "How do I process an invoice?", k=5
41
- )
42
23
  """
43
24
 
44
25
  def __init__(
45
26
  self,
46
27
  index_name: str,
47
- folder_path: Optional[str] = None,
48
- uipath_sdk: Optional[UiPath] = None,
28
+ uipath_sdk: UiPath | None = None,
29
+ folder_path: str | None = None,
49
30
  ):
50
31
  """Initialize the ContextGroundingVectorStore.
51
32
 
52
33
  Args:
53
- index_name: Name of the context grounding index to use
54
- uipath_sdk: Optional SDK instance to use. If not provided, a new instance will be created.
34
+ index_name: Name of the context grounding index to use (schema name)
35
+ uipath_sdk: Optional UiPath SDK instance.
36
+ folder_path: Optional folder path for folder-scoped operations
55
37
  """
56
38
  self.index_name = index_name
57
39
  self.folder_path = folder_path
58
40
  self.sdk = uipath_sdk or UiPath()
59
41
 
42
+ # VectorStore implementation methods
43
+
44
+ @override
60
45
  def similarity_search_with_score(
61
46
  self, query: str, k: int = 4, **kwargs: Any
62
47
  ) -> list[tuple[Document, float]]:
63
48
  """Return documents most similar to the query along with the distances.
64
- The distance is 1 - score, where score is the relevance score returned by the Context Grounding API.
65
49
 
66
50
  Args:
67
51
  query: The query string
@@ -70,52 +54,24 @@ class ContextGroundingVectorStore(VectorStore):
70
54
  Returns:
71
55
  list of tuples of (document, score)
72
56
  """
73
- # Call the UiPath SDK to perform the search
74
- results = self.sdk.context_grounding.search(
75
- name=self.index_name,
76
- query=query,
77
- number_of_results=k,
78
- folder_path=self.folder_path,
79
- )
80
-
81
- # Convert the results to Documents with scores
82
- docs_with_scores = []
83
- for result in results:
84
- # Create metadata from result fields
85
- metadata = {
86
- "source": result.source,
87
- "id": result.id,
88
- "reference": result.reference,
89
- "page_number": result.page_number,
90
- "source_document_id": result.source_document_id,
91
- "caption": result.caption,
92
- }
93
-
94
- # Add any operation metadata if available
95
- if result.metadata:
96
- metadata["operation_id"] = result.metadata.operation_id
97
- metadata["strategy"] = result.metadata.strategy
98
-
99
- # Create a Document with the content and metadata
100
- doc = Document(
101
- page_content=result.content,
102
- metadata=metadata,
57
+ # Use the context grounding service to perform search
58
+ results: list[ContextGroundingQueryResponse] = (
59
+ self.sdk.context_grounding.search(
60
+ name=self.index_name,
61
+ query=query,
62
+ number_of_results=k,
63
+ folder_path=self.folder_path,
103
64
  )
65
+ )
104
66
 
105
- score = 1.0 - float(result.score)
106
-
107
- docs_with_scores.append((doc, score))
108
-
109
- return docs_with_scores
67
+ return self._convert_results_to_documents(results)
110
68
 
69
+ @override
111
70
  def similarity_search_with_relevance_scores(
112
71
  self, query: str, k: int = 4, **kwargs: Any
113
72
  ) -> list[tuple[Document, float]]:
114
73
  """Return documents along with their relevance scores on a scale from 0 to 1.
115
74
 
116
- This directly uses the scores provided by the Context Grounding API,
117
- which are already normalized between 0 and 1.
118
-
119
75
  Args:
120
76
  query: The query string
121
77
  k: Number of documents to return (default=4)
@@ -128,6 +84,7 @@ class ContextGroundingVectorStore(VectorStore):
128
84
  for doc, score in self.similarity_search_with_score(query, k, **kwargs)
129
85
  ]
130
86
 
87
+ @override
131
88
  async def asimilarity_search_with_score(
132
89
  self, query: str, k: int = 4, **kwargs: Any
133
90
  ) -> list[tuple[Document, float]]:
@@ -140,52 +97,23 @@ class ContextGroundingVectorStore(VectorStore):
140
97
  Returns:
141
98
  list of tuples of (document, score)
142
99
  """
143
- # Call the UiPath SDK to perform the search asynchronously
144
- results = await self.sdk.context_grounding.search_async(
100
+ # Use the context grounding service to perform async search
101
+ results: list[
102
+ ContextGroundingQueryResponse
103
+ ] = await self.sdk.context_grounding.search_async(
145
104
  name=self.index_name,
146
105
  query=query,
147
106
  number_of_results=k,
148
107
  folder_path=self.folder_path,
149
108
  )
150
109
 
151
- # Convert the results to Documents with scores
152
- docs_with_scores = []
153
- for result in results:
154
- # Create metadata from result fields
155
- metadata = {
156
- "source": result.source,
157
- "id": result.id,
158
- "reference": result.reference,
159
- "page_number": result.page_number,
160
- "source_document_id": result.source_document_id,
161
- "caption": result.caption,
162
- }
163
-
164
- # Add any operation metadata if available
165
- if result.metadata:
166
- metadata["operation_id"] = result.metadata.operation_id
167
- metadata["strategy"] = result.metadata.strategy
168
-
169
- # Create a Document with the content and metadata
170
- doc = Document(
171
- page_content=result.content,
172
- metadata=metadata,
173
- )
174
-
175
- # Get the distance score as 1 - ecs_score
176
- score = 1.0 - float(result.score)
177
-
178
- docs_with_scores.append((doc, score))
179
-
180
- return docs_with_scores
110
+ return self._convert_results_to_documents(results)
181
111
 
112
+ @override
182
113
  async def asimilarity_search_with_relevance_scores(
183
114
  self, query: str, k: int = 4, **kwargs: Any
184
115
  ) -> list[tuple[Document, float]]:
185
- """Asynchronously return documents along with their relevance scores on a scale from 0 to 1.
186
-
187
- This directly uses the scores provided by the Context Grounding API,
188
- which are already normalized between 0 and 1.
116
+ """Asynchronously return documents along with their relevance scores.
189
117
 
190
118
  Args:
191
119
  query: The query string
@@ -201,6 +129,7 @@ class ContextGroundingVectorStore(VectorStore):
201
129
  )
202
130
  ]
203
131
 
132
+ @override
204
133
  def similarity_search(
205
134
  self, query: str, k: int = 4, **kwargs: Any
206
135
  ) -> list[Document]:
@@ -216,6 +145,7 @@ class ContextGroundingVectorStore(VectorStore):
216
145
  docs_and_scores = self.similarity_search_with_score(query, k, **kwargs)
217
146
  return [doc for doc, _ in docs_and_scores]
218
147
 
148
+ @override
219
149
  async def asimilarity_search(
220
150
  self, query: str, k: int = 4, **kwargs: Any
221
151
  ) -> list[Document]:
@@ -231,14 +161,64 @@ class ContextGroundingVectorStore(VectorStore):
231
161
  docs_and_scores = await self.asimilarity_search_with_score(query, k, **kwargs)
232
162
  return [doc for doc, _ in docs_and_scores]
233
163
 
164
+ def _convert_results_to_documents(
165
+ self, results: list[ContextGroundingQueryResponse]
166
+ ) -> list[tuple[Document, float]]:
167
+ """Convert API results to Document objects with scores.
168
+
169
+ Args:
170
+ results: List of ContextGroundingQueryResponse objects
171
+
172
+ Returns:
173
+ List of tuples containing (Document, score)
174
+ """
175
+ docs_with_scores = []
176
+
177
+ for result in results:
178
+ # Create metadata from result fields
179
+ metadata = {}
180
+
181
+ # Add string fields with proper defaults
182
+ if result.source:
183
+ metadata["source"] = str(result.source)
184
+ if result.reference:
185
+ metadata["reference"] = str(result.reference)
186
+ if result.page_number:
187
+ metadata["page_number"] = str(result.page_number)
188
+ if result.source_document_id:
189
+ metadata["source_document_id"] = str(result.source_document_id)
190
+ if result.caption:
191
+ metadata["caption"] = str(result.caption)
192
+
193
+ # Add any operation metadata if available
194
+ if result.metadata:
195
+ if result.metadata.operation_id:
196
+ metadata["operation_id"] = str(result.metadata.operation_id)
197
+ if result.metadata.strategy:
198
+ metadata["strategy"] = str(result.metadata.strategy)
199
+
200
+ # Create a Document with the content and metadata
201
+ doc = Document(
202
+ page_content=result.content or "",
203
+ metadata=metadata,
204
+ )
205
+
206
+ # Convert score to distance (1 - score)
207
+ score = 1.0 - float(result.score or 0.0)
208
+
209
+ docs_with_scores.append((doc, score))
210
+
211
+ return docs_with_scores
212
+
234
213
  @classmethod
214
+ @override
235
215
  def from_texts(
236
- cls: type[VST],
216
+ cls,
237
217
  texts: list[str],
238
218
  embedding: Embeddings,
239
- metadatas: Optional[list[dict[str, Any]]] = None,
219
+ metadatas: list[dict[str, Any]] | None = None,
240
220
  **kwargs: Any,
241
- ) -> VST:
221
+ ) -> Self:
242
222
  """This method is required by the VectorStore abstract class, but is not supported
243
223
  by ContextGroundingVectorStore which is read-only.
244
224
 
@@ -246,15 +226,14 @@ class ContextGroundingVectorStore(VectorStore):
246
226
  NotImplementedError: This method is not supported by ContextGroundingVectorStore
247
227
  """
248
228
  raise NotImplementedError(
249
- "ContextGroundingVectorStore is a read-only wrapper for UiPath Context Grounding. "
250
- "Creating a vector store from texts is not supported."
229
+ "ContextGroundingVectorStore is a read-only wrapper for UiPath Context Grounding."
251
230
  )
252
231
 
253
- # Other required methods with minimal implementation to satisfy the interface
232
+ @override
254
233
  def add_texts(
255
234
  self,
256
235
  texts: Iterable[str],
257
- metadatas: Optional[list[dict[str, Any]]] = None,
236
+ metadatas: list[dict[str, Any]] | None = None,
258
237
  **kwargs: Any,
259
238
  ) -> list[str]:
260
239
  """Not implemented for ContextGroundingVectorStore as this is a read-only wrapper."""
@@ -262,7 +241,8 @@ class ContextGroundingVectorStore(VectorStore):
262
241
  "ContextGroundingVectorStore is a read-only wrapper for UiPath Context Grounding."
263
242
  )
264
243
 
265
- def delete(self, ids: Optional[list[str]] = None, **kwargs: Any) -> Optional[bool]:
244
+ @override
245
+ def delete(self, ids: list[str] | None = None, **kwargs: Any) -> bool | None:
266
246
  """Not implemented for ContextGroundingVectorStore as this is a read-only wrapper."""
267
247
  raise NotImplementedError(
268
248
  "ContextGroundingVectorStore is a read-only wrapper for UiPath Context Grounding."