Skip to main content

Schema

class StepContext(BaseModel):
    goal: str
    plan: str
    observation: str
    reasoning: str = ""
    history: list[Step] = []
    examples: list[StepExample] = []

Methods

context.format_examples() -> str
context.format_history() -> str
Behavior includes built-in truncation and limits to reduce prompt blowups. Related model:
class StepExample(BaseModel):
    goal: str
    plan: str
    observation: str
    reasoning: str
    action: str
    trajectory_id: str
    step_index: int