Skip to content

get_agent_performance

Get per-agent performance over a date range: call volume, average Compass Score, predicted-CSAT, average agent lift, lift-band distribution, and top missed opportunities (guidance keys most often scored 'absent' for this agent). Use for coaching summaries and agent leaderboards. If agent_name is omitted, returns all agents with at least min_calls calls in the window.

Parameters

Parameter Type Required Default Description
agent_name string no Filter to a single agent (exact match). Optional.
date_from string no Start date (ISO). Default: 30 days ago.
date_to string no End date (ISO). Default: now.
min_calls integer no 5 Exclude agents with fewer than N calls. Default: 5.
limit integer no 20 Max agents to return. Default: 20.

Example call

from fastmcp import Client
from fastmcp.client.auth import BearerAuth

async with Client(
    "https://mcp.chordia.ai/mcp",
    auth=BearerAuth("YOUR_APPLICATION_KEY"),
) as client:
    result = await client.call_tool(
        "get_agent_performance",
        {
            "agent_name": "Alpha Agent",
            "date_from": "2026-01-01"
        },
    )
    print(result.content[0].text)
# Plus any of the 5 optional params from the table above.

In Claude Desktop, Cursor, or any MCP-aware client the same call is issued by the LLM automatically once the server is configured — see integrations.

Result

Success responses are JSON of the shape below. Optional fields are omitted when the underlying data isn't present.

{
  "agents": [
    {
      "agent_name": "Alpha Agent",
      "call_count": 86,
      "scorable_calls": 79,
      "avg_compass_score": 3.71,
      "avg_predicted_csat": 4.2,
      "avg_lift": 0.18,
      "lift_band_distribution": [
        {"band": "positive", "count": 41},
        {"band": "neutral", "count": 28}
      ],
      "top_missed_opportunities": [
        {"guide_key": "offer_followup", "count": 11}
      ]
    }
  ],
  "count": 1,
  "date_range": {"from": "2026-04-01T00:00:00Z", "to": "2026-05-12T00:00:00Z"}
}

Auth context

Every call receives the connection's project_id and access_scope automatically — the caller never passes them. See Authentication & RBAC for how scope narrows results.

Errors

All tools return JSON. Errors are wrapped in { "error": "..." }. The most common shapes are documented in Python integration → Error shape.