Moving Beyond Brittle RPA

Legacy Robotic Process Automation (RPA) relies on UI-based interaction, making it highly susceptible to failure whenever screen layouts or resolutions change. By shifting to an API-first approach using the Model Context Protocol (MCP) and Google’s Agent Development Kit (ADK), developers can build resilient automation that interacts directly with SAP’s backend. This eliminates the maintenance burden of UI-based scripts and allows for more reliable execution of complex business processes like Order-to-Cash (O2C).

Architecting Multi-Agent Teams

To handle the massive scale of SAP modules (such as Sales & Distribution), the system uses a hierarchical multi-agent structure that mirrors organizational roles:

  • Root Agent (Supervisor): Orchestrates the workflow and delegates tasks to specialized sub-agents without having direct access to tools itself.
  • Specialized Sub-Agents: Agents like the 'Inventory Specialist' or 'Sales Order Creator' are assigned specific prompts and limited toolsets, ensuring focused execution.
  • Gemini Integration: Leveraging Gemini’s 1-million-token context window allows the system to manage hundreds of generated MCP tools efficiently, preventing the performance degradation typically associated with high-complexity toolsets.

Streamlining Development with MCP

SAP systems utilize OData standards to expose endpoints. The automation pipeline uses the openapi-mcp-generator CLI to automatically convert these OpenAPI specifications into functional MCP servers and tools. This automation allows developers to rapidly onboard new SAP capabilities into the agent team.

Performance and Parallel Execution

Starting with ADK version 1.1, agents can execute multiple tool calls in parallel. This significantly reduces the time required for complex tasks, such as creating multiple line items within a single sales order. The agents demonstrate reasoning capabilities by dynamically crafting filters for API queries, ensuring they retrieve only the necessary data rather than blindly passing parameters.