Skip to content
Proud to collaborate with Microsoft for Startups

dgi.prompt_generation ​

AI-powered prompt generation

AI-powered prompt generation for DGI conversations.

Generates user-facing prompts when the system needs more information to complete a workflow.

Inputs:

  • intent: The recognized user intent (required)
  • workflow_params: Parameters required by the workflow (required)
  • provided_params: Parameters already provided by the user (required)
  • conversation_context: Recent conversation messages (optional)
  • model: Optional model ID override (default: plugin.default_model)

Outputs (terminal state_data):

  • prompt_type: "choice" | "text" | "confirm"
  • prompt_message: The question to ask the user
  • prompt_fields: List of fields to collect
  • default_values: Any default values
  • prompt_config: Full prompt configuration for frontend

Plugin required: context.get_plugin("ai")

Overview ​

PropertyValue
Workflow typeAtomic
LibraryApp-dgi
Version1.0

Input Schema ​

FieldTypeRequiredDefaultDescription
intentstringYes—Recognized user intent
workflow_paramsjsonYes—Parameters required by the workflow
provided_paramsjsonYes—Parameters already provided
conversation_contextlistNo—Recent conversation messages
modelstringNo—Model ID override

Output Schema ​

FieldTypeRequiredDefaultDescription
intentstringNo——
workflow_paramsjsonNo——
provided_paramsjsonNo——
conversation_contextlistNo——
modelstringNo——
default_valuesdictNo——
needs_promptbooleanNo——
prompt_configdictNo——
prompt_fieldsstringNo——
prompt_messagestringNo——
prompt_typestringNo——
failure_reasonstringNo——
failure_typestringNo——
failed_actionstringNo——
failed_at_statestringNo——
failed_stepstringNo——
failed_layerstringNo——
errorstringNo——
error_typestringNo——

States ​

StateInitialTerminalSuccessAuto-advanceDescription
pendingYesNo—execute—
completedNoYesYes——
failedNoYesNo——

State Diagram ​

Transitions ​

FromActionToDescription
pendingexecutecompleted—
* (any state)failfailed—

API Usage ​

bash
POST /api/workflows/start
Content-Type: application/json

{
  "workflow_type": "dgi.prompt_generation",
  "initial_data": {
    "intent": "value",
    "workflow_params": "value",
    "provided_params": "value"
  }
}