AG-002Agent · Understanding the joblayaeval.TaskCompletion
Task Completion
Did the agent finish the job all the way?
Simulation state:
When it passes
Finished.
Threshold satisfied: evaluation score >= 0.50.
When it fails
Stopped halfway.
Violation detected: execution flagged for human review or fallback routing.
SDK Specification
| Parameter | Value | Description |
|---|---|---|
| Class | TaskCompletion | Python evaluator class in layaeval |
| Required Fields | "task", "agent_trace", "final_result" | Arguments expected in the call signature |
| Default Threshold | >= 0.50 | Passes when quality score is at or above this value |
| Category | Agent Evaluation | Understanding the job (Did the agent get what you wanted, and finish it?) |
Python Example
task-completion.py
1from layaeval import TaskCompletion23metric = TaskCompletion(threshold=0.50) # passes at or above 0.5045res = metric(6 task="Book a hotel in Paris for 2 guests on Mar 4.",7 agent_trace="Step 1: search_hotels(city='Paris') -> 3 results\nStep 2: book(id=12) -> confirmed",8 final_result="Booked Hotel Lumière, Mar 4, 2 guests.",9)1011print(res.passed, res.value, res.confidence)
Related Agent Checks