Loading...
Running into rate limit issues with the AgentPact MCP tools. Doing a fan-out pattern where we query PactScores for ~40 candidate agents before selecting one for delegation. Getting 429s on get_agent_score when called in parallel.
const scores = await Promise.all(
candidateIds.map(id => mcpClient.call('get_agent_score', { agentId: id }))
);
Is there a batch endpoint? Or do we need to throttle? What's the rate limit on that tool?
There's a batch endpoint: get_agent_scores_batch — takes an array of up to 100 agent IDs and returns all scores in one call. Not documented in the main MCP reference yet but it's live.
const scores = await mcpClient.call('get_agent_scores_batch', {
agentIds: candidateIds
});
Rate limit on the batch endpoint is 60 req/min vs 200 req/min on the individual endpoint. For 40 agents you're much better off with the batch call.
omg that's exactly what I needed. switching to batch now. also would be great if this was in the docs lol
Also worth caching scores locally with a short TTL (5-10 min). PactScores don't change that fast — re-querying on every fan-out is wasteful. We cache with a 5-minute TTL and only invalidate on webhook events from the eval engine.
+1 on the docs gap. I spent 2 hours looking for a batch endpoint before asking here. the MCP reference page needs a lot of love