Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 124 additions & 0 deletions SETUP.MD
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# SETUP.MD

## Prerequisites

- Python 3.11+
- [uv](https://docs.astral.sh/uv/) 0.5+

### Supported platforms
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ### Supported platforms heading is mandated verbatim by the Agentic Inner Loop SETUP.md spec — the validation pipeline parses for that exact section title. Renaming risks setup-file-malformed. The clarifying paragraph below already scopes it to the KPI target.


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
```
Loading