uipath-langchain 0.0.140__tar.gz → 0.0.141__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.
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/publish-dev.yml +29 -31
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/PKG-INFO +2 -2
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/pyproject.toml +2 -2
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/README.md +3 -0
- uipath_langchain-0.0.141/samples/oauth-external-apps-agent/README.md +84 -0
- uipath_langchain-0.0.141/samples/oauth-external-apps-agent/input.json +1 -0
- uipath_langchain-0.0.141/samples/oauth-external-apps-agent/langgraph.json +7 -0
- uipath_langchain-0.0.141/samples/oauth-external-apps-agent/main.py +95 -0
- uipath_langchain-0.0.141/samples/oauth-external-apps-agent/pyproject.toml +17 -0
- uipath_langchain-0.0.141/samples/oauth-external-apps-agent/uv.lock +3770 -0
- uipath_langchain-0.0.141/src/uipath_langchain/_cli/_runtime/_context.py +10 -0
- uipath_langchain-0.0.141/src/uipath_langchain/_cli/_runtime/_input.py +147 -0
- uipath_langchain-0.0.141/src/uipath_langchain/_cli/_runtime/_output.py +148 -0
- uipath_langchain-0.0.141/src/uipath_langchain/_cli/_runtime/_runtime.py +481 -0
- uipath_langchain-0.0.140/src/uipath_langchain/_cli/cli_run.py → uipath_langchain-0.0.141/src/uipath_langchain/_cli/cli_debug.py +29 -15
- uipath_langchain-0.0.141/src/uipath_langchain/_cli/cli_run.py +94 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/middlewares.py +2 -0
- uipath_langchain-0.0.141/src/uipath_langchain/py.typed +0 -0
- uipath_langchain-0.0.141/src/uipath_langchain/tools/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/tools/preconfigured.py +2 -2
- uipath_langchain-0.0.141/uv.lock +3899 -0
- uipath_langchain-0.0.140/src/uipath_langchain/_cli/_runtime/_context.py +0 -16
- uipath_langchain-0.0.140/src/uipath_langchain/_cli/_runtime/_input.py +0 -139
- uipath_langchain-0.0.140/src/uipath_langchain/_cli/_runtime/_output.py +0 -234
- uipath_langchain-0.0.140/src/uipath_langchain/_cli/_runtime/_runtime.py +0 -255
- uipath_langchain-0.0.140/uv.lock +0 -3248
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.cursorrules +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.editorconfig +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.gitattributes +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/cd.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/ci.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/commitlint.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/integration_tests.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/lint-custom-version.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/lint.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/publish-docs.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/publish-prior-stable-version.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/slack.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/test-custom-version.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.github/workflows/test.yml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.gitignore +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.pre-commit-config.yaml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.python-version +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.vscode/extensions.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/.vscode/settings.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/CONTRIBUTING.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/LICENSE +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/chat_models.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/context_grounding.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/human_in_the_loop.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/quick_start.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/quick_start_images/cloud_env_var_dark.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/quick_start_images/cloud_env_var_light.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/quick_start_images/invoke_output_dark.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/quick_start_images/invoke_output_light.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/click-storage-bucket.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/create-index-1.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/create-index-2.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/create-process.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/create-quiz-generator.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/create-storage-bucket-1.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/create-storage-bucket-2.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/folder-path.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/job-info.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/output.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/process-page.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/researcher-1.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/researcher-2.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/run-process-1.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/run-process-2.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/RAG/storage-bucket-content.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/multi-agent-distributed/coder-agent-package-overview.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/multi-agent-distributed/coder-agent-process-configuration.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/multi-agent-distributed/planner-agent-package-overview.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/multi-agent-distributed/planner-agent-process-configuration.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/multi-agent-distributed/researcher-agent-package-overview.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/multi-agent-distributed/researcher-agent-process-configuration.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/activate-apps.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/activate-deployment.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/copy-folder-path.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/deploy-solution-package-wizard.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/deploy-solution-package.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/monitor-agent.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/navigate-to-solution-folder.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/resume-condition.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/run-agent.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/solution-destination-folder.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/start-job.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/docs/sample_images/ticket-classification/upload-solution-package.png +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/input.example/quiz-generator-debug-input.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/input.example/researcher-debug-input.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/quiz-generator-RAG-agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/researcher-RAG-agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/src/agents/quiz-generator-RAG-agent.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/src/agents/researcher-RAG-agent.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/RAG-quiz-generator/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/calculator-agent/graph.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/calculator-agent/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/calculator-agent/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/calculator-agent/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/calculator-agent/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/chat-agent/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/chat-agent/agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/chat-agent/graph.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/chat-agent/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/chat-agent/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/chat-agent/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/chat-agent/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/company-research-agent/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/company-research-agent/agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/company-research-agent/graph.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/company-research-agent/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/company-research-agent/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/company-research-agent/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/company-research-agent/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/.env.template +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/.python-version +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/.vscode/launch.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/input.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/src/email_organizer/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/src/email_organizer/main.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/src/email_organizer/outlook_client.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/email-organizer-agent/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/hitl-inbox-server/database.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/hitl-inbox-server/main.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/hitl-inbox-server/models.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/hitl-inbox-server/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/hitl-inbox-server/schemas.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/hitl-inbox-server/templates/index.html +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/hitl-inbox-server/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/coder.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/planner.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/researcher.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/coder.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/planner.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/src/multi-agent-distributed/researcher.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-planner-researcher-coder-distributed/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-supervisor-researcher-coder/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-supervisor-researcher-coder/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-supervisor-researcher-coder/agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-supervisor-researcher-coder/graph.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-supervisor-researcher-coder/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-supervisor-researcher-coder/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-supervisor-researcher-coder/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/multi-agent-supervisor-researcher-coder/uv.lock +0 -0
- /uipath_langchain-0.0.140/src/uipath_langchain/tools/__init__.py → /uipath_langchain-0.0.141/samples/oauth-external-apps-agent/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/retrieval-chain/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/retrieval-chain/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/retrieval-chain/main.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/retrieval-chain/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/retrieval-chain/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/retrieval-chain/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/src/simple-local-mcp/graph.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/src/simple-local-mcp/math_server.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/src/simple-local-mcp/weather_server.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-local-mcp/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-remote-mcp/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-remote-mcp/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-remote-mcp/agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-remote-mcp/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-remote-mcp/main.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-remote-mcp/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-remote-mcp/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/simple-remote-mcp/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/.env.example +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/README.md +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/agent.mermaid +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/escalation_app_solution/generic-escalation-app-solution-1.0.0.zip +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/main.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/samples/ticket-classification/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/_runtime/_conversation.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/_runtime/_exception.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/_runtime/_graph_resolver.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/_templates/langgraph.json.template +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/_templates/main.py.template +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/_utils/_graph.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/cli_dev.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/cli_eval.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/cli_init.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_cli/cli_new.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_tracing/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_tracing/_instrument_traceable.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_tracing/_oteladapter.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_tracing/_utils.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_utils/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_utils/_request_mixin.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_utils/_settings.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/_utils/_sleep_policy.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/chat/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/chat/models.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/embeddings/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/embeddings/embeddings.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/retrievers/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/retrievers/context_grounding_retriever.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/vectorstores/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/src/uipath_langchain/vectorstores/context_grounding_vectorstore.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/common/validate_output.sh +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/company-research-agent/input.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/company-research-agent/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/company-research-agent/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/company-research-agent/run.sh +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/company-research-agent/src/assert.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/company-research-agent/src/graph.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/company-research-agent/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/init-flow/input.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/init-flow/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/init-flow/run.sh +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/init-flow/src/assert.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/input.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/run.sh +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/src/assert.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/src/simple-local-mcp/graph.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/src/simple-local-mcp/math_server.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/src/simple-local-mcp/weather_server.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/simple-local-mcp/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/ticket-classification/input.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/ticket-classification/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/ticket-classification/pyproject.toml +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/ticket-classification/run.sh +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/ticket-classification/src/assert.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/ticket-classification/src/main.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/testcases/ticket-classification/uv.lock +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/cli/conftest.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/cli/mocks/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/cli/mocks/simple_agent.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/cli/mocks/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/cli/test_run.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/conftest.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/mocks/action_trigger_hitl.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/mocks/api_trigger_hitl.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/mocks/job_trigger_hitl.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/mocks/langgraph.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/mocks/uipath-default-escalation.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/mocks/uipath.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/test_action_trigger.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/test_hitl_api_trigger.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/test_hitl_default_escalation.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/hitl/test_hitl_job_trigger.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/test_dummy.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/tools/__init__.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/tools/conftest.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/tools/mocks/agent_definition.json +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/tools/test_preconfigured.py +0 -0
- {uipath_langchain-0.0.140 → uipath_langchain-0.0.141}/tests/tracing/test_oteladapter.py +0 -0
|
@@ -7,7 +7,6 @@ on:
|
|
|
7
7
|
PYPI_TOKEN_NIGHTLY:
|
|
8
8
|
required: true
|
|
9
9
|
|
|
10
|
-
|
|
11
10
|
jobs:
|
|
12
11
|
publish-dev:
|
|
13
12
|
runs-on: ubuntu-latest
|
|
@@ -34,44 +33,43 @@ jobs:
|
|
|
34
33
|
|
|
35
34
|
- name: Modify pyproject.toml for custom UiPath version
|
|
36
35
|
if: contains(github.event.pull_request.labels.*.name, 'test-core-dev-version')
|
|
37
|
-
shell:
|
|
36
|
+
shell: pwsh
|
|
37
|
+
env:
|
|
38
|
+
PR_TITLE: ${{ github.event.pull_request.title }}
|
|
38
39
|
run: |
|
|
39
|
-
#
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
VERSION=$(echo "$PR_TITLE" | grep -oE '[0-9]+\.[0-9]+\.[0-9]+\.dev[0-9]+' | head -1)
|
|
45
|
-
|
|
46
|
-
if [ -z "$VERSION" ]; then
|
|
47
|
-
echo "No version found in PR title. Please include version like: 2.0.65.dev1004030443"
|
|
40
|
+
# Extract version from PR title (e.g., "2.0.65.dev1004030443")
|
|
41
|
+
if ($env:PR_TITLE -match '(\d+\.\d+\.\d+\.dev\d+)') {
|
|
42
|
+
$VERSION = $matches[1]
|
|
43
|
+
} else {
|
|
44
|
+
Write-Error "No version found in PR title. Example: 'chore: test (uipath version 2.0.65.dev1004030443)'"
|
|
48
45
|
exit 1
|
|
49
|
-
|
|
46
|
+
}
|
|
50
47
|
|
|
51
|
-
|
|
48
|
+
Write-Output "Using UiPath version: $VERSION"
|
|
52
49
|
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
sed -i '/dependencies = \[/,/\]/ s|"uipath[=><^~!]*[^"]*"|"uipath=='$VERSION'"|' pyproject.toml
|
|
56
|
-
sed -i '/\[project\.optional-dependencies\]/,/^\[/ s|"uipath[=><^~!]*[^"]*"|"uipath=='$VERSION'"|' pyproject.toml
|
|
50
|
+
# Update uipath dependency to exact version (only in dependency arrays, not project name)
|
|
51
|
+
$content = Get-Content pyproject.toml -Raw
|
|
57
52
|
|
|
53
|
+
# Replace in main dependencies array
|
|
54
|
+
$content = $content -replace '(?s)(dependencies\s*=\s*\[.*?\])', {
|
|
55
|
+
param($match)
|
|
56
|
+
$match.Value -replace '"uipath([>=<\s,][^"]*|)"', "`"uipath==$VERSION`""
|
|
57
|
+
}
|
|
58
58
|
|
|
59
|
+
# Replace in optional-dependencies section (from [project.optional-dependencies] to next [)
|
|
60
|
+
$content = $content -replace '(?s)(\[project\.optional-dependencies\].*?)(?=\n\[|\z)', {
|
|
61
|
+
param($match)
|
|
62
|
+
$match.Value -replace '"uipath([>=<\s,][^"]*|)"', "`"uipath==$VERSION`""
|
|
63
|
+
}
|
|
59
64
|
|
|
60
|
-
# Add
|
|
61
|
-
if
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
echo 'uipath = { index = "testpypi" }' >> pyproject.toml
|
|
65
|
-
else
|
|
66
|
-
# Update existing sources if needed
|
|
67
|
-
if ! grep -q 'uipath = { index = "testpypi" }' pyproject.toml; then
|
|
68
|
-
sed -i '/\[tool\.uv\.sources\]/a uipath = { index = "testpypi" }' pyproject.toml
|
|
69
|
-
fi
|
|
70
|
-
fi
|
|
65
|
+
# Add [tool.uv.sources] if missing
|
|
66
|
+
if ($content -notmatch '\[tool\.uv\.sources\]') {
|
|
67
|
+
$content += "`n`n[tool.uv.sources]`n uipath = { index = `"testpypi`" }`n"
|
|
68
|
+
}
|
|
71
69
|
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
70
|
+
# Save changes
|
|
71
|
+
$content | Set-Content pyproject.toml -NoNewline
|
|
72
|
+
Write-Output "✓ Updated pyproject.toml"
|
|
75
73
|
|
|
76
74
|
- name: Install dependencies
|
|
77
75
|
run: uv sync --all-extras
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: uipath-langchain
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.141
|
|
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.
|
|
29
|
+
Requires-Dist: uipath<2.2.0,>=2.1.96
|
|
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.
|
|
3
|
+
version = "0.0.141"
|
|
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.
|
|
8
|
+
"uipath>=2.1.96, <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",
|
|
@@ -18,5 +18,8 @@ This sample shows how to create an agent using LangGraph with multiple tool serv
|
|
|
18
18
|
## [Simple remote MCP](simple-remote-mcp)
|
|
19
19
|
This sample demonstrates the creation of an agent using LangGraph, which connects to a remote MCP (Model Context Protocol) Server.
|
|
20
20
|
|
|
21
|
+
## [OAuth external apps agent](oauth-external-apps-agent)
|
|
22
|
+
This sample shows how to build a LangGraph agent that connects to a remote UiPath MCP server using OAuth authentication through an external UiPath application for dynamic access token management.
|
|
23
|
+
|
|
21
24
|
## [Ticket classification](ticket-classification)
|
|
22
25
|
This sample demonstrates automatic classification of support tickets into categories. It includes a human approval step via UiPath Action Center.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# LangGraph Agent with OAuth and MCP Servers
|
|
2
|
+
|
|
3
|
+
This project demonstrates how to build a LangGraph agent that connects to a remote UiPath MCP server, using an external UiPath application to handle OAuth authentication.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
The agent uses:
|
|
8
|
+
- UiPathChat with Claude 3.5 Sonnet as the language model
|
|
9
|
+
- LangGraph for orchestration
|
|
10
|
+
- Remote tool execution via UiPath MCP server
|
|
11
|
+
- Dynamic access token refresh through client credentials grant (OAuth)
|
|
12
|
+
|
|
13
|
+
## Architecture
|
|
14
|
+
|
|
15
|
+
```mermaid
|
|
16
|
+
---
|
|
17
|
+
config:
|
|
18
|
+
flowchart:
|
|
19
|
+
curve: linear
|
|
20
|
+
---
|
|
21
|
+
graph TD;
|
|
22
|
+
__start__([<p>__start__</p>]):::first
|
|
23
|
+
fetch_new_access_token(fetch_new_access_token)
|
|
24
|
+
connect_to_mcp(connect_to_mcp)
|
|
25
|
+
__end__([<p>__end__</p>]):::last
|
|
26
|
+
__start__ -.-> connect_to_mcp;
|
|
27
|
+
__start__ -.-> fetch_new_access_token;
|
|
28
|
+
fetch_new_access_token --> connect_to_mcp;
|
|
29
|
+
connect_to_mcp --> __end__;
|
|
30
|
+
classDef default fill:#f2f0ff,line-height:1.2
|
|
31
|
+
classDef first fill-opacity:0
|
|
32
|
+
classDef last fill:#bfb6fc
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
The workflow follows a ReAct pattern:
|
|
36
|
+
1. Query is sent to the agent
|
|
37
|
+
2. The agent first attempts to connect to the remote MCP server using the current `UIPATH_ACCESS_TOKEN`.
|
|
38
|
+
3. If the token is missing or expired, the workflow triggers a call to the UiPath external application endpoint to fetch a fresh token and stores it in the environment.
|
|
39
|
+
4. Once connected, the MCP tools are loaded into the ReAct agent.
|
|
40
|
+
5. The agent receives both system context and the human task, deciding whether to invoke tools or provide a direct answer.
|
|
41
|
+
6. The process repeats until the agent has enough information to produce a final response.
|
|
42
|
+
7. The response is collected and returned as the workflow output.
|
|
43
|
+
|
|
44
|
+
## Prerequisites
|
|
45
|
+
|
|
46
|
+
- Python 3.10+
|
|
47
|
+
- `uipath-langchain`
|
|
48
|
+
- `langchain-mcp-adapters`
|
|
49
|
+
- `langgraph`
|
|
50
|
+
- `httpx`
|
|
51
|
+
- `python-dotenv`
|
|
52
|
+
- UiPath OAuth credentials and MCP server URL in environment
|
|
53
|
+
- UiPath external application configured with `OR.Jobs` scope (or appropriate scope for your MCP server)
|
|
54
|
+
|
|
55
|
+
## Installation
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
uv venv -p 3.11 .venv
|
|
59
|
+
.venv\Scripts\activate
|
|
60
|
+
uv sync
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Set your MCP Remote Server URL and client secret as environment variables in .env
|
|
64
|
+
|
|
65
|
+
```bash
|
|
66
|
+
UIPATH_CLIENT_SECRET=your_client_secret
|
|
67
|
+
UIPATH_MCP_SERVER_URL=https://your-uipath-instance/account/tenant/mcp_/mcp/server_slug
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Configure the following constants in `main.py`:
|
|
71
|
+
- `UIPATH_CLIENT_ID` - Your external application client ID
|
|
72
|
+
- `UIPATH_URL` - Your UiPath instance base URL
|
|
73
|
+
- `UIPATH_SCOPE` - OAuth scope (default: `OR.Jobs`)
|
|
74
|
+
|
|
75
|
+
## Debugging
|
|
76
|
+
|
|
77
|
+
For debugging issues:
|
|
78
|
+
|
|
79
|
+
1. Check logs for any connection or runtime errors:
|
|
80
|
+
```bash
|
|
81
|
+
uipath run agent --debug '{"task": "What is 2 + 2?"}'
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{ "task": "What is 2+2" }
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import os
|
|
2
|
+
import dotenv
|
|
3
|
+
import httpx
|
|
4
|
+
from contextlib import asynccontextmanager
|
|
5
|
+
from typing import Optional, Literal
|
|
6
|
+
|
|
7
|
+
from pydantic import BaseModel
|
|
8
|
+
from langgraph.graph import StateGraph, START, END
|
|
9
|
+
from langgraph.types import Command
|
|
10
|
+
from langgraph.prebuilt import create_react_agent
|
|
11
|
+
from langchain.schema import SystemMessage, HumanMessage
|
|
12
|
+
|
|
13
|
+
from uipath_langchain.chat.models import UiPathChat
|
|
14
|
+
from langchain_mcp_adapters.tools import load_mcp_tools
|
|
15
|
+
from mcp import ClientSession
|
|
16
|
+
from mcp.client.streamable_http import streamablehttp_client
|
|
17
|
+
from uipath import UiPath
|
|
18
|
+
|
|
19
|
+
dotenv.load_dotenv()
|
|
20
|
+
|
|
21
|
+
UIPATH_CLIENT_ID = "EXTERNAL_APP_CLIENT_ID_HERE"
|
|
22
|
+
UIPATH_CLIENT_SECRET = os.getenv("UIPATH_CLIENT_SECRET")
|
|
23
|
+
UIPATH_SCOPE = "OR.Jobs"
|
|
24
|
+
UIPATH_URL = "base_url"
|
|
25
|
+
UIPATH_MCP_SERVER_URL = os.getenv("UIPATH_MCP_SERVER_URL")
|
|
26
|
+
|
|
27
|
+
class GraphInput(BaseModel):
|
|
28
|
+
task: str
|
|
29
|
+
|
|
30
|
+
class GraphOutput(BaseModel):
|
|
31
|
+
result: str
|
|
32
|
+
|
|
33
|
+
class State(BaseModel):
|
|
34
|
+
task: str
|
|
35
|
+
access_token: Optional[str] = os.getenv("UIPATH_ACCESS_TOKEN")
|
|
36
|
+
result: Optional[str] = None
|
|
37
|
+
|
|
38
|
+
async def fetch_new_access_token(state: State) -> Command:
|
|
39
|
+
try:
|
|
40
|
+
UiPath(
|
|
41
|
+
base_url=UIPATH_URL,
|
|
42
|
+
client_id=UIPATH_CLIENT_ID,
|
|
43
|
+
client_secret=UIPATH_CLIENT_SECRET,
|
|
44
|
+
scope=UIPATH_SCOPE,
|
|
45
|
+
)
|
|
46
|
+
return Command(update={"access_token": os.getenv("UIPATH_ACCESS_TOKEN")})
|
|
47
|
+
|
|
48
|
+
except Exception as e:
|
|
49
|
+
raise Exception(f"Failed to initialize UiPath SDK: {str(e)}")
|
|
50
|
+
|
|
51
|
+
@asynccontextmanager
|
|
52
|
+
async def agent_mcp(access_token: str):
|
|
53
|
+
async with streamablehttp_client(
|
|
54
|
+
url=UIPATH_MCP_SERVER_URL,
|
|
55
|
+
headers={"Authorization": f"Bearer {access_token}"},
|
|
56
|
+
timeout=60,
|
|
57
|
+
) as (read, write, _):
|
|
58
|
+
async with ClientSession(read, write) as session:
|
|
59
|
+
await session.initialize()
|
|
60
|
+
tools = await load_mcp_tools(session)
|
|
61
|
+
model = UiPathChat(model="anthropic.claude-3-5-sonnet-20240620-v1:0")
|
|
62
|
+
agent = create_react_agent(model, tools=tools)
|
|
63
|
+
yield agent
|
|
64
|
+
|
|
65
|
+
async def connect_to_mcp(state: State) -> Command:
|
|
66
|
+
try:
|
|
67
|
+
async with agent_mcp(state.access_token) as agent:
|
|
68
|
+
agent_response = await agent.ainvoke({
|
|
69
|
+
"messages": [
|
|
70
|
+
SystemMessage(content="You are a helpful assistant."),
|
|
71
|
+
HumanMessage(content=state.task),
|
|
72
|
+
],
|
|
73
|
+
})
|
|
74
|
+
return Command(update={"result": agent_response["messages"][-1].content})
|
|
75
|
+
except ExceptionGroup as e:
|
|
76
|
+
for error in e.exceptions:
|
|
77
|
+
if isinstance(error, httpx.HTTPStatusError) and error.response.status_code == 401:
|
|
78
|
+
return Command(update={"access_token": None})
|
|
79
|
+
raise
|
|
80
|
+
|
|
81
|
+
def route_start(state: State) -> Literal["fetch_new_access_token", "connect_to_mcp"]:
|
|
82
|
+
return "fetch_new_access_token" if state.access_token is None else "connect_to_mcp"
|
|
83
|
+
|
|
84
|
+
def route_after_connect(state: State):
|
|
85
|
+
return "fetch_new_access_token" if state.access_token is None else END
|
|
86
|
+
|
|
87
|
+
builder = StateGraph(State, input=GraphInput, output=GraphOutput)
|
|
88
|
+
builder.add_node("fetch_new_access_token", fetch_new_access_token)
|
|
89
|
+
builder.add_node("connect_to_mcp", connect_to_mcp)
|
|
90
|
+
|
|
91
|
+
builder.add_conditional_edges(START, route_start)
|
|
92
|
+
builder.add_edge("fetch_new_access_token", "connect_to_mcp")
|
|
93
|
+
builder.add_conditional_edges("connect_to_mcp", route_after_connect)
|
|
94
|
+
|
|
95
|
+
graph = builder.compile()
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "oauth-external-apps-agent"
|
|
3
|
+
version = "0.0.7"
|
|
4
|
+
description = "Agent that connects to an MCP server implementing OAuth using an external application."
|
|
5
|
+
authors = [{ name = "John Doe", email = "john.doe@myemail.com" }]
|
|
6
|
+
dependencies = [
|
|
7
|
+
"uipath-langchain>=0.0.140",
|
|
8
|
+
"langchain>=0.3.26",
|
|
9
|
+
"langchain-anthropic>=0.3.17",
|
|
10
|
+
"langgraph>=0.5.3",
|
|
11
|
+
"python-dotenv>=1.0.0",
|
|
12
|
+
"anthropic>=0.57.1",
|
|
13
|
+
"langchain-mcp-adapters>=0.1.9",
|
|
14
|
+
"mypy>=1.17.1",
|
|
15
|
+
"uipath>=2.1.38",
|
|
16
|
+
]
|
|
17
|
+
requires-python = ">=3.10"
|