Now inviting automation leaders: publish your playbook as a skill, under your own name. Publish yours →
Automation Skills
All skills/Uipath maestro flow/Agent
Reference · Uipath maestro flow

Agent

Part of Uipath maestro flow. Install the skill and your agent reads this page when it needs the depth.

Agent

Exact signatures, fields, and defaults: agent().

Start a coded or low-code agent and wait for its output. It may be published in Orchestrator or registered as a sibling project in this solution.

Signature: agent({ key?, name, folderPath?, location?, projectId?, inputs, inputSchema?, returns?, flavour? })

For a published process, leave key and returns out: check prints the registry prepare --kind Process command that records them, and compile fills both in (Orchestrator Processes). An in-solution sibling still takes key.

.step('count', agent({
  name: 'CountLetters', folderPath: 'Shared',
  inputs: { inputString: input('inputString') },
  flavour: 'coded'
}))

See Orchestrator Processes and use the Agent process type to locate an agent process and determine its contract.

At a glance

agent() references a published or in-solution sibling agent; it does not create one. For a task-created sibling, scaffold and register it before calling it. Verify resource identity and answer quality live. .onError(...) is supported.

General

Reuse a published agent, or create one in the solution

Two shapes; the request decides which. When the request names an agent that may already exist, look for it first:

uip maestro flow registry search "uipath.core.agent" --output json
uip maestro flow registry get "uipath.core.agent.<key>" --output json

Registry reads are cached for 30 minutes. If the agent is missing or redeployed with a new schema, run uip maestro flow registry pull --force once, then search again.

To learn a published agent's argument names and return shape, write name and folderPath, leave key and returns out, and run the uip maestro registry prepare --kind Process command check prints. It records the key and both schemas; see Orchestrator Processes. uip maestro registry (the SDK's prepare) and uip maestro flow registry (node manifests, above) are two command groups; both exist. If prepare prints not recorded for a side, read it from registry get instead: inputDefinition.properties and outputDefinition.

When asked to CREATE a coded agent in this solution, scaffold it as a sibling project; do not substitute an inline low-code agent. Creating one the tenant already publishes is duplication, and binding a pre-existing one when the request said to build it is a different task, so read the request; do not guess from what the registry happens to hold.

Never invent key or projectId. Tooling mints both; read them back. If no source below yields one, stop on that field rather than provide a plausible GUID: check and validate accept a well-formed GUID that resolves to nothing on the tenant, so a fabricated key fails at run time, not author time.

Task-created in-solution coded agent

<!--skill-flavor:agent-scaffold:start-->
  1. Scaffold the solution and Flow project.
  2. Scaffold and implement the coded agent as a sibling directory.
  3. Register the sibling with uip solution projects add.
  4. Read both identifiers back, then author the Flow with agent({ location: 'in-solution', ... }).
  5. Compile into the nested Flow project, validate, refresh resources, and debug the Flow (ask first).
uip solution init <SolutionName> --output json
( cd <SolutionName> && uip maestro flow init <FlowName> --output json )

mkdir -p <SolutionName>/<AgentProject>
( cd <SolutionName>/<AgentProject> \
  && uv venv --python 3.13 \
  && uv pip install <framework-package> \
  && uip codedagent setup --force --output json \
  && uip codedagent new <AgentName> )

Install the framework package BEFORE new. new defaults to --type auto and selects the template from the active venv; without an installed framework it scaffolds a coded FUNCTION.

Verify the scaffold before continuing: <framework>.json beside main.py (langgraph.json for uipath-langchain) indicates the agent template. uipath.json with a functions map and no <framework>.json is the function fallback; install the package, delete the generated files, and re-run new.

Scaffold from INSIDE the agent directory, with its framework venv already present. From the solution root (the directory containing .uipx), uip codedagent new <AgentName> creates <AgentName>/; elsewhere it scaffolds in place.

Implement the project, then run these commands from that directory:

uv sync
uip codedagent init
uip codedagent review . --output json

Run uv sync before init: uip codedagent init imports the entry-point graph and fails when declared dependencies are absent; a failed init leaves uipath.json scaffolded without its entry-point map.

uip codedagent run is not part of this path. It executes the graph and requires UIPATH_ACCESS_TOKEN plus access to the LLM gateway. If either is absent, run fails at the platform client; the import and virtualenv errors it emits on the way there are environmental, not project defects; do not chase them. uip codedagent review is the offline check and does not run the model.

Register the sibling, refresh, and read both identifiers back:

( cd <SolutionName> && \
  uip solution projects add <AgentProject> <SolutionName>.uipx --output json )
uip solution resources refresh --solution-folder <SolutionName> --output json
uip maestro flow registry list --local --output json

Run registry list --local from the Flow project directory; it is the authoritative source for the minted key. The generated resource file carries the same pair:

Find that file; do not assume its path. uip solution projects add reads the project type from the manifest. A uipath.json without ProjectType falls back to Function when it has a functions map, including an empty scaffolded map, so the resource may be under process/function/<AgentProject>.json rather than process/agent/. Glob for it instead of hard-coding either:

ls <SolutionName>/resources/solution_folder/process/*/<AgentProject>.json

uip solution projects list --output json reports the type resolved from the manifest. Type: Function on a coded agent is this fallback, not a wiring error; re-adding the project or hand-editing uipath.json will not change it. Read the identifiers and wire the Flow instead.

<!--skill-flavor:agent-scaffold:end-->
.step('analyze', agent({
  key: localResourceKey,
  name: '<AgentProject>', location: 'in-solution',
  projectId: localProjectKey,
  inputs: { sentence: input('sentence') },
  returns: { result: 'integer' }, flavour: 'coded',
}))

An in-solution agent has no folderPath: its generated binding uses the bare local resource key and its definition carries the sibling project id. The SDK checker rejects a missing project id or a published agent with a missing folder, so resource forms cannot silently collapse.

Name an in-solution sibling by project

Needs @uipath/maestro-builder-sdk 6.108.0 or later. Any of the five process builders can then name a sibling of the solution by its project name instead of copying the two ids:

.step('analyze', agent({
  location: 'in-solution',
  project: '<AgentProject>',
  inputs: { sentence: input('sentence') },
  flavour: 'coded',
}))

To type an argument differently from its value (for example an object filled from an expression), add inputSchema; keep one a decompiled step carries. See Orchestrator Processes.

Evidence boundary

A green live run proves only that a real job received inputs and returned the declared shape, not that the model answer is correct. Preserve the job identity, input/output witnesses, and a scenario-specific semantic assertion; offline seeds should also rule out a hard-coded answer.

Publish your skill

Copy this prompt into Claude Code, Codex or any agent. It walks you through your first skill in about 20 minutes, with you as the author.

Click to copy.