Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion packages/uipath/pyproject.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
4 changes: 4 additions & 0 deletions packages/uipath/src/uipath/_cli/_run_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -147,6 +149,7 @@ def start(

instance = cls(
kind=kind,
agent_framework=agent_framework,
entrypoint=entrypoint,
execution_source=execution_source,
is_conversational=is_conversational,
Expand Down Expand Up @@ -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,
Expand Down
19 changes: 19 additions & 0 deletions packages/uipath/tests/cli/test_run_telemetry.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
2 changes: 1 addition & 1 deletion packages/uipath/uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading