EvalPort: portable tool-call test suites for Assistant/FnCallAgent

Author: adhabnr-uxCreated Aug 23, 2026Updated Aug 23, 2026

Hi Qwen-Agent team,

I maintain EvalPort, an open JSON Schema spec (Apache 2.0) for portable LLM/agent evaluation datasets, with Python/TypeScript SDKs.

Looking at examples/function_calling.py and the Assistant/FnCallAgent classes, I noticed response messages carry a function_call: {"name": ..., "arguments": ...} field exactly when a tool is invoked (e.g. messages[-1]['function_call']['name'] in that example). EvalPort's test case schema has first-class expected_tools / tools_called fields for exactly this kind of agent eval — checking that an agent called the right tool(s) for a given query, independent of any particular framework.

A small harness could run an EvalPort suite against any Assistant:

python
import json
from qwen_agent.agents import Assistant

def run_case(bot, case: dict) -> dict:
    messages = [{'role': 'user', 'content': case['input']}]
    response = []
    for response in bot.run(messages):
        pass
    tools_called = [m['function_call']['name'] for m in response if m.get('function_call')]
    passed = set(case.get('expected_tools', [])) <= set(tools_called)
    return {
        "test_case_id": case["id"],
        "grader_results": [{"grader_id": "gr_tool_match", "type": "tool_match",
                             "score": 1.0 if passed else 0.0, "passed": passed}],
        "passed": passed,
    }

suite = json.load(open('my_suite.evalport.json'))
bot = Assistant(llm=llm_cfg, function_list=['my_image_gen', 'code_interpreter'])
results = [run_case(bot, tc) for tc in suite['test_cases']]

I deliberately didn't touch benchmark/deepplanning — that's a purpose-built benchmark with its own rich constraint checking that a generic schema shouldn't try to flatten. This would be a separate, lightweight examples/ recipe for people who want a portable, tool-agnostic regression suite for their own custom agents.

Spec: https://github.com/adhabnr-ux/evalport/blob/main/SPEC.md Python SDK: pip install evalport-sdk

No pressure — happy to put together a PR under examples/ if useful. Thanks for the great framework.