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
2 changes: 1 addition & 1 deletion samples/github-helper-agent/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ uv sync
Set your MCP Remote Server URL as environment variables in `.env`:

```bash
UIPATH_MCP_SERVER_URL=https://cloud.uipath.com/account/tenant/agenthub_/mcp/folder-key/github-mcp/sse
UIPATH_MCP_SERVER_URL=https://cloud.uipath.com/account/tenant/agenthub_/mcp/folder-key/github-mcp/
```

## Debugging
Expand Down
6 changes: 3 additions & 3 deletions samples/github-helper-agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from langgraph.prebuilt import create_react_agent
from langgraph.prebuilt.chat_agent_executor import AgentState
from mcp import ClientSession
from mcp.client.sse import sse_client
from mcp.client.streamable_http import streamablehttp_client
from pydantic import BaseModel, Field
from uipath_langchain.chat.models import UiPathAzureChatOpenAI

Expand Down Expand Up @@ -96,11 +96,11 @@ def process_comment(comment) -> PullRequestComment:

@asynccontextmanager
async def make_graph():
async with sse_client(
async with streamablehttp_client(
url=os.getenv("UIPATH_MCP_SERVER_URL"),
headers={"Authorization": f"Bearer {os.getenv('UIPATH_ACCESS_TOKEN')}"},
timeout=60,
) as (read, write):
) as (read, write, session_id_callback):
async with ClientSession(read, write) as session:
all_tools = await load_mcp_tools(session)

Expand Down
4 changes: 2 additions & 2 deletions samples/github-helper-agent/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "An automated agent that reviews GitHub pull requests and provides
authors = [{ name = "Cristi Pufu", email = "[email protected]" }]
dependencies = [
"uipath-langchain>=0.0.118",
"langgraph>=0.3.34",
"langchain-mcp-adapters>=0.0.9"
"langgraph>=0.5.4",
"langchain-mcp-adapters>=0.1.9"
]
requires-python = ">=3.11"
1,068 changes: 671 additions & 397 deletions samples/github-helper-agent/uv.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions samples/github-slack-agent/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from langgraph.prebuilt import create_react_agent
from langgraph.prebuilt.chat_agent_executor import AgentState
from mcp import ClientSession
from mcp.client.sse import sse_client
from mcp.client.streamable_http import streamablehttp_client
from uipath_langchain.chat.models import UiPathAzureChatOpenAI

dotenv.load_dotenv()
Expand All @@ -20,19 +20,19 @@

@asynccontextmanager
async def make_graph():
async with sse_client(
async with streamablehttp_client(
url=GITHUB_MCP_SERVER_URL,
headers={"Authorization": f"Bearer {UIPATH_ACCESS_TOKEN}"},
timeout=60,
) as (git_read, git_write):
) as (git_read, git_write, git_session_id_callback):
async with ClientSession(git_read, git_write) as git_session:
all_github_tools = await load_mcp_tools(git_session)

async with sse_client(
async with streamablehttp_client(
url=SLACK_MCP_SERVER_URL,
headers={"Authorization": f"Bearer {UIPATH_ACCESS_TOKEN}"},
timeout=60,
) as (slack_read, slack_write):
) as (slack_read, slack_write, slack_session_id_callback):
async with ClientSession(slack_read, slack_write) as slack_session:
all_slack_tools = await load_mcp_tools(slack_session)

Expand Down
4 changes: 2 additions & 2 deletions samples/github-slack-agent/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "An automated agent that reviews GitHub pull requests and provides
authors = [{ name = "Cristi Pufu", email = "[email protected]" }]
dependencies = [
"uipath-langchain>=0.0.118",
"langgraph>=0.3.34",
"langchain-mcp-adapters>=0.0.9"
"langgraph>=0.5.4",
"langchain-mcp-adapters>=0.1.9"
]
requires-python = ">=3.11"
1,054 changes: 686 additions & 368 deletions samples/github-slack-agent/uv.lock

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions samples/mcp-functions-agent/builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from langgraph.prebuilt import create_react_agent
from langgraph.prebuilt.chat_agent_executor import AgentState
from mcp import ClientSession
from mcp.client.sse import sse_client
from mcp.client.streamable_http import streamablehttp_client
from pydantic import BaseModel
from uipath_langchain.chat.models import UiPathAzureChatOpenAI

Expand Down Expand Up @@ -51,11 +51,11 @@ class GraphState(AgentState):

@asynccontextmanager
async def make_graph():
async with sse_client(
async with streamablehttp_client(
url=FUNCTIONS_MCP_SERVER_URL,
headers={"Authorization": f"Bearer {UIPATH_ACCESS_TOKEN}"},
timeout=60,
) as (read, write):
) as (read, write, session_id_callback):
async with ClientSession(read, write) as session:
await session.initialize()
tools = await load_mcp_tools(session)
Expand Down
4 changes: 2 additions & 2 deletions samples/mcp-functions-agent/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description = "A coder agent that implements and tests Python functions using a
authors = [{ name = "Cristi Pufu", email = "[email protected]" }]
dependencies = [
"uipath-langchain>=0.0.118",
"langgraph>=0.3.34",
"langchain-mcp-adapters>=0.0.9"
"langgraph>=0.5.4",
"langchain-mcp-adapters>=0.1.9"
]
requires-python = ">=3.11"
605 changes: 236 additions & 369 deletions samples/mcp-functions-agent/uv.lock

Large diffs are not rendered by default.