Receive a detailed diagnostic report on agent costs, latency, and quality to identify performance bottlenecks and optimize operational efficiency.
The agent prepares an audit configuration file containing agent records and ensures the ALPNAI_AGENT_KEY environment variable is set. It connects to the MCP server, discovers available tools, and calls audit_agent_costs with the prepared data. The agent must handle JSON-RPC errors and check for result.isError before reading the report. It inspects the decision and gates for each workflow to understand the diagnosis. The agent should keep action execution separate from report reading and verify that the ALPNAI key does not grant spending authority.
- Category: Operations and infrastructure
- Effect: Read-only
- MCP servers: ALPNAI MCP (https://koskamo.com/explore/alpnai-mcp)
- Source: ALPNAI — Connect an agent with MCP (https://alpnai.com/en/docs/mcp)
- Source quote: "audit_agent_costs, analyze_agent_latency and check_agent_quality run Spend Proof, Latency Lab and Quality Gate respectively, free with an active key."
- Playbook page: https://koskamo.com/explore/use-cases/audit-agent-performance-metrics
Prompt: Connect to the ALPNAI MCP server and run an audit on my agent's performance. Use the audit.json file in the current directory for the input data. Call the audit_agent_costs tool and return the structuredContent of the report. Ensure you handle any JSON-RPC errors and check for result.isError before presenting the findings.