uipath-python icon indicating copy to clipboard operation
uipath-python copied to clipboard

feat: add stable agentId to uipath.json for packaging and spans

Open radu-mocanu opened this issue 6 months ago • 8 comments

Summary

  • uipath init mints a stable Id into uipath.json, preserved across re-init and backfilled for existing projects
  • uipath pack sources the package projectId from uipath.jso#Id, falling back to the legacy .telemetry.json ProjectKey
  • llmops spans now carry agentId read from uipath.json (cached), falling back to the PROJECT_KEY env var
  • span path caches only the Id string, not the whole uipath.json (immutable value)
  • stop generating telemetry.json on uipath init

Why

a coded agent needs one stable identifier that survives authoring, packaging, and runtime so traces and deployed releases correlate back to the same agent. anchoring it in uipath.json also decouples the id from telemetry being enabled.

Development Packages

uipath

[project]
dependencies = [
  # Exact version (copy-paste ready):
  "uipath==2.10.83.dev1016956735",

  # Any version from this PR (uncomment to use a range instead):
  # "uipath>=2.10.83.dev1016950000,<2.10.83.dev1016960000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath = { index = "testpypi" }
uipath-platform = { index = "testpypi" }

[tool.uv]
override-dependencies = ["uipath-platform==0.1.65.dev1016956735"]

uipath-platform

[project]
dependencies = [
  # Exact version (copy-paste ready):
  "uipath-platform==0.1.65.dev1016956737",

  # Any version from this PR (uncomment to use a range instead):
  # "uipath-platform>=0.1.65.dev1016950000,<0.1.65.dev1016960000",
]

[[tool.uv.index]]
name = "testpypi"
url = "https://test.pypi.org/simple/"
publish-url = "https://test.pypi.org/legacy/"
explicit = true

[tool.uv.sources]
uipath-platform = { index = "testpypi" }

radu-mocanu avatar May 29 '26 16:05 radu-mocanu

But langgraph/llamaindex agents build their own operate.json in the plugin repos and won't source projectId from uipath.json#agentId

This is not true. All UiPath Coded Agents are using the same packager. No changes are needed in the integration repos.

radu-mocanu avatar Jun 03 '26 17:06 radu-mocanu

Separately, on alignment with the vertical-solutions-check-agent-id.yml check

This is not a concern for the coded agents SDK. the changes are backwards compatible, meaning that existing IDs will still be honored. newly created agents will indeed drop telemetry.json file. Any consumer (like that gh action) need to be updated to reflect the new behaviour -> uipath.json as the source of truth.

radu-mocanu avatar Jun 03 '26 17:06 radu-mocanu

Could we extend this to cover function project types as well? agentId isn't the right name for a coded function, could we detect the project type and use functionId accordingly, or pick a generic name that works for both?

If you ask me, everything that can run on the UiPath platform should have a unique GUID identifier that never changes. RPA, coded functions, coded agents, low code agents, etc. ProjectId kind of already seems a generic candidate for that.. but agentId already got introduced as a special ID just for agents. We either keep introducing special IDs such as functionId, or we try to limit the number of IDs we have and stick to a generic ProjectId or something similar CC @JosephMar

RobinMennens-UiPath avatar Jun 04 '26 08:06 RobinMennens-UiPath

We either keep introducing special IDs such as functionId, or we try to limit the number of IDs we have and stick to a generic ProjectId or something similar

Agreed. the problem is that we already have a ProjectKey (similar to project id, that is the release key from orchestrator). to be consistent with the agentId naming (which is already the established field for low code agents today) I would use functionId for functions. I will also consult with the team regarding this since it would be a spec decision

radu-mocanu avatar Jun 04 '26 12:06 radu-mocanu

We either keep introducing special IDs such as functionId, or we try to limit the number of IDs we have and stick to a generic ProjectId or something similar

Agreed. the problem is that we already have a ProjectKey (similar to project id, that is the release key from orchestrator). to be consistent with the agentId naming (which is already the established field for low code agents today) I would use functionId for functions. I will also consult with the team regarding this since it would be a spec decision

IMO every product should define its own GUID (I imagine you'll need this exposed downstream at some point). For Agents we are exposing a concrete AgentIId which must be separate from ProjectId (because of flow) so the generic approach might not work well unless you also include a discriminator, but at that point having separate IDs is probably similar overhead

@jepadil23 FYI this is similar to what we are solving for Trace service ID hierarchy

JosephMar avatar Jun 04 '26 16:06 JosephMar

Settled on uipath.json#Id for both agents and functions. Updated also the spec docs.

radu-mocanu avatar Jun 16 '26 06:06 radu-mocanu

:rotating_light: Heads up: uipath-integrations cross-tests are FAILING :rotating_light:

Your changes may break one or more integrations in uipath-integrations-python:

  • uipath-openai-agents
  • uipath-google-adk
  • uipath-agent-framework
  • uipath-llamaindex
  • uipath-pydantic-ai

:warning: These checks are NOT enforced by branch protection rules. Please review the failures before merging.

:mag: Inspect the failed run →

github-actions[bot] avatar Jun 16 '26 14:06 github-actions[bot]

:rotating_light: Heads up: uipath-langchain cross-tests are FAILING :rotating_light:

Your changes may break the uipath-langchain-python integration.

:warning: These checks are NOT enforced by branch protection rules. Please review the failures before merging.

:mag: Inspect the failed run →

github-actions[bot] avatar Jun 16 '26 19:06 github-actions[bot]