A professional multi-turn conversational AI agent evaluation framework supporting English, Arabic, and French.
pip install multiturn-agent-eval==0.1.0 Copy PIP instructions
A professional, production-ready framework for evaluating multi-turn conversational AI agents.
AgentEval simulates realistic and adversarial interactions across English, Arabic, and French, injecting user personas and conversational anomalies (omitted slots, intent switches, policy violations, ambiguous prompts) to rigorously stress-test conversational agents before deploying them to production.
uv pip install agenteval For development and running the test suite:
git clone https://github.com/ZiadiSafouene/Multiturn-Agent-Evaluator.git cd multiturn-agent-evaluator uv sync 🚀 Quickstart 1. Command-Line Interface (CLI) Run an evaluation using default free models and sample scenarios:
agenteval evaluate --scenarios test_scenarios.json Evaluate your own agent using your OpenRouter API key, custom system prompt, and selected languages:
export AGENT_API_KEY="sk-or-v1-agent-key..." export AGENT_MODEL="openai/gpt-4o-mini" export TESTER_API_KEY="sk-or-v1-tester-key..." export TESTER_MODEL="meta-llama/llama-3.3-70b-instruct" agenteval evaluate --scenarios test_scenarios.json --judge 2. Python API from core.orchestrator import AgentEvaluator, EvaluatorConfig from core.utils.models import Language, Persona # Configure your agent under test and the evaluation suite config = EvaluatorConfig( # Your agent's OpenRouter configuration agent_api_key="sk-or-v1-agent-api-key", # Omit to use free model agent_model="meta-llama/llama-3.1-8b-instruct", # Default: mistral-7b free agent_system_prompt=( "You are a helpful customer service chatbot for an e-commerce platform. " "Politely assist users with tracking orders, refunds, and inquiries." ), # Tester & Judge OpenRouter configuration tester_api_key="sk-or-v1-tester-api-key", # Omit to use free model tester_model="meta-llama/llama-3.1-70b-instruct", # Multilingual & Persona matrix languages=[Language.ENGLISH, Language.ARABIC, Language.FRENCH], personas=[Persona.COOPERATIVE, Persona.CONFUSED, Persona.ANGRY], # Execution parameters test_cases_per_scenario=2, max_turns=8, use_llm_judge=True, output_dir="./evaluation_output", ) evaluator = AgentEvaluator(config) # Run evaluation from a JSON scenarios file or natural language description results = evaluator.evaluate("test_scenarios.json") # Inspect aggregated results print(f"Overall Pass Rate : {results.passed_tests}/{results.total_tests}") print(f"Average Score : {results.average_score:.1f} / 100") print(f"Score by Language : {results.scores_by_language}") print(f"Score by Persona : {results.scores_by_persona}") for report in results.reports: print(f"[{report.status.value.upper()}] {report.test_case_id}: {report.final_score}/100") print(f" Summary: {report.summary}") 3. Scenario Synthesis from Natural Language Don't have a JSON scenario file? AgentEval can synthesize formal state-machine scenarios directly from a plain English specification:
from core.orchestrator import AgentEvaluator, EvaluatorConfig config = EvaluatorConfig() evaluator = AgentEvaluator(config) spec = """ A telecommunications customer support bot that: - Diagnoses internet connection issues - Schedules technician visits if line cannot be recovered - Reschedules existing appointments """ # AgentEval automatically generates structured scenarios, states, slots, and edge cases results = evaluator.evaluate(spec) 📐 Evaluation Metrics & Scoring Engine AgentEval uses a balanced dual-layer scoring methodology:
$$\text{Final Score} = 0.70 \times \text{Deterministic Score} + 0.30 \times \text{LLM Judge Score}$$
(When --no-judge is selected, the deterministic score carries 100% weight).
Deterministic checks execute without model subjectivity:
An independent OpenRouter model evaluates qualitative dimensions:
multiturn-agent-evaluator/ ├── core/ │ ├── cli.py # Command-line interface (agenteval command) │ ├── orchestrator.py # End-to-end evaluation pipeline │ ├── data/ │ │ └── multilingual.py # English, Arabic, and French lexical resources │ ├── evaluation/ │ │ └── engine.py # Deterministic rules & LLM judge scoring engine │ ├── llm/ │ │ ├── client.py # OpenRouter agent client (custom key / free model) │ │ ├── tester.py # OpenRouter user simulator & judge client │ │ ├── prompts.py # Pure prompt templates (agent, user, judge) │ │ └── cache.py # In-memory response cache │ ├── mutation/ │ │ └── generator.py # Adversarial test case synthesizer │ ├── persona/ │ │ └── engine.py # Multilingual persona transformation engine │ ├── scenario/ │ │ ├── generator.py # LLM scenario synthesizer │ │ ├── parser.py # Schema deserializer │ │ ├── state_machine.py # State machine execution engine │ │ ├── storage.py # JSON persistence (utf-8-sig compatible) │ │ └── validator.py # Graph topology and reachability validator │ ├── simulation/ │ │ ├── simulator.py # Multi-turn dialogue execution loop │ │ ├── agent.py # Agent turn wrapper │ │ └── logger.py # Conversation trace formatter │ ├── tests/ │ │ ├── test_scenario.py # Scenario & state machine unit tests │ │ ├── test_mutation.py # Mutation generation tests │ │ ├── test_simulation.py # Simulator & slot extraction tests │ │ ├── test_evaluation.py # Deterministic metric tests │ │ ├── test_orchestrator.py # End-to-end pipeline tests │ │ └── example_run.py # Standalone runnable example │ └── utils/ │ ├── models.py # Core domain models (Scenario, TestCase, Report) │ └── schema.py # Pydantic boundary validation schemas ├── orchestrator.py # Root convenience import and execution wrapper ├── test_scenarios.json # Banking benchmark scenario suite ├── pyproject.toml # Project build metadata & dependencies (uv compatible) └── README.md 🧪 Testing Run the full automated test suite with coverage:
uv run pytest core/tests -v Linting and formatting with Ruff:
uv run mypy core 📄 License This project is licensed under the terms of the MIT License.
All 2 files in this release have provenance metadata.
agent ai chatbot evaluation llm multilingual openrouter testing
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 6, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




