@camunda8/orchestration-cluster-api
    Preparing search index...

    Type Alias AgentInstanceCreationRequest

    Request to create a new agent instance.

    type AgentInstanceCreationRequest = {
        definition?: AgentInstanceDefinition;
        elementInstanceKey: ElementInstanceKey;
        history?: AgentInstanceHistoryItem[] | null;
        jobKey?: JobKey | null;
        jobLease?: string | null;
        limits?: AgentInstanceLimits;
    }
    Index

    The agent's initial definition; model, provider, and systemPrompt can all be changed later via a CONFIGURATION history item. Required when history is empty or omitted. Must be omitted when history is non-empty — supply model, provider, and systemPrompt through a CONFIGURATION item in history instead.

    elementInstanceKey: ElementInstanceKey

    The key of the AI Agent Sub-process or AI Agent Task element instance. The engine uses this key to infer processInstanceKey, elementId, processDefinitionKey, and tenantId.

    history?: AgentInstanceHistoryItem[] | null

    A batch of history items to append to the agent instance's conversation history, in request order. Each created item is echoed back in the response's createdHistory, positionally correlated. When non-empty, model, provider, and systemPrompt (and, if needed, limits) must be established through a CONFIGURATION item in this batch instead of the top-level definition/limits, which must then be omitted.

    jobKey?: JobKey | null

    The key of the job activation during which this creation is being made. Required whenever history is non-empty.

    jobLease?: string | null

    Opaque lease token received from the job activation response. Disambiguates this activation from any other activation of the same job: if the job is later retried, history items submitted under a superseded lease are discarded rather than committed.

    Limits for the agent execution. When omitted, all limits default to -1 (no limit). Must be omitted when history is non-empty — supply limits through a CONFIGURATION item in history instead, if needed.