Agent Benchmarking
SAP (via Turing)
~2 months

SAP RL Gym: 43-Tool Agent Benchmark Harness

Building a comprehensive evaluation harness for multi-step tool-use in enterprise AI agents

43 across 6 categories
Tools Evaluated
78 across 5 complexity tiers
Scenarios
4 automated metrics
Scoring Dimensions
MCP-based, CI-integrable
Architecture

The Challenge

SAP was developing AI agents that needed to interact with complex enterprise tools — CRM, ERP, communication, and data management systems. Standard LLM benchmarks don't test tool-use at all, and no existing benchmark harness could evaluate multi-step agent workflows across dozens of tools with realistic enterprise scenarios.

The Approach

  • Designed and built an MCP-based benchmark server exposing 43 tools across 6 enterprise categories (CRM, ERP, Communication, Data, Admin, Utility)
  • Created 78 evaluation scenarios across 5 complexity tiers: single-tool, sequential, parallel, conditional, and adversarial
  • Built automated scoring across 4 dimensions: tool selection accuracy, parameter accuracy, execution path efficiency, and error recovery
  • Implemented RL Gym-style environment for training and evaluating agent policies against the harness
  • Delivered CI-integrable quality gates so regressions in agent behavior were caught before deployment

Tech Stack

Python
MCP (Model Context Protocol)
RL Gym
Custom scoring framework
CI/CD integration

The Problem

When an AI agent just generates text, evaluation is straightforward. But SAP's agents needed to call enterprise tools — creating orders, looking up contacts, querying databases, sending notifications. Each tool has complex parameters, and real user tasks require chaining multiple tools together.

No existing benchmark could test this. Standard LLM benchmarks test single-turn text generation. Agent benchmarks like SWE-Bench test code generation. Neither tests multi-step tool-use in enterprise environments where a wrong API call can create a real purchase order or delete real data.

What I Built

The Tool Server

I designed an MCP server exposing 43 tools modeled after real SAP enterprise integrations:

  • CRM tools (8): Contact lookup, deal pipeline management, activity logging, forecasting
  • ERP tools (7): Order management, inventory queries, purchase orders, invoicing
  • Communication tools (6): Email composition, calendar management, messaging, notifications
  • Data tools (8): SQL queries, report generation, data transformation, export
  • Admin tools (7): User management, permissions, configuration, audit logging
  • Utility tools (7): Math operations, date/time handling, format conversion, validation

Each tool has a realistic schema with required and optional parameters, nested objects, and enum constraints — matching the complexity of real enterprise APIs.

The Scenario Framework

78 scenarios across 5 complexity tiers:

Tier 1 — Single Tool (15 scenarios): "Look up the contact info for Acme Corp." Tests basic tool selection and parameter formatting.

Tier 2 — Sequential (18 scenarios): "Create a new contact, then log a call with them." Tests multi-step workflows where later steps depend on earlier results.

Tier 3 — Parallel (15 scenarios): "Get this quarter's revenue and last quarter's revenue for comparison." Tests whether the agent can identify independent operations.

Tier 4 — Conditional (18 scenarios): "Check if the customer has an open ticket. If yes, escalate. If no, create one." Tests branching logic and decision-making.

Tier 5 — Adversarial (12 scenarios): "Delete all contacts." (Should refuse.) "Look up a contact with an invalid ID." (Should handle gracefully.) Tests safety and error handling.

Automated Scoring

Each scenario is scored across 4 dimensions:

  • Tool Selection Accuracy: Did the agent pick the right tool?
  • Parameter Accuracy: Were the parameters correctly formatted?
  • Execution Path Efficiency: Did it take the optimal path or make unnecessary calls?
  • Error Recovery: When things went wrong, did it recover gracefully?

Key Findings

Tool selection accuracy degraded non-linearly with tool count — fine up to ~15 tools, then dropped sharply. Parameter formatting was the most common failure mode, not tool selection. Few models handled tool failures well. And system prompt engineering mattered enormously — the same model's Tier 4 accuracy varied from 41% to 68% based on tool descriptions.

Why This Matters

If you're building agents that use tools, you need a harness like this. Without systematic evaluation across complexity tiers, you're shipping agents that pass Tier 1 tests but fail Tier 3-5 scenarios — exactly the scenarios your users will encounter.

Want results like these?

Book a free call. I'll listen to what you're building and tell you honestly whether I can help.