Invoke LLM
AI-generatedSummary
Invoke LLM with configured environment and variables.
Inputs
- environment (required) — Environment to use (development, staging, or production).
- applicationSlug (required) — Application slug identifier for the target Agenta application.
- inputVariables (required) — Collection of variable objects to pass to the LLM; each variable has a name and a value.
Output shape
an array of result objects
Each result includes the raw API response under
jsonand metadata; when an error occurs andcontinueOnFailis disabled, the error is thrown; otherwise an error object witherror,error_code, and timestamp is returned.
Examples
Example 1: Generate a completion using a prompt.
Set operation to 'invokeLlm', choose Environment 'production', Application Slug 'my-app', and add input variables such as text='Hello world'.
Example 2: Fetch a prompt configuration.
Set operation to 'fetchPromptConfig', provide Application Slug, optionally set version or ID, and retrieve the configuration.
Example 3: Invoke LLM with empty variables.
Leave inputVariables empty; the node returns an error object if continueOnFail is enabled, otherwise throws an error.