uipath-langchain 0.0.133__py3-none-any.whl → 0.1.24__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (83) hide show
  1. uipath_langchain/_cli/cli_init.py +130 -191
  2. uipath_langchain/_cli/cli_new.py +2 -3
  3. uipath_langchain/_resources/AGENTS.md +21 -0
  4. uipath_langchain/_resources/REQUIRED_STRUCTURE.md +92 -0
  5. uipath_langchain/_tracing/__init__.py +3 -2
  6. uipath_langchain/_tracing/_instrument_traceable.py +11 -12
  7. uipath_langchain/_utils/_request_mixin.py +327 -51
  8. uipath_langchain/_utils/_settings.py +2 -2
  9. uipath_langchain/agent/exceptions/__init__.py +6 -0
  10. uipath_langchain/agent/exceptions/exceptions.py +11 -0
  11. uipath_langchain/agent/guardrails/__init__.py +21 -0
  12. uipath_langchain/agent/guardrails/actions/__init__.py +11 -0
  13. uipath_langchain/agent/guardrails/actions/base_action.py +23 -0
  14. uipath_langchain/agent/guardrails/actions/block_action.py +41 -0
  15. uipath_langchain/agent/guardrails/actions/escalate_action.py +274 -0
  16. uipath_langchain/agent/guardrails/actions/log_action.py +57 -0
  17. uipath_langchain/agent/guardrails/guardrail_nodes.py +125 -0
  18. uipath_langchain/agent/guardrails/guardrails_factory.py +70 -0
  19. uipath_langchain/agent/guardrails/guardrails_subgraph.py +247 -0
  20. uipath_langchain/agent/guardrails/types.py +20 -0
  21. uipath_langchain/agent/react/__init__.py +14 -0
  22. uipath_langchain/agent/react/agent.py +113 -0
  23. uipath_langchain/agent/react/constants.py +2 -0
  24. uipath_langchain/agent/react/init_node.py +20 -0
  25. uipath_langchain/agent/react/llm_node.py +43 -0
  26. uipath_langchain/agent/react/router.py +97 -0
  27. uipath_langchain/agent/react/terminate_node.py +82 -0
  28. uipath_langchain/agent/react/tools/__init__.py +7 -0
  29. uipath_langchain/agent/react/tools/tools.py +50 -0
  30. uipath_langchain/agent/react/types.py +39 -0
  31. uipath_langchain/agent/react/utils.py +49 -0
  32. uipath_langchain/agent/tools/__init__.py +17 -0
  33. uipath_langchain/agent/tools/context_tool.py +53 -0
  34. uipath_langchain/agent/tools/escalation_tool.py +111 -0
  35. uipath_langchain/agent/tools/integration_tool.py +181 -0
  36. uipath_langchain/agent/tools/process_tool.py +49 -0
  37. uipath_langchain/agent/tools/static_args.py +138 -0
  38. uipath_langchain/agent/tools/structured_tool_with_output_type.py +14 -0
  39. uipath_langchain/agent/tools/tool_factory.py +45 -0
  40. uipath_langchain/agent/tools/tool_node.py +22 -0
  41. uipath_langchain/agent/tools/utils.py +11 -0
  42. uipath_langchain/chat/__init__.py +4 -0
  43. uipath_langchain/chat/bedrock.py +187 -0
  44. uipath_langchain/chat/gemini.py +330 -0
  45. uipath_langchain/chat/mapper.py +309 -0
  46. uipath_langchain/chat/models.py +248 -35
  47. uipath_langchain/chat/openai.py +132 -0
  48. uipath_langchain/chat/supported_models.py +42 -0
  49. uipath_langchain/embeddings/embeddings.py +131 -34
  50. uipath_langchain/middlewares.py +0 -6
  51. uipath_langchain/retrievers/context_grounding_retriever.py +7 -9
  52. uipath_langchain/runtime/__init__.py +36 -0
  53. uipath_langchain/runtime/_serialize.py +46 -0
  54. uipath_langchain/runtime/config.py +61 -0
  55. uipath_langchain/runtime/errors.py +43 -0
  56. uipath_langchain/runtime/factory.py +315 -0
  57. uipath_langchain/runtime/graph.py +159 -0
  58. uipath_langchain/runtime/runtime.py +453 -0
  59. uipath_langchain/runtime/schema.py +349 -0
  60. uipath_langchain/runtime/storage.py +115 -0
  61. uipath_langchain/vectorstores/context_grounding_vectorstore.py +90 -110
  62. {uipath_langchain-0.0.133.dist-info → uipath_langchain-0.1.24.dist-info}/METADATA +42 -22
  63. uipath_langchain-0.1.24.dist-info/RECORD +76 -0
  64. {uipath_langchain-0.0.133.dist-info → uipath_langchain-0.1.24.dist-info}/WHEEL +1 -1
  65. uipath_langchain-0.1.24.dist-info/entry_points.txt +5 -0
  66. uipath_langchain/_cli/_runtime/_context.py +0 -21
  67. uipath_langchain/_cli/_runtime/_conversation.py +0 -298
  68. uipath_langchain/_cli/_runtime/_exception.py +0 -17
  69. uipath_langchain/_cli/_runtime/_input.py +0 -139
  70. uipath_langchain/_cli/_runtime/_output.py +0 -234
  71. uipath_langchain/_cli/_runtime/_runtime.py +0 -379
  72. uipath_langchain/_cli/_utils/_graph.py +0 -199
  73. uipath_langchain/_cli/cli_dev.py +0 -44
  74. uipath_langchain/_cli/cli_eval.py +0 -78
  75. uipath_langchain/_cli/cli_run.py +0 -82
  76. uipath_langchain/_tracing/_oteladapter.py +0 -222
  77. uipath_langchain/_tracing/_utils.py +0 -28
  78. uipath_langchain/builder/agent_config.py +0 -191
  79. uipath_langchain/tools/preconfigured.py +0 -191
  80. uipath_langchain-0.0.133.dist-info/RECORD +0 -41
  81. uipath_langchain-0.0.133.dist-info/entry_points.txt +0 -2
  82. /uipath_langchain/{tools/__init__.py → py.typed} +0 -0
  83. {uipath_langchain-0.0.133.dist-info → uipath_langchain-0.1.24.dist-info}/licenses/LICENSE +0 -0
@@ -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
19
- from uipath import UiPath
20
-
21
- VST = TypeVar("VST", bound="ContextGroundingVectorStore")
13
+ from typing_extensions import override
14
+ from uipath.platform import UiPath
15
+ from uipath.platform.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."
@@ -1,33 +1,37 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uipath-langchain
3
- Version: 0.0.133
3
+ Version: 0.1.24
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
7
7
  Project-URL: Documentation, https://uipath.github.io/uipath-python/
8
8
  Maintainer-email: Marius Cosareanu <marius.cosareanu@uipath.com>, Cristian Pufu <cristian.pufu@uipath.com>
9
9
  License-File: LICENSE
10
- Classifier: Development Status :: 3 - Alpha
11
10
  Classifier: Intended Audience :: Developers
12
- Classifier: Programming Language :: Python :: 3.10
13
11
  Classifier: Programming Language :: Python :: 3.11
14
12
  Classifier: Programming Language :: Python :: 3.12
13
+ Classifier: Programming Language :: Python :: 3.13
15
14
  Classifier: Topic :: Software Development :: Build Tools
16
- Requires-Python: >=3.10
15
+ Requires-Python: >=3.11
17
16
  Requires-Dist: httpx>=0.27.0
18
- Requires-Dist: jsonschema-pydantic>=0.6
19
- Requires-Dist: langchain-community>=0.3.21
20
- Requires-Dist: langchain-core>=0.3.34
21
- Requires-Dist: langchain-openai>=0.3.3
22
- Requires-Dist: langchain>=0.3.4
23
- Requires-Dist: langgraph-checkpoint-sqlite>=2.0.3
24
- Requires-Dist: langgraph<0.7.0,>=0.5.0
25
- Requires-Dist: openai>=1.65.5
26
- Requires-Dist: openinference-instrumentation-langchain>=0.1.50
17
+ Requires-Dist: jsonpath-ng>=1.7.0
18
+ Requires-Dist: jsonschema-pydantic-converter>=0.1.5
19
+ Requires-Dist: langchain-core<2.0.0,>=1.0.0
20
+ Requires-Dist: langchain-openai<2.0.0,>=1.0.0
21
+ Requires-Dist: langchain<2.0.0,>=1.0.0
22
+ Requires-Dist: langgraph-checkpoint-sqlite<4.0.0,>=3.0.0
23
+ Requires-Dist: langgraph<2.0.0,>=1.0.0
24
+ Requires-Dist: openinference-instrumentation-langchain>=0.1.56
27
25
  Requires-Dist: pydantic-settings>=2.6.0
28
26
  Requires-Dist: python-dotenv>=1.0.1
29
- Requires-Dist: uipath<2.2.0,>=2.1.60
30
- Provides-Extra: langchain
27
+ Requires-Dist: uipath<2.3.0,>=2.2.28
28
+ Provides-Extra: bedrock
29
+ Requires-Dist: boto3-stubs>=1.41.4; extra == 'bedrock'
30
+ Requires-Dist: langchain-aws>=0.2.35; extra == 'bedrock'
31
+ Provides-Extra: vertex
32
+ Requires-Dist: langchain-community>=0.4.1; extra == 'vertex'
33
+ Requires-Dist: langchain-google-vertexai>=2.1.2; extra == 'vertex'
34
+ Requires-Dist: types-protobuf>=6.32.1.20251105; extra == 'vertex'
31
35
  Description-Content-Type: text/markdown
32
36
 
33
37
  # UiPath LangChain Python SDK
@@ -35,9 +39,9 @@ Description-Content-Type: text/markdown
35
39
  [![PyPI downloads](https://img.shields.io/pypi/dm/uipath-langchain.svg)](https://pypi.org/project/uipath-langchain/)
36
40
  [![Python versions](https://img.shields.io/pypi/pyversions/uipath-langchain.svg)](https://pypi.org/project/uipath-langchain/)
37
41
 
38
- A Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform. This package provides programmatic interaction with UiPath Cloud Platform services and human-in-the-loop (HITL) semantics through Action Center integration.
42
+ A Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform. It provides programmatic interaction with UiPath Cloud Platform services and human-in-the-loop (HITL) semantics through Action Center integration.
39
43
 
40
- This package is an extension to the [UiPath Python SDK](https://github.com/UiPath/uipath-python).
44
+ This package is an extension to the [UiPath Python SDK](https://github.com/UiPath/uipath-python) and implements the [UiPath Runtime Protocol](https://github.com/UiPath/uipath-runtime-python).
41
45
 
42
46
  This [quickstart guide](https://uipath.github.io/uipath-python/) walks you through deploying your first agent to UiPath Cloud Platform.
43
47
 
@@ -45,7 +49,7 @@ Check out these [sample projects](https://github.com/UiPath/uipath-langchain-pyt
45
49
 
46
50
  ## Requirements
47
51
 
48
- - Python 3.10 or higher
52
+ - Python 3.11 or higher
49
53
  - UiPath Automation Cloud account
50
54
 
51
55
  ## Installation
@@ -78,10 +82,12 @@ The SDK provides a command-line interface for creating, packaging, and deploying
78
82
  ### Initialize a Project
79
83
 
80
84
  ```bash
81
- uipath init [GRAPH]
85
+ uipath init
82
86
  ```
83
87
 
84
- Creates a `uipath.json` configuration file for your project. If `[GRAPH]` is omitted, it will create an entrypoint for each graph specified in the `langgraph.json` file.
88
+ Running `uipath init` will process the graph definitions in the `langgraph.json` file and create the corresponding `entry-points.json` file needed for deployment.
89
+
90
+ For more details on the configuration format, see the [UiPath configuration specifications](https://github.com/UiPath/uipath-python/blob/main/specs/README.md).
85
91
 
86
92
  ### Authentication
87
93
 
@@ -132,12 +138,26 @@ Publishes the most recently created package to your UiPath Orchestrator.
132
138
  To properly use the CLI for packaging and publishing, your project should include:
133
139
 
134
140
  - A `pyproject.toml` file with project metadata
135
- - A `langgraph.json` file
136
- - A `uipath.json` file (generated by `uipath init`)
141
+ - A `langgraph.json` file with your graph definitions (e.g., `"graphs": {"agent": "graph.py:graph"}`)
142
+ - A `entry-points.json` file (generated by `uipath init`)
143
+ - A `bindings.json` file (generated by `uipath init`) to configure resource overrides
137
144
  - Any Python files needed for your automation
138
145
 
139
146
  ## Development
140
147
 
148
+ ### Developer Tools
149
+
150
+ Check out [uipath-dev](https://github.com/uipath/uipath-dev-python) - an interactive terminal application for building, testing, and debugging UiPath Python runtimes, agents, and automation scripts.
151
+
141
152
  ### Setting Up a Development Environment
142
153
 
143
154
  Please read our [contribution guidelines](https://github.com/UiPath/uipath-langchain-python/blob/main/CONTRIBUTING.md) before submitting a pull request.
155
+
156
+ ### Special Thanks
157
+
158
+ A huge thank-you to the open-source community and the maintainers of the libraries that make this project possible:
159
+
160
+ - [LangChain](https://github.com/langchain-ai/langchain) for providing a powerful framework for building stateful LLM applications.
161
+ - [Pydantic](https://github.com/pydantic/pydantic) for reliable, typed configuration and validation.
162
+ - [OpenInference](https://github.com/Arize-ai/openinference) for observability and instrumentation support.
163
+
@@ -0,0 +1,76 @@
1
+ uipath_langchain/__init__.py,sha256=VBrvQn7d3nuOdN7zEnV2_S-uhmkjgEIlXiFVeZxZakQ,80
2
+ uipath_langchain/middlewares.py,sha256=DrxC6YpwtrwUlRybUSHfRldcSH4smS0H4pVc6R5OOX4,400
3
+ uipath_langchain/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
+ uipath_langchain/_cli/__init__.py,sha256=juqd9PbXs4yg45zMJ7BHAOPQjb7sgEbWE9InBtGZhfo,24
5
+ uipath_langchain/_cli/cli_init.py,sha256=VUYlCkCYgrR_dVhbMN8-Ziu4Y_Rzl_x6-S6cq-g6KwQ,5567
6
+ uipath_langchain/_cli/cli_new.py,sha256=aM5rmwXewhpFlmxlNq6DLKRdiQGa7beFSEaA-_17oiw,2300
7
+ uipath_langchain/_cli/_templates/langgraph.json.template,sha256=eeh391Gta_hoRgaNaZ58nW1LNvCVXA7hlAH6l7Veous,107
8
+ uipath_langchain/_cli/_templates/main.py.template,sha256=GpSblGH2hwS9ibqQmX2iB2nsmOA5zDfEEF4ChLiMxbQ,875
9
+ uipath_langchain/_resources/AGENTS.md,sha256=5VmIfaQ6H91VxInnxFmJklURXeWIIQpGQTYBEmvvoVA,1060
10
+ uipath_langchain/_resources/REQUIRED_STRUCTURE.md,sha256=BRmWWFtM0qNXj5uumALVxq9h6pifJDGh5NzuyctuH1Q,2569
11
+ uipath_langchain/_tracing/__init__.py,sha256=C2dRvQ2ynxCmyICgE-rJHimWKEcFRME_o9gfX84Mb3Y,123
12
+ uipath_langchain/_tracing/_instrument_traceable.py,sha256=cIxtDvlrPxVSZLOvpl571HxFO3wg7pNem4rLUuMI2Vg,4276
13
+ uipath_langchain/_utils/__init__.py,sha256=-w-4TD9ZnJDCpj4VIPXhJciukrmDJJbmnOFnhAkAaEU,81
14
+ uipath_langchain/_utils/_request_mixin.py,sha256=GvZruUGqL-8ykj9FK2XB5GFpkiV23nhfPKY1ozbguLA,30924
15
+ uipath_langchain/_utils/_settings.py,sha256=RMVVOdskShghz6mNLmXhHMmdwOiceAYDe8C_qPKedSk,3071
16
+ uipath_langchain/_utils/_sleep_policy.py,sha256=e9pHdjmcCj4CVoFM1jMyZFelH11YatsgWfpyrfXzKBQ,1251
17
+ uipath_langchain/agent/exceptions/__init__.py,sha256=GFh8mtsoKYghTHe93rRbIycWOW8dPt0okQjZuc2N-Hc,158
18
+ uipath_langchain/agent/exceptions/exceptions.py,sha256=G7LdeQ9uMljLGTlixWBHvNJ1ULtUIDIkzApjfbsF6_0,216
19
+ uipath_langchain/agent/guardrails/__init__.py,sha256=gWxPFhbxqiBM6phdYeuR2EMVb-qwB71Ny16SzNAQ5kw,610
20
+ uipath_langchain/agent/guardrails/guardrail_nodes.py,sha256=Wkxb1hnxunjQHalPRQHOkGWIh4HPjFHPzYCByQyNUgE,3772
21
+ uipath_langchain/agent/guardrails/guardrails_factory.py,sha256=gkOkNO5uyhNBt1y7j4V3Ao-u1fh1gpTji3-N2bRS_l4,2248
22
+ uipath_langchain/agent/guardrails/guardrails_subgraph.py,sha256=nBOm2U07zPxoE699Iqe4YZECo43C3BQ4uXbj55oUUCE,8739
23
+ uipath_langchain/agent/guardrails/types.py,sha256=Z5TS6EHnaanie3s1yfGhE4JXoFKuu01ESsbeFbbPie4,561
24
+ uipath_langchain/agent/guardrails/actions/__init__.py,sha256=PiE5Eb39JYWrQG481aREV2I0tNMPEi7VtChBy7ZJqcc,253
25
+ uipath_langchain/agent/guardrails/actions/base_action.py,sha256=7Q8ArFLYkbTVsKinCDoU1TAI-ki0JLwTc3XknE8dxgA,673
26
+ uipath_langchain/agent/guardrails/actions/block_action.py,sha256=5qBlwqxJdIsTvJ2h5m0N2_p9cIAcWeWas30GsxiBte4,1330
27
+ uipath_langchain/agent/guardrails/actions/escalate_action.py,sha256=O2IY0FiVBQyfiNszzR2JgP1dRJC7hb03eSUIqpW9BFo,9491
28
+ uipath_langchain/agent/guardrails/actions/log_action.py,sha256=ADvP0Sbx3oRbgI5KQfXyZTBUB0CT40QAqY4q8KzswVw,1924
29
+ uipath_langchain/agent/react/__init__.py,sha256=BhRWUMZ9yLtBr7SyRwS-XMKG9o84DROyedCMpE6j1RU,362
30
+ uipath_langchain/agent/react/agent.py,sha256=A5edIf7C43wCZZzx3FSQoAFION7RBHaz5c4KE9iadSU,3788
31
+ uipath_langchain/agent/react/constants.py,sha256=B2yqryh242DETslaRYacUPbVdpjvvApjsBira_qhQwk,61
32
+ uipath_langchain/agent/react/init_node.py,sha256=plhyTecBOBsm-YHfi73ZN3pJhe24tpCMr53IfRzN6SA,566
33
+ uipath_langchain/agent/react/llm_node.py,sha256=4q8JcAwzELyyBaYTaFtx5HP9neq_5UolfFsuqsh4pso,1468
34
+ uipath_langchain/agent/react/router.py,sha256=yEKTa8tAeZnDxh_7AsJRBmg7Ygb7mSk0b0g0gPrvTI8,3616
35
+ uipath_langchain/agent/react/terminate_node.py,sha256=G2k2xMgocfNC13RjF9A2Kea6KiPINmdnxiZHQCS_fAY,2734
36
+ uipath_langchain/agent/react/types.py,sha256=Mr1LYP6pUwDdxZYdtwtmcic4w8RcMGkXSqm6BJon7QQ,909
37
+ uipath_langchain/agent/react/utils.py,sha256=HVaTdEdARIbGhQ2hA1kWdacmtOERYipKiqaLmu06usA,1278
38
+ uipath_langchain/agent/react/tools/__init__.py,sha256=LGfG8Dc32ffKdXQyMI2oYzhNnTs1wbzsddXz6eU-0MY,102
39
+ uipath_langchain/agent/react/tools/tools.py,sha256=vFBGnFrGocX__sotKisMJr2lxRRVqA0-uThzzhPADIw,1443
40
+ uipath_langchain/agent/tools/__init__.py,sha256=4QVwzP8gFM8pPJwRsJIIVElPOrQLeGzhue-zv4aVCtM,464
41
+ uipath_langchain/agent/tools/context_tool.py,sha256=oPvMVNxeb5q6xVlSScvMGcpT1wOUlFGOwsnFoP_dbuE,1772
42
+ uipath_langchain/agent/tools/escalation_tool.py,sha256=VYNUEjfNMw3k2ESWMtn3RZ66WYRJcBvXpQaGzMXWCSw,3819
43
+ uipath_langchain/agent/tools/integration_tool.py,sha256=EcCJ2g6NyyJj6sQeVyzLY1JL3sAtTAWu2dwVvWOkHgo,6555
44
+ uipath_langchain/agent/tools/process_tool.py,sha256=3RkqqeXzmm8mSNaesEQKST1SvB8UEl2H69Qyh0lBv1c,1696
45
+ uipath_langchain/agent/tools/static_args.py,sha256=_bS-ENdVNxSQ74fi6H0bk7FG9QVZTqitM6es3eLsGq4,4521
46
+ uipath_langchain/agent/tools/structured_tool_with_output_type.py,sha256=9EZB1WlVt7FFBf20jX3Av9vJf9MaDNCnKLUhMBIrtLQ,354
47
+ uipath_langchain/agent/tools/tool_factory.py,sha256=o0bd_IMIIsVc0d6gODf3Lk-yiG6eXC9o9NYMgumY4GI,1419
48
+ uipath_langchain/agent/tools/tool_node.py,sha256=TnXsjoShvhsoBuV5RoUVoJCc2zYPKSnJYSC9MGJoeOk,707
49
+ uipath_langchain/agent/tools/utils.py,sha256=DsFeZ7kDzFaZ0bGHQN6TlGMJ90wYr7P1Vo1rpHPHWws,401
50
+ uipath_langchain/chat/__init__.py,sha256=fAoK-hKuShWDV9tbinJU9TSKRBG2wQQwK3UKZTAyMVM,254
51
+ uipath_langchain/chat/bedrock.py,sha256=eonXWnGh3m9cmMifP49fnXsjmrRQLd3Wda5fFa11568,5863
52
+ uipath_langchain/chat/gemini.py,sha256=Zlz5KVoHdzlemzFTmFVjKCloaFo2lMiBbBq9MCJ9Lds,11903
53
+ uipath_langchain/chat/mapper.py,sha256=XsWFbg6U4kW5Yj_ANvYUZ4HICybHcv9qWdfPPU8UTKA,11950
54
+ uipath_langchain/chat/models.py,sha256=cbIRw-YhEvQcgt0DVTHc84lKIjeDhsQo5oxvBz9luD0,18168
55
+ uipath_langchain/chat/openai.py,sha256=M36pSDeWwnfO5EXcCsYnjfZ5C5jfko6ng_87qS-Z5tA,4594
56
+ uipath_langchain/chat/supported_models.py,sha256=KrTO8rex8sjC2NVUnuDoLLvz__ROKtxEtCXSk1xXTOU,1373
57
+ uipath_langchain/embeddings/__init__.py,sha256=QICtYB58ZyqFfDQrEaO8lTEgAU5NuEKlR7iIrS0OBtc,156
58
+ uipath_langchain/embeddings/embeddings.py,sha256=MGUtnT0pkj97IjHKhROSd786g3ONwwkjgfQBSq3ayhc,6888
59
+ uipath_langchain/retrievers/__init__.py,sha256=rOn7PyyHgZ4pMnXWPkGqmuBmx8eGuo-Oyndo7Wm9IUU,108
60
+ uipath_langchain/retrievers/context_grounding_retriever.py,sha256=eVDt49dcyBVM8wgBn5FmaXK8gfgsOaNBC8tYnebiQeQ,2201
61
+ uipath_langchain/runtime/__init__.py,sha256=h4pDyPy8kAYWvSohG3qFmx-bTVTIj1spbMqc7kO674E,1017
62
+ uipath_langchain/runtime/_serialize.py,sha256=ySdQrz4I-7V068_lOYgL6lD41wRg31_Ot6gAetcWaCw,1255
63
+ uipath_langchain/runtime/config.py,sha256=Jh4B47EUnDjWpV7gsPNzwWeFhlgjOHgdlOkJB64BVpc,1828
64
+ uipath_langchain/runtime/errors.py,sha256=iepiILaDtanusvyYBQSRsPDmKB-6GB94OXKATwI8dqY,1335
65
+ uipath_langchain/runtime/factory.py,sha256=_fbYViNg6uuApUZiEJjYHQU2noH5dqFBTXWEPy-Oj_k,11043
66
+ uipath_langchain/runtime/graph.py,sha256=1h_eaXkyN0G43BS0WUMoK_UNDao8jrmcyJqGVgwVEjM,5513
67
+ uipath_langchain/runtime/runtime.py,sha256=cK7hewu6Mv8rQbUir03JgPUgv-zqVtYQ1YOfoMLB89I,16904
68
+ uipath_langchain/runtime/schema.py,sha256=sbgf4Z_2T_r2sv1e8uYsAExZ1PNeVCODB9Hm4HZ4gQc,11547
69
+ uipath_langchain/runtime/storage.py,sha256=Vem6kz0yGIUgIhTByzguvNOkb6N40b_ba8jcbjGo_eY,3954
70
+ uipath_langchain/vectorstores/__init__.py,sha256=w8qs1P548ud1aIcVA_QhBgf_jZDrRMK5Lono78yA8cs,114
71
+ uipath_langchain/vectorstores/context_grounding_vectorstore.py,sha256=SfRvIenOzn4r7jng_I9GIyknyeDx2hdW63O1rZY-ZLQ,8407
72
+ uipath_langchain-0.1.24.dist-info/METADATA,sha256=STmAiU3rEotgAApOuXj8bk4p3V6jOJcw3JVo7zEAOrA,5658
73
+ uipath_langchain-0.1.24.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
74
+ uipath_langchain-0.1.24.dist-info/entry_points.txt,sha256=Wptt1FbvhcDzNQxDlu2Lt1ngBOdDIFPlM1p8WzXf6wQ,171
75
+ uipath_langchain-0.1.24.dist-info/licenses/LICENSE,sha256=JDpt-uotAkHFmxpwxi6gwx6HQ25e-lG4U_Gzcvgp7JY,1063
76
+ uipath_langchain-0.1.24.dist-info/RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: hatchling 1.27.0
2
+ Generator: hatchling 1.28.0
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
@@ -0,0 +1,5 @@
1
+ [uipath.middlewares]
2
+ register = uipath_langchain.middlewares:register_middleware
3
+
4
+ [uipath.runtime.factories]
5
+ langgraph = uipath_langchain.runtime:register_runtime_factory
@@ -1,21 +0,0 @@
1
- from typing import Any, Optional, Union
2
-
3
- from langgraph.checkpoint.sqlite.aio import AsyncSqliteSaver
4
- from langgraph.graph import StateGraph
5
- from uipath._cli._runtime._contracts import UiPathRuntimeContext
6
-
7
- from .._utils._graph import LangGraphConfig
8
-
9
-
10
- class LangGraphRuntimeContext(UiPathRuntimeContext):
11
- """Context information passed throughout the runtime execution."""
12
-
13
- langgraph_config: Optional[LangGraphConfig] = None
14
- state_graph: Optional[StateGraph[Any, Any]] = None
15
- output: Optional[Any] = None
16
- state: Optional[Any] = (
17
- None # TypedDict issue, the actual type is: Optional[langgraph.types.StateSnapshot]
18
- )
19
- memory: Optional[AsyncSqliteSaver] = None
20
- langsmith_tracing_enabled: Union[str, bool, None] = False
21
- resume_triggers_table: str = "__uipath_resume_triggers"