Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[project]
name = "uipath-langchain"
version = "0.2.4"
version = "0.3.0"
description = "Python SDK that enables developers to build and deploy LangGraph agents to the UiPath Cloud Platform"
readme = { file = "README.md", content-type = "text/markdown" }
requires-python = ">=3.11"
dependencies = [
"uipath>=2.3.0, <2.4.0",
"uipath-runtime>=0.3.3, <0.4.0",
"uipath>=2.4.0, <2.5.0",
"uipath-runtime>=0.4.0, <0.5.0",
"langgraph>=1.0.0, <2.0.0",
"langchain-core>=1.2.5, <2.0.0",
"aiosqlite==0.21.0",
Expand Down
14 changes: 9 additions & 5 deletions src/uipath_langchain/runtime/factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def _load_config(self) -> LangGraphConfig:
return self._config

async def _load_graph(
self, entrypoint: str
self, entrypoint: str, **kwargs
) -> StateGraph[Any, Any, Any] | CompiledStateGraph[Any, Any, Any, Any]:
"""
Load a graph for the given entrypoint.
Expand Down Expand Up @@ -181,7 +181,7 @@ async def _compile_graph(
return builder.compile(checkpointer=memory)

async def _resolve_and_compile_graph(
self, entrypoint: str, memory: AsyncSqliteSaver
self, entrypoint: str, memory: AsyncSqliteSaver, **kwargs
) -> CompiledStateGraph[Any, Any, Any, Any]:
"""
Resolve a graph from configuration and compile it.
Expand All @@ -201,7 +201,7 @@ async def _resolve_and_compile_graph(
if entrypoint in self._graph_cache:
return self._graph_cache[entrypoint]

loaded_graph = await self._load_graph(entrypoint)
loaded_graph = await self._load_graph(entrypoint, **kwargs)

compiled_graph = await self._compile_graph(loaded_graph, memory)

Expand Down Expand Up @@ -249,6 +249,7 @@ async def _create_runtime_instance(
compiled_graph: CompiledStateGraph[Any, Any, Any, Any],
runtime_id: str,
entrypoint: str,
**kwargs,
) -> UiPathRuntimeProtocol:
"""
Create a runtime instance from a compiled graph.
Expand Down Expand Up @@ -279,7 +280,7 @@ async def _create_runtime_instance(
)

async def new_runtime(
self, entrypoint: str, runtime_id: str
self, entrypoint: str, runtime_id: str, **kwargs
) -> UiPathRuntimeProtocol:
"""
Create a new LangGraph runtime instance.
Expand All @@ -294,12 +295,15 @@ async def new_runtime(
# Get shared memory instance
memory = await self._get_memory()

compiled_graph = await self._resolve_and_compile_graph(entrypoint, memory)
compiled_graph = await self._resolve_and_compile_graph(
entrypoint, memory, **kwargs
)

return await self._create_runtime_instance(
compiled_graph=compiled_graph,
runtime_id=runtime_id,
entrypoint=entrypoint,
**kwargs,
)

async def dispose(self) -> None:
Expand Down
18 changes: 9 additions & 9 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.