Simple Agent Designer Documentation
Index

Processing Workloads

This page explains how to run, monitor, and review workload processing in Simple Agent Designer.

Starting Processing

Processing a Single Workload

From the Workload Card

  1. Open the workload you want to process
  2. Choose Process from the action bar
  3. The orchestration engine starts processing

From the Workload List

  1. Select the workload in the list
  2. Choose Process from the action bar

Processing All Workloads

  1. Open the Workload List
  2. Choose Process All from the action bar
  3. All workloads with status Not Started are processed in sequence
  4. The system commits after each workload, so a failure in one does not affect others

Processing from a Workload Type

For DataBased workload types:

  1. Open the Workload Type Card
  2. Choose Process from the action bar
  3. A workload is created from the type configuration and immediately processed
  4. The Table Splitter creates child workloads from matching records

What Happens During Processing

The Orchestration Flow

When you choose Process, the orchestration engine performs these steps:

  1. License Check — validates your Simple Agent Designer license
  2. Reprocess Check — if the workload was previously processed, asks for confirmation
  3. Load Configuration — reads the Workload Type settings
  4. Splitting Decision:
    • DataBased: Calls Table Splitter, creates child workloads, then automatically processes them (see below), marks parent as Success, exits
    • PayloadBased with Excel Splitter: Calls Excel Splitter, creates child workloads, then automatically processes them (see below), marks parent as Success, exits
    • PayloadBased without splitter: Proceeds to agent processing

When a parent workload is split, the orchestration engine does not stop at creating the children. It automatically iterates over all child workloads with status Not Started and runs each one through the agent pipeline end to end. You do not need to process the children manually — splitting and processing happen in a single Process action. Individual children can still be reprocessed later if needed.

  1. File Attachment — if the workload has Additional Data, attaches it to the AI conversation
  2. Agent Initialization — creates the starting worker with full context
  3. First Message — sends the "PleaseStart" system prompt to the agent
  4. Agent Processing Loop:
    • Agent calls the AI provider
    • If tool calls are returned, executes tools and loops back
    • If other agents are referenced, queues messages via orchestration
    • Process continues until the agent completes or fails
  5. Status Update — marks the workload as Success or Fail with result text

Tool Execution Loop

When an agent's AI response includes tool calls:

AI Response (with tool calls)
    ↓
Execute tool call 1 → Get result
Execute tool call 2 → Get result
    ↓
Send tool results back to AI
    ↓
AI Response (with more tool calls or final answer)
    ↓
Repeat until no more tool calls

The system continues this loop until the AI provides a response without tool calls.

Monitoring Processing

Debug Run (Real-Time)

For detailed, real-time monitoring:

  1. Open the Workload Card
  2. Choose Debug Run from the action bar
  3. The Process Chat page opens
  4. Processing begins, and you see each activity as it happens

The Process Chat shows:

Column Description
Worker Which agent performed the action
Date Timestamp of the activity
Description First 2024 characters of the AI text

Actions in Process Chat:

  • Next Step — manually trigger the next worker in the chain (useful for step-by-step debugging)
  • View AI Stack — shows all currently active workers and their state

Viewing History After Processing

View Last Run

  1. Open the Workload Card
  2. Choose View Last Run from the action bar
  3. The ChatViewer page opens with the complete conversation history
  4. Review the full AI text for each activity

View Last Run Data

  1. Open the Workload Card
  2. Choose View Last Run Data from the action bar
  3. The Process History page opens with detailed activity records

Process Activity Records

Every AI interaction during processing is logged as a Process Activity record:

Field Description
Line No. Auto-incremented unique identifier
Work ID References the workload being processed
Date Timestamp of the activity
Worker Agent ID that performed the action
Description First 2024 characters of the AI response
AI Text Full AI response stored as a blob (for large responses)
Tool Used Names of any tools executed during this activity

These records provide a complete audit trail of what each agent did during processing.

Reviewing Results

Workload Status

After processing, check the workload status:

Status Meaning
Success The agent completed the task successfully
Fail The agent encountered an error or could not complete the task
Not Started The workload has not been processed yet
Started Processing is currently in progress

Processed Result

The Processed Result field on the Workload Card contains the agent's summary text — typically the final response from the primary agent.

Documents Created

If the agent created Business Central documents:

  1. Open the Workload Card
  2. Choose Documents Created from the action bar
  3. The Workload Links page shows all linked documents
Link Type Description
General Journal General journal entry created
Sales Quote Sales quote created
Sales Order Sales order created
Sales Invoice Sales invoice created
Sales Credit Memo Sales credit memo created
Purchase Quote Purchase quote created
Purchase Order Purchase order created
Purchase Invoice Purchase invoice created
Purchase Credit Memo Purchase credit memo created
Item Journal Item journal entry created
Data A referenced data record

Click on a document number to drill down to the actual Business Central document.

Background Processing

Simple Agent Designer supports background processing for workloads. When a workload is processed in the background:

  1. A background session is created
  2. The orchestration engine's CompleteProcess procedure runs in that session
  3. When complete, an Agent Work entry is created to track the work performed
  4. The workload record is refreshed with the final status

Background processing is useful for long-running workloads that should not block the user's session.

Reprocessing

To reprocess a workload that has already been processed:

  1. Open the workload (or select it in the list)
  2. Choose Process
  3. The system detects it has been processed before and asks for confirmation
  4. If confirmed, the workload is reset and processed again
  5. Previous activity records are retained for reference

Error Handling

Common Processing Errors

Error Cause Resolution
License validation failed Invalid or expired license Activate or renew your license
AI provider error Invalid endpoint, key, or model Check your AI Provider configuration
Timeout AI provider took too long Retry the workload; consider a faster model
Tool execution error Tool failed during execution Check the process activity for details
Rate limit (429) Too many AI requests The system retries automatically (up to 10 times)

Diagnosing Issues

  1. Open the failed workload
  2. Use View Last Run to see the conversation history
  3. Look for error messages in the activity log
  4. Check the Tool Used field for any tool that may have failed
  5. Review the AI response for unexpected behavior

Tips and Best Practices

  • Use Debug Run for new workload types until you are confident they work correctly
  • Always review the first few results when setting up a new workflow
  • For bulk processing, process a small sample first before running Process All on hundreds of workloads
  • Monitor AI token usage in the activity log to track costs
  • Set up incremental processing for recurring data-based workloads
  • Review the Documents Created links to verify agents created the correct documents
  • Keep the Process Chat open during development to see real-time agent behavior