UiPath Documentation
uipath-cli
latest
false

UiPath CLI user guide

Última actualización 7 de may. de 2026

uip agent init

uip agent init scaffolds a new low-code agent project on disk. It creates only the agent project files — it does not create or link a solution. Use uip solution new followed by uip solution project add to place the scaffolded agent inside a solution.

Two scaffolding modes are available:

  • Standalone (default) — a full agent project tree with agent.json, entry-points.json, project.uiproj, flow-layout.json, an evals/ tree (with a default eval set, semantic evaluator, and trajectory evaluator), plus empty features/ and resources/ directories.
  • Inline-in-flow (--inline-in-flow) — a UUID-named subdirectory inside an existing flow project containing agent.json and an empty flow-layout.json, with empty evals/eval-sets/, features/, and resources/ folders. No entry-points.json or project.uiproj. The flow's inline agent node must reference the generated projectId.

Synopsis

uip agent init <path> [--model <model>] [--system-prompt <prompt>] [--force] [--inline-in-flow]
uip agent init <path> [--model <model>] [--system-prompt <prompt>] [--force] [--inline-in-flow]

All uip agent init invocations honor the global options (--output, --output-filter, --log-level, --log-file). Exit codes follow the standard contract.

Argumentos

  • <path> (required) — Target directory for the agent project (relative or absolute). The directory name becomes the agent name in standalone mode; it must match [a-zA-Z0-9_ -]+. When --inline-in-flow is used, <path> is instead the flow project directory, and a UUID-named subdirectory is created inside it.

Opciones

MarcaPredeterminadoPropósito
--model <model>gpt-4o-2024-11-20LLM model the agent will use. Written into settings.model in agent.json.
--system-prompt <prompt>Initial system prompt written into messages[0] of agent.json. Only meaningful in standalone mode.
--forceoffOverwrite the target directory even if it is not empty. Standalone mode only — inline mode always writes into a fresh UUID folder.
--inline-in-flowoffScaffold an inline agent inside a flow project. The <path> argument must point to an existing flow project directory (error otherwise).

Standalone mode refuses to proceed if the target directory exists and contains any files, unless --force is set.

Ejemplos

# Simplest: scaffold with defaults into ./my-agent
uip agent init ./my-agent

# Override the model and seed a system prompt
uip agent init ./invoice-agent \
  --model gpt-4o-2024-11-20 \
  --system-prompt "You are an invoice triage agent."

# Overwrite an existing non-empty directory
uip agent init ./my-agent --force

# Scaffold an inline agent inside an existing flow project
uip agent init ./my-flow --inline-in-flow
# Simplest: scaffold with defaults into ./my-agent
uip agent init ./my-agent

# Override the model and seed a system prompt
uip agent init ./invoice-agent \
  --model gpt-4o-2024-11-20 \
  --system-prompt "You are an invoice triage agent."

# Overwrite an existing non-empty directory
uip agent init ./my-agent --force

# Scaffold an inline agent inside an existing flow project
uip agent init ./my-flow --inline-in-flow

Data shape (--output json)

Standalone (Code: "AgentInit"):

{
  "Code": "AgentInit",
  "Data": {
    "Status": "Agent project created",
    "Path": "./my-agent",
    "Name": "my-agent",
    "Model": "gpt-4o-2024-11-20",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000301",
    "NextSteps": "# Edit agent.json to configure prompts and resources\n…"
  }
}
{
  "Code": "AgentInit",
  "Data": {
    "Status": "Agent project created",
    "Path": "./my-agent",
    "Name": "my-agent",
    "Model": "gpt-4o-2024-11-20",
    "ProjectId": "a1b2c3d4-0000-0000-0000-000000000301",
    "NextSteps": "# Edit agent.json to configure prompts and resources\n…"
  }
}

Inline (Code: "AgentInitInline"):

{
  "Code": "AgentInitInline",
  "Data": {
    "Status": "Inline agent created inside flow project",
    "Path": "/abs/path/my-flow/<uuid>",
    "ProjectId": "<uuid>",
    "Model": "gpt-4o-2024-11-20",
    "NextSteps": "# Edit agent.json to configure prompts and settings\n…"
  }
}
{
  "Code": "AgentInitInline",
  "Data": {
    "Status": "Inline agent created inside flow project",
    "Path": "/abs/path/my-flow/<uuid>",
    "ProjectId": "<uuid>",
    "Model": "gpt-4o-2024-11-20",
    "NextSteps": "# Edit agent.json to configure prompts and settings\n…"
  }
}

ProjectId is a fresh UUID stamped into agent.json and — in inline mode — is also the folder name. In standalone mode, additional UUIDs are generated for the entry point, the semantic evaluator, the trajectory evaluator, and the default evaluation set.

Generated files

Standalone creates:

<path>/
  agent.json
  project.uiproj
  entry-points.json
  flow-layout.json
  evals/
    evaluators/
      <semantic-evaluator>.json
      <trajectory-evaluator>.json
    eval-sets/
      evaluation-set-default.json
  features/
  resources/
<path>/
  agent.json
  project.uiproj
  entry-points.json
  flow-layout.json
  evals/
    evaluators/
      <semantic-evaluator>.json
      <trajectory-evaluator>.json
    eval-sets/
      evaluation-set-default.json
  features/
  resources/

Inline-in-flow creates, inside the flow project:

<flow-path>/<new-uuid>/
  agent.json
  flow-layout.json           # empty ({})
  evals/eval-sets/
  features/
  resources/
<flow-path>/<new-uuid>/
  agent.json
  flow-layout.json           # empty ({})
  evals/eval-sets/
  features/
  resources/

Ver también

¿Te ha resultado útil esta página?

Conectar

¿Necesita ayuda? Soporte

¿Quiere aprender? UiPath Academy

¿Tiene alguna pregunta? Foro de UiPath

Manténgase actualizado