Judge hook

This is not a chatbot over automation logs. It is a UiPath-orchestrated RPA diagnosis agent that walks a workflow trace, failing step output, and retry recommendation toolchain, then returns an operator-ready fix with byte-for-byte evidence. Operators can see exactly which tool produced each workflow id, step id, error payload, channel id, and retry command.

Inspiration

RPA operations teams face a daily grind: a workflow fails overnight, on-call gets paged, and diagnosing "which step broke and why" requires clicking through five screens in UiPath Orchestrator. gemini-rpa-agent automates that entire diagnosis loop.

What it does

A Gemini 2.5 Flash coded agent, orchestrated by a UiPath Maestro BPMN process, walks four MCP tools end-to-end and returns a 5-section triage report with every error payload quoted byte-for-byte:

  1. list_workflows(active_only) locates the failing workflow.
  2. get_workflow_run(run_id) walks the step trace to the failure point.
  3. get_step_output(run_id, step_id) fetches the verbatim error JSON.
  4. suggest_retry(run_id) emits the canonical remediation command.

The answer format is fixed: ANSWER, EVIDENCE, ROOT CAUSE, REMEDIATION, and NEXT STEP. The EVIDENCE section must quote the tool output, not paraphrase it.

How I built it

  • Agent: google.adk.agents.LlmAgent with Gemini 2.5 Flash, routed through the UiPath LLM Gateway via UiPathGemini from uipath-google-adk.
  • UiPath platform path: packaged with uipath pack and published with uipath publish; the coded-agent entry point is src/gemini_rpa_agent/uipath_entrypoint.py:main with Pydantic Input / Output models.
  • Orchestration: UiPath Maestro BPMN invokes the coded agent, receives the structured report, and can chain to downstream notification, ticket creation, or human review tasks.
  • UI: Streamlit dashboard on Cloud Run for judges and debugging. Production traffic enters through Maestro.
  • Stub MCP: the repo bundles a realistic UiPath/n8n-shaped MCP server so reviewers can reproduce the full tool walk without standing up an enterprise RPA tenant.

Challenges

Routing Gemini through UiPath's LLM Gateway instead of calling Vertex AI directly required careful adapter and environment wiring. The other hard part was forcing the agent to preserve evidence fidelity: workflow ids, run ids, step ids, timestamps, error codes, channel ids, and retry commands must come from tools verbatim.

What I learned

UiPath Maestro BPMN is a useful control plane for coded agents because it supplies the orchestration, retry, escalation, and human-in-the-loop structure that agent demos usually hand-wave away.

What's next

  • Add get_logs(workflow_id, topic) so the agent can summarize repeated failures.
  • Wire low-confidence remediations to UiPath Action Center for human review.
  • Add production connectors for real UiPath Orchestrator, n8n, and Slack incident channels.

Built With

  • agent-development-kit
  • apache-2
  • gemini
  • gemini-2-5
  • google-cloud-run
  • mcp
  • model-context-protocol
  • python
  • rpa
  • streamlit
  • uipath
  • uipath-llm-gateway
  • uipath-maestro
  • uipath-orchestrator
  • workflow-automation
Share this project:

Updates