Agenta icon

Agenta

Agenta prompt management and LLM invocation

Invoke LLM

AI-generated

Summary

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 json and metadata; when an error occurs and continueOnFail is disabled, the error is thrown; otherwise an error object with error, 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.

Discussion