plan
Walk from a start state to a goal across the memory graph, and get the steps back.
plan(start: dict, goal: dict, max_steps=None, max_wall_time_ms=None, max_branches=None, strategy=None) -> PlanResultplan(request: PlanRequest) -> list[PlanStep]
plan_frames(request: PlanRequest) -> list[PlanResponseFrame]Parameters
startEndpointrequiredWhere to start, as { text } or { memoryId } — a description Brain resolves, or a memory you already have.
goalEndpointrequiredWhere to end up, in the same shape.
max_stepsintegeroptionalStep budget.
max_wall_time_msintegeroptionalWall-clock budget. Exceeding it is QueryOverBudget — an error, not a truncated answer.
max_branchesintegeroptionalBranching factor cap.
strategystringoptionalA strategy hint. An enum (strategyHint) on the wire.
Returns
stepsPlanStep[]alwaysThe path. Empty means no path was found — not an error.
steps[].step_indexintegeralwaysPosition in the path.
steps[].memory_id / text—alwaysThe memory this step passes through.
steps[].transition_kindstringalwaysHow the plan got from the previous step to this one.
steps[].confidencefloatalwaysConfidence in the step.
steps[].estimated_distance_to_goalfloatalwaysShould fall monotonically. A step where it rises is where the plan doubled back — worth surfacing when you are debugging a bad plan.
The wire request takes structured PlanState endpoints, a PlanBudget, a
sessionFilter and a trace flag, and has a frame-level form.
Was this page helpful?