---
sourceDocument: Brazil Enable AI
sourceDocumentLink: https://www.servicenow.com/docs/r/intelligent-experiences

 Release :

    - brazil

ft:locale :

    - en-US

ft:publication_title :

    - Brazil Enable AI

ft:clusterId :

    - platai

bundleId :

    - platai

workflow :

    - Platform


---

# Parser tool

# Agentic evaluation parser tool {#ariaid-title1}

Release version: Brazil  
Updated September 10, 2026  
![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read
Summarize  
![AI sparkle icon](https://servicenow.com/docs/portal-asset/ai-sparkle-icon) Summarized using AI  
This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.  

## Summary of Agentic evaluation parser tool

The Agentic evaluation parser tool is designed to extract structured execution data from the logs of agentic workflows or AI agents within ServiceNow.
This data enables you to create custom metrics by scripting evaluations based on detailed execution insights.
It provides a comprehensive JSON output that includes initial setup, agent actions, conversation messages, and execution metadata.
Show full answer Show less  

## Key Features

* **Structured Output:** The tool returns execution data within `output.payload` containing four main components:
  * **executionInputs:** Details on workflow setup, agent names, tools, instructions, and initial user input.
  * **executionOutputs:** Records AI agent actions, tool inputs, and outputs during execution.
  * **executionMessages:** An ordered array of conversation messages exchanged between users and agents.
  * **executionPlanDetails:** Metadata such as execution status, run type, conversation and task IDs, and context for tracking and debugging.
* **Test and Inspect Outputs:** You can view the complete JSON output in the Script Editor's test results to understand data structure before implementing custom metrics.
* **Data Access in Scripts:** The parser output can be accessed via the `context` parameter within metric scripts, allowing you to parse and utilize each data section programmatically.

## Practical Use for ServiceNow Customers

This tool empowers you to tailor AI agent and workflow evaluations by leveraging detailed execution data for:

* Customizing performance metrics based on real-time agent interactions and tool usage.
* Debugging and monitoring workflow executions with rich metadata linking conversations to tasks.
* Enhancing AI agent effectiveness by analyzing conversation flows and execution plans.

By integrating this parser tool's output into your metric scripts, you gain fine-grained control over how agentic workflows are assessed and optimized within your ServiceNow environment.  
Use the outputs of the agentic evaluation parser tool in your scripts for custom metrics to customize the criteria for effective AI agents and agentic workflows.

## Parser tool overview

The agentic evaluation parser tool extracts structured execution data from the execution logs of an agentic workflow or AI agent. You can use the information gathered by the tool to create custom metrics that use scripts to evaluate
agentic workflows.

The parser tool returns structured AI agent or agentic workflow execution data within the output.payload object, which contains the following:

* executionInputs: A JSON object that contains initial workflow setup information, such as the names and instructions of agents and tools and the initial user utterance
* executionOutputs: A JSON object with AI agent actions and tool execution results
* executionMessages: A JSON object array of user-facing conversation flow and system responses
* executionPlanDetails: A JSON object of execution metadata, such as status, sys_ids, and configuration values

    {
         "output": {
     "payload": {
      "executionInputs": { ... },
      "executionOutputs": { ... },
      "executionMessages": [ ... ],
      "executionPlanDetails": { ... }
     }
    }

## Accessing the parser tool's output

To view the complete parser tool output for testing and development, perform the following steps.

* Navigate to the Script Editor view in your custom metric guided setup.
* Select Run Test.
* Wait for the test to complete.
* View the complete JSON output in the Tools section of the test results.

Reviewing the parser tool's output before designing your custom metric enables you to inspect the data structure before implementing any specific logic.

## executionInputs data structure

The executionInputs attribute contains a JSON object with the following structure:

    "executionInputs": {
     "agenticWorkflow": "(name of agentic workflow)",
     "description": "(descriptions for agentic workflow)",
     "instructions": "(list of steps for agentic workflow)", 
     "utterance": "(initial user utterance)", 
     "agents": [ 
      { 
       "name": "(AI agent name)",  
       "instructions": "(list of steps for AI agent)", 
       "tools": [ 
        { 
         "name": "(tool name)", 
         "description": "(tool description)", 
         "executionMode": "(execution mode, either Autonomous or Supervised)", 
         "inputs": { ... } 
        }, 
        { ... }, ... 
       ]
      }, 
      { ... }, ... 
     ]
    }

## executionOutputs data structure

The executionOutputs attribute contains a JSON object with the following structure:

    "executionOutputs": {
     "agents": [ 
      { 
       "name": "(AI agent name)", 
       "subTask": { ... }, 
       "tools": [ 
        { 
         "name": "(tool name)", 
         "inputs": { ... }, 
         "output": { ... }
        }
       ]
      }, 
      { ... }, ... 
     ]
    }

## executionMessages data structure

The executionOutputs attribute contains an array of JSON objects with the following structure:

    "executionMessages": [ 
     { 
      "role": "(Message sender, either 'agent' or 'user')", 
       "message": "(Content of message)", 
       "order": "(Sequence number indicating order of message in the conversation)"
      }, 
      { ... }, ... 
    ]
       
## executionPlanDetails data structure

The executionPlanDetails attribute contains a JSON object with the following structure:

    "executionPlanDetails": { 
        "state": "(Current execution status)", 
        "runType": "(Type of execution)", 
        "conversationId": "(sys_id of conversation)", 
        "relatedTask": "(sys_id of the associated task or record)", 
        "relatedTaskTable": "(Table name where the related task is stored)", 
        "context": { ... } (May be null)
        "builtInTools": [ { ... } ]
        }
       
This section provides execution metadata for tracking workflow performance, debugging issues, and correlating executions with specific tasks or conversations.

The possibilities for runType include the following:

* API
* Chat
* Evaluation
* Testing
* Trigger

## Using parser tool output in metric scripts

The parser tool data is available in your metric script through the context parameter. Access the structured data using the following code:

    // Access the parser tool output from context
    var parserToolOutput = context['AgenticExecutionParserTool.output'];
    if (typeof parserToolOutput == "string") {
     parserToolOutput = JSON.parse(parserToolOutput);
    }
    var parserToolPayload = parserToolOutput.payload;
    var parserToolStatus = parserToolOutput.status;
        
    // Extract individual sections from payload
    var inputs = parserToolPayload.executionInputs;
    var outputs = parserToolPayload.executionOutputs;
    var messages = parserToolPayload.executionMessages;
    var planDetails = parserToolPayload.executionPlanDetails;
       

