Running AI Agent Data Analysis Chains in Skip Workflow Mode

Overview

When testing updates to an existing AI Agent, it's important to test how the results of the new agent compare to the results of other versions of the agent. In many situations it's difficult or impossible to have access to all of the original data in each of the source systems. AI Agent Data Analysis chains can be executed in a mode where previously-retrieved data is directly accessible, bypassing the standard backend workflow execution which retrieves data.

In this mode, the system skips execution of the workflow_json (data collection + Python processing) and directly executes the post-workflow logic using data supplied in the API payload.

This mechanism supports controlled execution for initial testing, regression testing, and analysis reuse without requiring full workflow reprocessing.

 

How It Works

Execution in Skip Workflow mode is controlled through the skip_workflow flag in the API payload.

When enabled:

  • The backend does not execute the standard Workflow JSON.
  • The system does not run backend data collection or Python code.
  • The Chat Agent directly consumes injected data from the payload.
  • Post-workflow logic executes normally using the resolved prompts and configuration.

 

1. Payload Handling & Logic Switch

Trigger Condition

The backend inspects the incoming payload for:

"skip_workflow": true

If this flag is set to true, the system switches execution mode.

 

Bypass Logic

When skip_workflow = true:

  • The Workflow JSON execution is skipped
  • No data collection occurs
  • No Python execution runs
  • The system proceeds directly to post-workflow processing using the latest UI prompts

 

2. Supported Payload Scenarios

Scenario 1: Using ref_execution_id

In this scenario, historical execution data is reused.

{
  "analysis_id": 41764719,
  "connection_id": "YAMODfiZvHcCHCA=",
  "audience_type": "CUSTOMER_FACING",
  "response_type": "JSON",
  "messages": [
    {
      "human_message": "analyze HFC customer 50137438"
    }
  ],
  "skip_workflow": true,
  "context": {
    "ref_execution_id": "aaaa-aaaa-aaaa-aaaa"
  }
}

Flow:

  1. Backend detects skip_workflow = true
  2. Workflow execution is skipped
  3. Historical execution data is retrieved from S3 using ref_execution_id
  4. Retrieved data is passed directly into the Chat Agent
  5. Post-workflow logic executes

    Note: Ref_execution_id must belong to the same analysis_id provided in the payload.

 

Scenario 2: Using Injected AI Input Data

In this scenario, data is directly injected in the payload.

{
  "analysis_id": 41764719,
  "tool_id": 1231231,
  "connection_id": "YAMODfiZvHcCHCA=",
  "audience_type": "CUSTOMER_FACING",
  "response_type": "JSON",
  "messages": [
    {
      "human_message": "analyze HFC customer 50137438"
    }
  ],
  "skip_workflow": true,
  "context": {
    "ai_input_text": "",
    "ai_input_json": {}
  }
}

Flow:

  1. Backend detects skip_workflow = true
  2. Workflow execution is skipped
  3. ai_input_json (or ai_input_text) is used as the workflow output
  4. Injected data becomes the LLM input
  5. Post-workflow logic executes

    Note: For flow-based tools, ai_input_json is required, and for instruction-based tools, ai_input_text is required.

 

3. Context Construction

After getting the LLM input data, the system retrieves configuration from Aurora and constructs the Chat Agent context.

Instruction-Based Tools

The system retrieves:

  • AI Assistant type
  • Data description
  • Logic
  • Guidelines
  • UI response format

Injected AI input data is embedded directly into this prompt structure.

Flow-Based Tools

The system retrieves:

  • AI Assistant type
  • Data
  • Logic JSON
  • UI response format

Injected AI input data replaces the standard workflow output and is passed into the flow execution layer.

 

4. LLM Input Model

For cross-agent executions, the Chat Agent accepts injected ai input data as the standard input source for:

  • Ai_input_text for Instruction-based execution
  • Ai_input_json for Flow-based execution

 

5. Execution & Output Handling

Context Assembly

The backend combines:

  • Injected AI input data (from payload or S3)
  • Resolved prompts (from Aurora via tool_id selected by tool selection logic)
  • User message
  • Response configuration

All components are placed into the Chat Agent’s context window.

Agent Execution

The Chat Agent:

  1. Executes analysis using injected input
  2. Applies tool-specific logic
  3. Generates structured output (based on response_type & audience_type)

Storage

Final artifacts are stored in S3:

  • Injected input data (response_pruned.txt or response_pruned.json)
  • Generated LLM output (llm_output.json)

This enables:

  • Output comparison
  • Regression testing
  • Historical reference
  • Controlled re-execution

Execution Summary

When skip_workflow is enabled:

  1. Using the question provided in the payload, intent detection and tool selection llm invocations are made.
  2. Workflow JSON execution is bypassed
  3. Input data is injected from payload (via ai_input_text or ai_input_json) or S3 (via ref_execution_id)
  4. Tool configuration is retrieved using tool_id
  5. Prompts and logic are resolved
  6. Chat Agent executes post-workflow logic
  7. Output is generated and stored

Use Cases

This execution mode is suitable for:

  • Regression validation of AI outputs
  • Reprocessing existing execution data
  • Testing prompt updates without rerunning workflows
  • Controlled AI behavior verification
  • Analysis replay with modified configurations


 

Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk