Simplify tracking with Python decorators for automatic step and event management
create_step()
and end_step()
calls.
@step
Decorator@step
decorator automatically wraps a function with step tracking.
state
- Current state descriptionaction
- Action being performedgoal
- Goal of this stepscreenshot_path
- Path to screenshot for this stepeval_score
- Evaluation score (0.0 to 5.0)eval_description
- Evaluation description@event
Decorator@event
decorator creates an event for a function call, automatically capturing inputs and outputs.
description
- Custom description (auto-generated if not provided)result
- Custom result (auto-generated from return value if not provided)model
- Model name if this represents a model callcost_added
- Cost to add for this event@event
decorator has a known limitation where updating the event within the decorated function may prevent the function result from being recorded properly