AG-002Agent · Understanding the joblayaeval.TaskCompletion

Task Completion

Did the agent finish the job all the way?

TASK: BOOK A HOTELSearchChoosePayDoneFinished every step
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

ParameterValueDescription
ClassTaskCompletionPython evaluator class in layaeval
Required Fields"task", "agent_trace", "final_result"Arguments expected in the call signature
Default Threshold>= 0.50Passes when quality score is at or above this value
CategoryAgent EvaluationUnderstanding the job (Did the agent get what you wanted, and finish it?)

Python Example

pip install layaeval
task-completion.py
1from layaeval import TaskCompletion
2
3metric = TaskCompletion(threshold=0.50) # passes at or above 0.50
4
5res = 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)
10
11print(res.passed, res.value, res.confidence)

Related Agent Checks

Other checks in Understanding the job

View all 42 checks →