-
Notifications
You must be signed in to change notification settings - Fork 8
feat: add multi-agent graph, streaming, LLM providers for agent-framework #183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| 3.11 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,131 @@ | ||
| # UiPath Agent Framework Python SDK | ||
|
|
||
| [](https://pypi.org/project/uipath-agent-framework/) | ||
| [](https://pypi.org/project/uipath-agent-framework/) | ||
| [](https://pypi.org/project/uipath-agent-framework/) | ||
|
|
||
| A Python SDK that enables developers to build and deploy [Agent Framework](https://github.com/microsoft/agent-framework) agents to the UiPath Cloud Platform. It provides programmatic interaction with UiPath Cloud Platform services. | ||
|
|
||
| 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). | ||
|
|
||
| Check out these [sample projects](https://github.com/UiPath/uipath-integrations-python/tree/main/packages/uipath-agent-framework/samples) to see the SDK in action. | ||
|
|
||
| ## Requirements | ||
|
|
||
| - Python 3.11 or higher | ||
| - UiPath Automation Cloud account | ||
|
|
||
| ## Installation | ||
|
|
||
| ```bash | ||
| pip install uipath-agent-framework | ||
| ``` | ||
|
|
||
| using `uv`: | ||
|
|
||
| ```bash | ||
| uv add uipath-agent-framework | ||
| ``` | ||
|
|
||
| For Anthropic model support: | ||
|
|
||
| ```bash | ||
| pip install 'uipath-agent-framework[anthropic]' | ||
| ``` | ||
|
|
||
| ## Configuration | ||
|
|
||
| ### Environment Variables | ||
|
|
||
| Create a `.env` file in your project root with the following variables: | ||
|
|
||
| ``` | ||
| UIPATH_URL=https://cloud.uipath.com/ACCOUNT_NAME/TENANT_NAME | ||
| UIPATH_ACCESS_TOKEN=YOUR_TOKEN_HERE | ||
| ``` | ||
|
|
||
| ## Command Line Interface (CLI) | ||
|
|
||
| The SDK provides a command-line interface for creating, packaging, and deploying Agent Framework agents: | ||
|
|
||
| ### Authentication | ||
|
|
||
| ```bash | ||
| uipath auth | ||
| ``` | ||
|
|
||
| This command opens a browser for authentication and creates/updates your `.env` file with the proper credentials. | ||
|
|
||
| ### Initialize a Project | ||
|
|
||
| ```bash | ||
| uipath init | ||
| ``` | ||
|
|
||
| Running `uipath init` will process the agent definitions in the `agent_framework.json` file and create the corresponding `entry-points.json` file needed for deployment. | ||
|
|
||
| For more details on the configuration format, see the [UiPath configuration specifications](https://github.com/UiPath/uipath-python/blob/main/specs/README.md). | ||
|
|
||
| ### Debug a Project | ||
|
|
||
| ```bash | ||
| uipath run AGENT [INPUT] | ||
| ``` | ||
|
|
||
| Executes the agent with the provided JSON input arguments. | ||
|
|
||
| ### Package a Project | ||
|
|
||
| ```bash | ||
| uipath pack | ||
| ``` | ||
|
|
||
| Packages your project into a `.nupkg` file that can be deployed to UiPath. | ||
|
|
||
| **Note:** Your `pyproject.toml` must include: | ||
|
|
||
| - A description field (avoid characters: &, <, >, ", ', ;) | ||
| - Author information | ||
|
|
||
| Example: | ||
|
|
||
| ```toml | ||
| description = "Your package description" | ||
| authors = [{name = "Your Name", email = "your.email@example.com"}] | ||
| ``` | ||
|
|
||
| ### Publish a Package | ||
|
|
||
| ```bash | ||
| uipath publish | ||
| ``` | ||
|
|
||
| Publishes the most recently created package to your UiPath Orchestrator. | ||
|
|
||
| ## Project Structure | ||
|
|
||
| To properly use the CLI for packaging and publishing, your project should include: | ||
|
|
||
| - A `pyproject.toml` file with project metadata | ||
| - An `agent_framework.json` file with your agent definitions (e.g., `"agents": {"agent": "main.py:agent"}`) | ||
| - An `entry-points.json` file (generated by `uipath init`) | ||
| - A `bindings.json` file (generated by `uipath init`) to configure resource overrides | ||
| - Any Python files needed for your automation | ||
|
|
||
| ## Development | ||
|
|
||
| ### Developer Tools | ||
|
|
||
| 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. | ||
|
|
||
| ### Setting Up a Development Environment | ||
|
|
||
| Please read our [contribution guidelines](https://github.com/UiPath/uipath-integrations-python/packages/uipath-agent-framework/blob/main/CONTRIBUTING.md) before submitting a pull request. | ||
|
|
||
| ### Special Thanks | ||
|
|
||
| A huge thank-you to the open-source community and the maintainers of the libraries that make this project possible: | ||
|
|
||
| - [Agent Framework](https://github.com/microsoft/agent-framework) for providing a flexible framework for building AI agents. | ||
| - [OpenInference](https://github.com/Arize-ai/openinference) for observability and instrumentation support. | ||
| - [Pydantic](https://github.com/pydantic/pydantic) for reliable, typed configuration and validation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,113 @@ | ||
| [project] | ||
| name = "uipath-agent-framework" | ||
| version = "0.0.1" | ||
| description = "Python SDK that enables developers to build and deploy Microsoft Agent Framework agents to the UiPath Cloud Platform" | ||
| readme = "README.md" | ||
| requires-python = ">=3.11" | ||
| dependencies = [ | ||
| "agent-framework-core>=1.0.0b260212", | ||
| "openinference-instrumentation-agent-framework>=0.1.0", | ||
| "uipath>=2.8.41, <2.9.0", | ||
| "uipath-runtime>=0.9.0, <0.10.0", | ||
| ] | ||
| classifiers = [ | ||
| "Intended Audience :: Developers", | ||
| "Topic :: Software Development :: Build Tools", | ||
| "Programming Language :: Python :: 3.11", | ||
| "Programming Language :: Python :: 3.12", | ||
| "Programming Language :: Python :: 3.13", | ||
| ] | ||
| maintainers = [ | ||
| { name = "Cristian Pufu", email = "cristian.pufu@uipath.com" } | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| anthropic = ["anthropic>=0.43.0", "agent-framework-anthropic>=1.0.0b260212"] | ||
|
|
||
| [project.entry-points."uipath.middlewares"] | ||
| register = "uipath_agent_framework.middlewares:register_middleware" | ||
|
|
||
| [project.entry-points."uipath.runtime.factories"] | ||
| agent-framework = "uipath_agent_framework.runtime:register_runtime_factory" | ||
|
|
||
| [project.urls] | ||
| Homepage = "https://uipath.com" | ||
| Repository = "https://github.com/UiPath/uipath-integrations-python" | ||
|
|
||
| [build-system] | ||
| requires = ["hatchling"] | ||
| build-backend = "hatchling.build" | ||
|
|
||
| [dependency-groups] | ||
| dev = [ | ||
| "mypy>=1.19.1", | ||
| "ruff>=0.15.1", | ||
| "pytest>=9.0.2", | ||
| "pytest-cov>=7.0.0", | ||
| "pytest-mock>=3.15.1", | ||
| "pre-commit>=4.5.1", | ||
| "pytest-asyncio>=1.3.0", | ||
| ] | ||
|
|
||
| [tool.ruff] | ||
| line-length = 88 | ||
| indent-width = 4 | ||
|
|
||
| [tool.ruff.lint] | ||
| select = ["E", "F", "B", "I"] | ||
|
|
||
| [tool.ruff.lint.per-file-ignores] | ||
| "*" = ["E501"] | ||
|
|
||
| [tool.ruff.format] | ||
| quote-style = "double" | ||
| indent-style = "space" | ||
| skip-magic-trailing-comma = false | ||
| line-ending = "auto" | ||
|
|
||
| [tool.mypy] | ||
| plugins = [ | ||
| "pydantic.mypy" | ||
| ] | ||
| exclude = [ | ||
| "samples/.*", | ||
| "testcases/.*" | ||
| ] | ||
| follow_imports = "silent" | ||
| warn_redundant_casts = true | ||
| warn_unused_ignores = false | ||
| disallow_any_generics = true | ||
| check_untyped_defs = true | ||
| no_implicit_reexport = true | ||
| disallow_untyped_defs = false | ||
|
|
||
| [[tool.mypy.overrides]] | ||
| module = "agent_framework.*" | ||
| ignore_missing_imports = true | ||
| ignore_errors = true | ||
|
|
||
| [[tool.mypy.overrides]] | ||
| module = "openinference.*" | ||
| ignore_missing_imports = true | ||
| ignore_errors = true | ||
|
|
||
| [[tool.mypy.overrides]] | ||
| module = "agent_framework_anthropic.*" | ||
| ignore_missing_imports = true | ||
| ignore_errors = true | ||
|
|
||
| [tool.pytest.ini_options] | ||
| testpaths = ["tests"] | ||
| python_files = "test_*.py" | ||
| addopts = "-ra -q" | ||
| asyncio_default_fixture_loop_scope = "function" | ||
| asyncio_mode = "auto" | ||
|
|
||
| [tool.uv] | ||
| prerelease = "allow" | ||
|
|
||
| [[tool.uv.index]] | ||
| name = "testpypi" | ||
| url = "https://test.pypi.org/simple/" | ||
| publish-url = "https://test.pypi.org/legacy/" | ||
| explicit = true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.