BehavTest

BehavTest › How-to guides

Test that an AI agent calls the right tool

Return the agent's steps (from HTTP, or with tracer() in a function pipeline), then score them:

"scorers": ["toolCalled", "maxSteps"],
"scorerConfig": {
  "toolCalled": { "tool": "lookup_order", "argsInclude": { "orderId": 123 } },
  "maxSteps": { "max": 8 }
}

See traces.