Skip to main content
misc_action.llm_query sends a prompt directly to an LLM and stores the structured response—no browser state, axtree, or screenshot is involved.

Overview

  • Use when: You need to transform, classify, or reason over data already in memory (e.g., reformat an extracted date, classify extracted text, compute a derived value).
  • Execution: The action sends prompt_instructions to the configured LLM, parses the response according to output_format, and stores results in output_data. Specified fields are optionally promoted to generated_variables.
  • No browser access: Unlike extraction_action.llm, this action does not read the current page. Reference earlier extracted values via {variable_name[index]} in your prompt.

Properties

PropertyTypeDefaultDescription
output_formatdictRequiredExpected output structure as a type-annotated dict
prompt_instructionsstrRequiredThe full prompt to send to the LLM
output_variable_nameslist[str] | NoneNonePromote response fields to generated_variables
llm_provider"gemini" | "anthropic" | "openai""gemini"LLM provider
llm_model_namestr"gemini-2.5-flash"Model name

JSON Example

{
  "type": "action_node",
  "misc_action": {
    "llm_query": {
      "output_format": {
        "category": "str",
        "confidence": "str"
      },
      "prompt_instructions": "Classify the following support ticket as 'billing', 'technical', or 'other'. Ticket: {ticket_text[0]}",
      "output_variable_names": ["category"]
    }
  }
}

Output Format

Define the expected response structure with Python type hints:
{
  "output_format": {
    "summary": "str",
    "status": "str",
    "items": "List[str]"
  }
}
Only str and List[str] are supported types in output_format.

Using Variables in Prompts

Reference extracted values from earlier nodes using {variable_name[index]}:
{
  "misc_action": {
    "llm_query": {
      "output_format": { "normalized_date": "str" },
      "prompt_instructions": "Reformat this date to ISO 8601 (YYYY-MM-DD): {raw_date[0]}",
      "output_variable_names": ["normalized_date"]
    }
  }
}
After this action, {normalized_date[0]} is available in subsequent nodes.

Storing Output as Variables

Set output_variable_names to promote response fields into generated_variables:
{
  "misc_action": {
    "llm_query": {
      "output_format": {
        "next_url": "str",
        "has_more_pages": "str"
      },
      "prompt_instructions": "Given these pagination links: {page_links[0]}, return the next page URL and whether more pages exist ('true'/'false').",
      "output_variable_names": ["next_url", "has_more_pages"]
    }
  }
}
Every key in output_variable_names must appear in output_format. Validation fails at schema load time if a key is missing.

Choosing a Provider and Model

ProviderModelsNotes
geminigemini-2.5-flash, gemini-2.5-proDefault; cost-effective
anthropicclaude-sonnet-4-6, claude-haiku-4-5-20251001Strong reasoning
openaigpt-4o, gpt-4o-miniOpenAI models
If llm_provider and llm_model_name are omitted, the task-level defaults are used.

LLM Query vs LLM Extraction

misc_action.llm_queryextraction_action.llm
Browser contextNone — prompt onlyaxtree and/or screenshot of current page
Typical useTransform / classify in-memory dataExtract data from the page the browser is on
Input sourceVariables embedded in the promptLive page content
Output destinationoutput_data + optional generated_variablesoutput_data + optional generated_variables
Use misc_action.llm_query after an extraction step to post-process or validate extracted data without consuming a browser round-trip.