Member Junction
    Preparing search index...

    Parameters for running an AI agent from an existing conversation detail. This is the optimized method that loads conversation history server-side.

    interface RunAIAgentFromConversationDetailParams {
        agentHistoryFrom?: Date;
        agentId: string;
        announcedByAgentId?: string;
        autoPopulateLastRunPayload?: boolean;
        configurationId?: string;
        createArtifacts?: boolean;
        createNotification?: boolean;
        data?: Record<string, unknown>;
        lastRunId?: string;
        maxHistoryMessages?: number;
        onAccepted?: (reply: AgentReplyAcknowledgement) => void;
        onProgress?: (
            progress: {
                currentStep: string;
                message: string;
                metadata?: Record<string, unknown>;
                percentage?: number;
            },
        ) => void;
        payload?: string
        | Record<string, unknown>;
        planMode?: boolean;
        replyBranchId?: string;
        replyParentId?: string;
        requestedSkillIDs?: string[];
        sourceArtifactId?: string;
        sourceArtifactVersionId?: string;
        userMessageId: string;
    }
    Index

    Properties

    agentHistoryFrom?: Date

    The first moment of the conversation this run may read. When set, the server loads the agent's history from there and skips its summary of earlier messages.

    Sent only when set: the argument is left out of the mutation document entirely otherwise, so a server that predates it (and would reject an unknown argument) keeps working.

    agentId: string

    The ID of the AI agent to run

    announcedByAgentId?: string

    An active agent whose fixed line "Continuing with {agent} for refinement..." the server posts before the reply; the reply then threads under it, and onAccepted names it as AnnouncementDetailId.

    autoPopulateLastRunPayload?: boolean

    Whether to auto-populate payload from last run

    configurationId?: string

    Configuration ID to use

    createArtifacts?: boolean

    Whether to create artifacts from the agent's payload

    createNotification?: boolean

    Whether to create a user notification on completion

    data?: Record<string, unknown>

    Data context to pass to the agent (will be JSON serialized)

    lastRunId?: string

    ID of the last agent run for continuity

    maxHistoryMessages?: number

    Maximum number of history messages to include (default: 20)

    onAccepted?: (reply: AgentReplyAcknowledgement) => void

    Called once the server accepts the run, before any progress, with the reply row it created: its ID (which keys this run's progress and completion) and its creation time. Not called when a headless provider runs the turn synchronously; the result's agentRun.ConversationDetailID names the row then.

    onProgress?: (
        progress: {
            currentStep: string;
            message: string;
            metadata?: Record<string, unknown>;
            percentage?: number;
        },
    ) => void

    Optional callback for progress updates

    payload?: string | Record<string, unknown>

    Payload to pass to the agent (will be JSON serialized)

    planMode?: boolean

    Whether Plan Mode is requested for this run (requires the agent's SupportsPlanMode capability)

    replyBranchId?: string

    The branch the turn runs on when it forks off an earlier message on another branch (such as Regenerate, which creates a new fork before running the agent while the user's message stays on its original branch). The server verifies the user's message is on this branch's path before reading history or writing the reply on it.

    replyParentId?: string

    The message the reply threads under, when not the user's message (MJ's chat threads a delegate's reply under the manager's). The server checks it is a message of the same conversation the caller can read.

    requestedSkillIDs?: string[]

    Skill IDs the user requested via /skill-name mentions. The server intersects these with the agent's accepted skills AND the user's Run permission before any are activated.

    sourceArtifactId?: string

    Source artifact ID for versioning

    sourceArtifactVersionId?: string

    Source artifact version ID for versioning

    userMessageId: string

    The person's message this turn answers, already saved. The server creates the agent's reply row (only the server writes agent replies) and names it in the acknowledgement; see onAccepted.