Skip to content

Commit aedb4e5

Browse files
committed
docs: add SETUP.MD
PRODEV-624
1 parent 7d8e793 commit aedb4e5

15 files changed

Lines changed: 246 additions & 101 deletions

File tree

SETUP.MD

Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# SETUP.MD
2+
3+
This file documents how to provision a clean development environment for the five packages in this repo (`uipath-agent-framework`, `uipath-google-adk`, `uipath-llamaindex`, `uipath-openai-agents`, `uipath-pydantic-ai`), run the build, execute the tests, and validate a sample code change end-to-end. It is intended both as a quick reference for human contributors and as a structured guide for automated environment-setup tooling.
4+
5+
## Prerequisites
6+
7+
- Python 3.11+
8+
- [uv](https://docs.astral.sh/uv/) 0.5+
9+
10+
### Supported platforms
11+
12+
`uv` is shell- and OS-agnostic, so the commands below run unchanged on every supported platform:
13+
14+
- [x] Linux
15+
- [x] Windows
16+
- [x] macOS
17+
18+
## Environment Variables
19+
20+
### Standard
21+
22+
None of the common shared environment variables (e.g. `AZURE_DEVOPS_PAT`, `GH_NPM_REGISTRY_TOKEN`) are required for environment setup, build, or unit tests.
23+
24+
### Project-specific
25+
26+
None. The unit-test suites under the `Test` section below run fully offline and require no external authentication.
27+
28+
> **All commands below must be run from the repository root.** The `uv --directory packages/<name>` invocations resolve each subpackage relative to the current working directory. The first line of `## Setup` enforces this by `cd`-ing to the git root.
29+
30+
## Setup
31+
32+
```bash
33+
cd "$(git rev-parse --show-toplevel)"
34+
python3 -m pip install --upgrade uv
35+
36+
# Sync all five packages (each is independent)
37+
uv --directory packages/uipath-agent-framework sync --all-extras
38+
uv --directory packages/uipath-google-adk sync --all-extras
39+
uv --directory packages/uipath-llamaindex sync --all-extras
40+
uv --directory packages/uipath-openai-agents sync --all-extras
41+
uv --directory packages/uipath-pydantic-ai sync --all-extras
42+
```
43+
44+
## Verify Setup
45+
46+
```bash
47+
uv --version
48+
uv --directory packages/uipath-pydantic-ai run python --version
49+
uv --directory packages/uipath-agent-framework run python -c "import uipath_agent_framework; print('uipath-agent-framework ok')"
50+
uv --directory packages/uipath-google-adk run python -c "import uipath_google_adk; print('uipath-google-adk ok')"
51+
uv --directory packages/uipath-llamaindex run python -c "import uipath_llamaindex; print('uipath-llamaindex ok')"
52+
uv --directory packages/uipath-openai-agents run python -c "import uipath_openai_agents; print('uipath-openai-agents ok')"
53+
uv --directory packages/uipath-pydantic-ai run python -c "import uipath_pydantic_ai; print('uipath-pydantic-ai ok')"
54+
```
55+
56+
## Build
57+
58+
N/A
59+
60+
## Test
61+
62+
```bash
63+
uv --directory packages/uipath-agent-framework run pytest
64+
uv --directory packages/uipath-google-adk run pytest
65+
uv --directory packages/uipath-llamaindex run pytest
66+
uv --directory packages/uipath-openai-agents run pytest
67+
uv --directory packages/uipath-pydantic-ai run pytest
68+
```
69+
70+
## Sample Code Change
71+
72+
### The change
73+
74+
Add a new `agent_count` property to `PydanticAiConfig` in `packages/uipath-pydantic-ai/src/uipath_pydantic_ai/runtime/config.py`, immediately after the existing `entrypoint` property:
75+
76+
```python
77+
@property
78+
def agent_count(self) -> int:
79+
"""Number of agents defined in the configuration."""
80+
return len(self.agents)
81+
```
82+
83+
Then create `packages/uipath-pydantic-ai/tests/test_config_agent_count.py` with two pytest tests:
84+
85+
```python
86+
"""Tests for PydanticAiConfig.agent_count."""
87+
88+
import json
89+
from pathlib import Path
90+
91+
from uipath_pydantic_ai.runtime.config import PydanticAiConfig
92+
93+
94+
def test_agent_count_single(tmp_path: Path) -> None:
95+
config_path = tmp_path / "pydantic_ai.json"
96+
config_path.write_text(json.dumps({"agents": {"main": "main:agent"}}))
97+
cfg = PydanticAiConfig(str(config_path))
98+
assert cfg.agent_count == 1
99+
100+
101+
def test_agent_count_multiple(tmp_path: Path) -> None:
102+
config_path = tmp_path / "pydantic_ai.json"
103+
config_path.write_text(
104+
json.dumps(
105+
{
106+
"agents": {
107+
"alpha": "alpha:agent",
108+
"beta": "beta:agent",
109+
"gamma": "gamma:agent",
110+
}
111+
}
112+
)
113+
)
114+
cfg = PydanticAiConfig(str(config_path))
115+
assert cfg.agent_count == 3
116+
```
117+
118+
### Verification
119+
120+
```bash
121+
uv --directory packages/uipath-pydantic-ai run pytest tests/test_config_agent_count.py -v
122+
```
123+
124+
## Test with a real UiPath Coded Agent
125+
126+
The unit tests above are necessary but not sufficient — they don't exercise the package end-to-end through a real agent. The flow below validates changes against a live runtime:
127+
128+
1. Apply the code changes locally.
129+
2. Run the unit tests (see the `Sample Code Change` section above).
130+
3. Scaffold a coded UiPath agent (PydanticAI / OpenAI / Google ADK / LlamaIndex / Agent Framework, matching the package you changed) that exercises the changed code path.
131+
4. In the downstream project's `pyproject.toml`, add this local library as an editable dependency (substitute the package you changed):
132+
133+
```toml
134+
[tool.uv.sources]
135+
uipath-pydantic-ai = { path = "../path/to/uipath-integrations-python/packages/uipath-pydantic-ai", editable = true }
136+
```
137+
138+
5. Exercise the new behavior end-to-end:
139+
140+
```bash
141+
uv run uipath run <agent-name> --input '{...}'
142+
```
143+
144+
6. (Optional) Open a PR and apply the `build:dev` label — this publishes the development version to Test PyPI.
145+
7. The PR description is updated automatically with instructions for pointing the downstream agent at the Test PyPI dev version.
146+
8. Push the dev version to UiPath with [`uipath push`](https://uipath.github.io/uipath-python/cli/#push), then deploy it to Orchestrator or Studio Web with [`uipath deploy`](https://uipath.github.io/uipath-python/cli/#deploy), and run it in cloud to confirm the changes behave correctly against the real platform.

packages/uipath-agent-framework/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "uipath-agent-framework"
3-
version = "0.0.13"
3+
version = "0.0.12"
44
description = "Python SDK that enables developers to build and deploy Microsoft Agent Framework agents to the UiPath Cloud Platform"
55
readme = "README.md"
66
requires-python = ">=3.11"
@@ -10,7 +10,7 @@ dependencies = [
1010
"aiosqlite>=0.20.0",
1111
"openinference-instrumentation-agent-framework>=0.1.0",
1212
"uipath>=2.10.0, <2.11.0",
13-
"uipath-runtime>=0.11.0, <0.12.0",
13+
"uipath-runtime>=0.10.0, <0.11.0",
1414
]
1515
classifiers = [
1616
"Intended Audience :: Developers",

packages/uipath-agent-framework/tests/test_hitl_e2e.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ def __init__(self, auto_approve: bool = True):
7171
self.auto_approve = auto_approve
7272
self.interrupts: list[UiPathResumeTrigger] = []
7373
self.messages: list[Any] = []
74-
self.executing_tool_calls: list[tuple[str, dict[str, Any] | None]] = []
7574

7675
async def connect(self) -> None:
7776
pass
@@ -85,13 +84,6 @@ async def emit_message_event(self, message_event: Any) -> None:
8584
async def emit_interrupt_event(self, resume_trigger: UiPathResumeTrigger) -> None:
8685
self.interrupts.append(resume_trigger)
8786

88-
async def emit_executing_tool_call_event(
89-
self,
90-
tool_call_id: str,
91-
tool_input: dict[str, Any] | None = None,
92-
) -> None:
93-
self.executing_tool_calls.append((tool_call_id, tool_input))
94-
9587
async def emit_exchange_end_event(self) -> None:
9688
pass
9789

packages/uipath-agent-framework/uv.lock

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/uipath-google-adk/pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[project]
22
name = "uipath-google-adk"
3-
version = "0.0.8"
3+
version = "0.0.7"
44
description = "Python SDK that enables developers to build and deploy Google ADK agents to the UiPath Cloud Platform"
55
readme = "README.md"
66
requires-python = ">=3.11"
77
dependencies = [
88
"google-adk>=1.25.1",
99
"openinference-instrumentation-google-adk>=0.1.9",
1010
"uipath>=2.10.0, <2.11.0",
11-
"uipath-runtime>=0.11.0, <0.12.0",
11+
"uipath-runtime>=0.10.0, <0.11.0",
1212
]
1313
classifiers = [
1414
"Intended Audience :: Developers",

0 commit comments

Comments
 (0)