AG-004Agent · Understanding the joblayaeval.GoalAchievement

Goal Achievement

Did the agent reach what the user truly wanted?

REAL GOAL: A ROOM IN PARISSearchChoosePayDoneParis ✓Real goal reached
Simulation state:
When it passes

Goal reached.

Threshold satisfied: evaluation score >= 0.50.

When it fails

Busy, but goal not reached.

Violation detected: execution flagged for human review or fallback routing.

SDK Specification

ParameterValueDescription
ClassGoalAchievementPython evaluator class in layaeval
Required Fields"goal", "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
goal-achievement.py
1from layaeval import GoalAchievement
2
3metric = GoalAchievement(threshold=0.50) # passes at or above 0.50
4
5res = metric(
6 goal="User has a confirmed Paris hotel for 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 →