diff --git a/packages/uipath/pyproject.toml b/packages/uipath/pyproject.toml index 6c2bfecab..e0b493573 100644 --- a/packages/uipath/pyproject.toml +++ b/packages/uipath/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "uipath" -version = "2.14.40" +version = "2.14.41" description = "Python SDK and CLI for UiPath Platform, enabling programmatic interaction with automation services, process management, and deployment tools." readme = { file = "README.md", content-type = "text/markdown" } requires-python = ">=3.11" diff --git a/packages/uipath/src/uipath/_cli/_run_telemetry.py b/packages/uipath/src/uipath/_cli/_run_telemetry.py index 7b33fbd0f..d0751496a 100644 --- a/packages/uipath/src/uipath/_cli/_run_telemetry.py +++ b/packages/uipath/src/uipath/_cli/_run_telemetry.py @@ -112,12 +112,14 @@ def __init__( self, *, kind: RunKind, + agent_framework: str | None, entrypoint: str | None, execution_source: str | None, is_conversational: bool, ) -> None: """Key the run on its job so a suspend/resume pair stays one run.""" self._kind = kind + self._agent_framework = agent_framework self._entrypoint = entrypoint self._execution_source = execution_source self._is_conversational = is_conversational @@ -147,6 +149,7 @@ def start( instance = cls( kind=kind, + agent_framework=agent_framework, entrypoint=entrypoint, execution_source=execution_source, is_conversational=is_conversational, @@ -194,6 +197,7 @@ def _emit( properties: dict[str, Any] = { "AgentRunId": self._run_id, "AgentType": "Coded", + "AgentFramework": self._agent_framework, "AgentRunSource": self._execution_source, "Entrypoint": self._entrypoint, "IsConversational": self._is_conversational, diff --git a/packages/uipath/tests/cli/test_run_telemetry.py b/packages/uipath/tests/cli/test_run_telemetry.py index bdd7a1260..236a6c6ff 100644 --- a/packages/uipath/tests/cli/test_run_telemetry.py +++ b/packages/uipath/tests/cli/test_run_telemetry.py @@ -111,6 +111,25 @@ def test_factory_without_settings_defaults_to_coded_agent(self, emitted): assert names(emitted) == ["CodedAgentRun.Start"] +class TestAgentFramework: + def test_framework_is_reported_on_every_event(self, emitted): + completed = start(agent_framework="llamaindex") + assert completed is not None + completed.finished(successful()) + crashed = start(agent_framework="llamaindex") + assert crashed is not None + crashed.failed(RuntimeError("boom")) + + assert names(emitted) == [ + "CodedAgentRun.Start", + "CodedAgentRun.End", + "CodedAgentRun.Start", + "CodedAgentRun.Failed", + ] + for name, properties in emitted: + assert properties.get("AgentFramework") == "llamaindex", name + + class TestScopeBlock: def test_scope_is_present_on_start_and_terminal_events(self, emitted): started().finished(successful()) diff --git a/packages/uipath/uv.lock b/packages/uipath/uv.lock index 4724d0e3f..1be243190 100644 --- a/packages/uipath/uv.lock +++ b/packages/uipath/uv.lock @@ -2599,7 +2599,7 @@ wheels = [ [[package]] name = "uipath" -version = "2.14.40" +version = "2.14.41" source = { editable = "." } dependencies = [ { name = "applicationinsights" },