Skip to content

Commit 06b7849

Browse files
committed
docs: add SETUP.MD for Agentic Inner Loop KPI
PRODEV-624
1 parent bb2385d commit 06b7849

1 file changed

Lines changed: 125 additions & 0 deletions

File tree

SETUP.MD

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
# SETUP.MD
2+
3+
## Prerequisites
4+
5+
- Python 3.11+
6+
- [uv](https://docs.astral.sh/uv/) 0.5+
7+
8+
### Supported platforms
9+
10+
This checklist controls the Agentic Inner Loop KPI pipeline targets (clean Linux VM). The repo's own GitHub Actions CI additionally tests on `windows-latest`, but that is not measured by this KPI.
11+
12+
- [x] Linux
13+
- [ ] Windows
14+
- [ ] macOS
15+
16+
## Environment Variables
17+
18+
### Standard (injected by pipeline)
19+
20+
None of the standard pipeline variables are required for environment setup, build, or unit tests.
21+
22+
### Project-specific
23+
24+
None. The unit-test suites under the `Test` section below run fully offline and require no external authentication.
25+
26+
## Setup
27+
28+
```bash
29+
# Install uv if not present
30+
curl -LsSf https://astral.sh/uv/install.sh | sh
31+
export PATH="$HOME/.local/bin:$PATH"
32+
33+
# Sync all five packages with dev dependencies (each is independent)
34+
uv --directory packages/uipath-agent-framework sync --all-extras
35+
uv --directory packages/uipath-google-adk sync --all-extras
36+
uv --directory packages/uipath-llamaindex sync --all-extras
37+
uv --directory packages/uipath-openai-agents sync --all-extras
38+
uv --directory packages/uipath-pydantic-ai sync --all-extras
39+
```
40+
41+
## Verify Setup
42+
43+
```bash
44+
python3 --version
45+
uv --version
46+
uv --directory packages/uipath-agent-framework run python -c "import uipath_agent_framework; print('uipath-agent-framework ok')"
47+
uv --directory packages/uipath-google-adk run python -c "import uipath_google_adk; print('uipath-google-adk ok')"
48+
uv --directory packages/uipath-llamaindex run python -c "import uipath_llamaindex; print('uipath-llamaindex ok')"
49+
uv --directory packages/uipath-openai-agents run python -c "import uipath_openai_agents; print('uipath-openai-agents ok')"
50+
uv --directory packages/uipath-pydantic-ai run python -c "import uipath_pydantic_ai; print('uipath-pydantic-ai ok')"
51+
```
52+
53+
## Build
54+
55+
```bash
56+
uv --directory packages/uipath-agent-framework build
57+
uv --directory packages/uipath-google-adk build
58+
uv --directory packages/uipath-llamaindex build
59+
uv --directory packages/uipath-openai-agents build
60+
uv --directory packages/uipath-pydantic-ai build
61+
```
62+
63+
## Test
64+
65+
```bash
66+
uv --directory packages/uipath-agent-framework run pytest
67+
uv --directory packages/uipath-google-adk run pytest
68+
uv --directory packages/uipath-llamaindex run pytest
69+
uv --directory packages/uipath-openai-agents run pytest
70+
uv --directory packages/uipath-pydantic-ai run pytest
71+
```
72+
73+
## Sample Code Change
74+
75+
### The change
76+
77+
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:
78+
79+
```python
80+
@property
81+
def agent_count(self) -> int:
82+
"""Number of agents defined in the configuration."""
83+
return len(self.agents)
84+
```
85+
86+
Then create `packages/uipath-pydantic-ai/tests/test_config_agent_count.py` with two pytest tests:
87+
88+
```python
89+
"""Tests for PydanticAiConfig.agent_count."""
90+
91+
import json
92+
from pathlib import Path
93+
94+
from uipath_pydantic_ai.runtime.config import PydanticAiConfig
95+
96+
97+
def test_agent_count_single(tmp_path: Path) -> None:
98+
config_path = tmp_path / "pydantic_ai.json"
99+
config_path.write_text(json.dumps({"agents": {"main": "main:agent"}}))
100+
cfg = PydanticAiConfig(str(config_path))
101+
assert cfg.agent_count == 1
102+
103+
104+
def test_agent_count_multiple(tmp_path: Path) -> None:
105+
config_path = tmp_path / "pydantic_ai.json"
106+
config_path.write_text(
107+
json.dumps(
108+
{
109+
"agents": {
110+
"alpha": "alpha:agent",
111+
"beta": "beta:agent",
112+
"gamma": "gamma:agent",
113+
}
114+
}
115+
)
116+
)
117+
cfg = PydanticAiConfig(str(config_path))
118+
assert cfg.agent_count == 3
119+
```
120+
121+
### Verification
122+
123+
```bash
124+
uv --directory packages/uipath-pydantic-ai run pytest tests/test_config_agent_count.py -v
125+
```

0 commit comments

Comments
 (0)