Member Junction
    Preparing search index...

    Type Alias ExecuteAgentResult<P>

    Result returned from executing an AI Agent with comprehensive execution history.

    This result structure provides complete visibility into the agent's execution flow, including all prompts executed, actions taken, sub-agents invoked, and decisions made. The agentRun property contains the full execution history with all steps.

    type ExecuteAgentResult<P = any> = {
        actionableCommands?: ActionableCommand[];
        agentRun: MJAIAgentRunEntityExtended;
        automaticCommands?: AutomaticCommand[];
        feedbackRequestId?: string;
        fileOutputs?: FileOutputRef[];
        mediaOutputs?: MediaOutput[];
        memoryContext?: { examples: any[]; notes: any[] };
        payload?: P;
        payloadArtifactTypeID?: string;
        resolvedStorageAccountId?: string;
        responseForm?: AgentResponseForm;
        success: boolean;
    }

    Type Parameters

    • P = any

      Generic type parameter for payload value, allowing flexibility in the type of data returned by the agent

    Index

    Properties

    actionableCommands?: ActionableCommand[]

    Optional actionable commands shown as clickable buttons/links. Typically used after completing work to provide easy navigation to created/modified resources. Populated from the agent's final step.

    2.116.0

    The agent run entity with full execution history.

    • Use agentRun.ErrorMessage for error details
    • Use agentRun.Status === 'Cancelled' to check if cancelled
    • Use agentRun.CancellationReason for cancellation reason
    • Use agentRun.Steps for the execution step history
    automaticCommands?: AutomaticCommand[]

    Optional automatic commands executed immediately when received. Used for refreshing data, showing notifications, and updating UI state. Populated from the agent's final step.

    2.116.0

    feedbackRequestId?: string

    When a Chat step fires, BaseAgent creates a persistent AIAgentRequest row and returns the new record's ID here. Callers use this to:

    • Send notifications to the assigned user
    • Track conversation-request sync (resolver marks the request as Responded when the user replies)
    • Deep-link into the Agent Requests dashboard

    Null/undefined when the agent did not terminate on a Chat step.

    5.12.0

    fileOutputs?: FileOutputRef[]

    File outputs (PDF, Excel, Word, etc.) produced by file-generation actions during this run. Collected by BaseAgent during action execution and processed by AgentRunner into MJ: Artifacts (ContentMode='File') after the run completes.

    Unlike mediaOutputs (which are injected into the LLM conversation as multimodal content), file outputs are archived as versioned artifacts and never sent to the LLM. Sub-agents bubble their fileOutputs up to the parent for unified artifact creation.

    5.22.0

    mediaOutputs?: MediaOutput[]

    Multi-modal outputs generated by the agent. Contains media that the agent explicitly promoted to its outputs. All media items are persisted by default (flows through AgentRunner to AIAgentRunMedia + ConversationDetailAttachment, then auto-paired to MJ: Artifact Versions via the server-side hook).

    Media items with refId are used for placeholder resolution (${media:xxx}) in structured payload / actionable commands. Sub-agents return their mediaOutputs to parents for bubbling up.

    3.1.0

    memoryContext?: { examples: any[]; notes: any[] }

    Optional memory context that was injected into the agent execution. Includes the notes and examples that were retrieved and used for context.

    payload?: P

    Optional payload returned by the agent

    payloadArtifactTypeID?: string

    The artifact type ID for the returned payload. This identifies what type of artifact the payload represents (e.g., JSON, Markdown, HTML). Used by UI to determine how to render the payload and which extract rules to apply. If not specified, falls back to the agent's default artifact type configuration.

    resolvedStorageAccountId?: string

    The resolved FileStorageAccount ID for file artifact storage, determined during agent execution via the hierarchical resolution chain: Runtime → Agent → Category tree → Type → system fallback.

    Used by AgentRunner to route file artifact uploads to the correct storage account. Null when no storage account could be resolved (e.g., no accounts configured).

    5.24.0

    responseForm?: AgentResponseForm

    Optional response form to collect structured user input. When present, the UI will render appropriate input controls based on question types. Populated from the agent's final step.

    2.116.0

    success: boolean

    Whether the agent execution was successful