From e6467598adda0e848fa9914ecadf66dd25eab6c5 Mon Sep 17 00:00:00 2001 From: giuliastf Date: Fri, 5 Jun 2026 11:22:00 +0300 Subject: [PATCH] docs: add SETUP.MD for Agentic Inner Loop KPI Adds the SETUP.MD required by the Agentic Inner Loop validation pipeline (MER KPI 11). Documents prerequisites, environment setup, build, test, and a prescribed sample code change so an AI agent can autonomously run the inner dev loop on a clean Linux machine. PRODEV-624 --- SETUP.MD | 124 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 124 insertions(+) create mode 100644 SETUP.MD diff --git a/SETUP.MD b/SETUP.MD new file mode 100644 index 00000000..58b93a77 --- /dev/null +++ b/SETUP.MD @@ -0,0 +1,124 @@ +# SETUP.MD + +## Prerequisites + +- Python 3.11+ +- [uv](https://docs.astral.sh/uv/) 0.5+ + +### Supported platforms + +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. + +- [x] Linux +- [ ] Windows +- [ ] macOS + +## Environment Variables + +### Standard (injected by pipeline) + +None of the standard pipeline variables are required for environment setup, build, or unit tests. + +### Project-specific + +None. The unit-test suites under the `Test` section below run fully offline and require no external authentication. + +## Setup + +```bash +# Install uv if not already on PATH (no-op when pre-installed by the pipeline) +python3 -m pip install --upgrade uv + +# Sync all five packages with dev dependencies (each is independent) +uv --directory packages/uipath-agent-framework sync --all-extras +uv --directory packages/uipath-google-adk sync --all-extras +uv --directory packages/uipath-llamaindex sync --all-extras +uv --directory packages/uipath-openai-agents sync --all-extras +uv --directory packages/uipath-pydantic-ai sync --all-extras +``` + +## Verify Setup + +```bash +python3 --version +uv --version +uv --directory packages/uipath-agent-framework run python -c "import uipath_agent_framework; print('uipath-agent-framework ok')" +uv --directory packages/uipath-google-adk run python -c "import uipath_google_adk; print('uipath-google-adk ok')" +uv --directory packages/uipath-llamaindex run python -c "import uipath_llamaindex; print('uipath-llamaindex ok')" +uv --directory packages/uipath-openai-agents run python -c "import uipath_openai_agents; print('uipath-openai-agents ok')" +uv --directory packages/uipath-pydantic-ai run python -c "import uipath_pydantic_ai; print('uipath-pydantic-ai ok')" +``` + +## Build + +```bash +uv --directory packages/uipath-agent-framework build +uv --directory packages/uipath-google-adk build +uv --directory packages/uipath-llamaindex build +uv --directory packages/uipath-openai-agents build +uv --directory packages/uipath-pydantic-ai build +``` + +## Test + +```bash +uv --directory packages/uipath-agent-framework run pytest +uv --directory packages/uipath-google-adk run pytest +uv --directory packages/uipath-llamaindex run pytest +uv --directory packages/uipath-openai-agents run pytest +uv --directory packages/uipath-pydantic-ai run pytest +``` + +## Sample Code Change + +### The change + +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: + +```python +@property +def agent_count(self) -> int: + """Number of agents defined in the configuration.""" + return len(self.agents) +``` + +Then create `packages/uipath-pydantic-ai/tests/test_config_agent_count.py` with two pytest tests: + +```python +"""Tests for PydanticAiConfig.agent_count.""" + +import json +from pathlib import Path + +from uipath_pydantic_ai.runtime.config import PydanticAiConfig + + +def test_agent_count_single(tmp_path: Path) -> None: + config_path = tmp_path / "pydantic_ai.json" + config_path.write_text(json.dumps({"agents": {"main": "main:agent"}})) + cfg = PydanticAiConfig(str(config_path)) + assert cfg.agent_count == 1 + + +def test_agent_count_multiple(tmp_path: Path) -> None: + config_path = tmp_path / "pydantic_ai.json" + config_path.write_text( + json.dumps( + { + "agents": { + "alpha": "alpha:agent", + "beta": "beta:agent", + "gamma": "gamma:agent", + } + } + ) + ) + cfg = PydanticAiConfig(str(config_path)) + assert cfg.agent_count == 3 +``` + +### Verification + +```bash +uv --directory packages/uipath-pydantic-ai run pytest tests/test_config_agent_count.py -v +```