ai11y docs
    Preparing search index...

    Function plan

    • Plans instructions based on UI context and user input

      Parameters

      Returns Promise<AgentResponse>

      The full agent response containing both reply and instructions

      const ui = ctx.describe()
      const response = await plan(ui, "click save button", config)
      for (const instruction of response.instructions || []) {
      ctx.act(instruction)
      }