What is a Goal?
A Goal contains:- Success Criteria - Measurable conditions that define success
- Constraints - Boundaries the agent must respect
- Context - Additional information for decision-making
Defining Success Criteria
Success criteria are measurable conditions that determine if your agent succeeded.Structure
Metric Types
| Metric | Use Case | Example Target |
|---|---|---|
output_contains | Check if output has specific content | "success" |
output_equals | Exact match | "expected_value" |
llm_judge | LLM evaluates quality | ">= 0.8" |
custom | Custom evaluation function | varies |
Example
Defining Constraints
Constraints are boundaries your agent must respect during execution.Constraint Types
| Type | Meaning | Effect |
|---|---|---|
hard | Must not violate | Violation = failure |
soft | Should avoid violating | Violation = warning |
Categories
time- Execution time limitscost- Token/API cost limitssafety- Safety requirementsscope- What the agent should/shouldn’t doquality- Quality requirements
Example
Complete Example
Here’s a complete goal for a research agent:Best Practices
Do
- Use specific, measurable success criteria
- Include 3-5 success criteria with different weights
- Define hard constraints for critical requirements
- Add context to help the agent make better decisions
Don't
- Use vague criteria like “do a good job”
- Skip constraints entirely
- Set all weights to 1.0 (use relative importance)
- Forget to specify required capabilities
Next Steps
Node Types
Learn about LLM, Router, Function, and Human nodes
Edge Configuration
Configure success, failure, and conditional edges