ART Framework API Docs
    Preparing search index...

    Class TaskDelegationService

    Service responsible for delegating A2A tasks to remote agents. Implements the A2A protocol for task submission, tracking, and completion.

    This service handles:

    • Finding suitable agents for specific task types
    • Submitting tasks to remote agents via HTTP API
    • Tracking task status and handling updates
    • Managing task lifecycle according to A2A protocol
    • Error handling and retry logic
    • Integration with local task repository for persistence
    Index

    Constructors

    Methods

    • Cancels a delegated task on the remote agent.

      Parameters

      • task: A2ATask

        The A2A task to cancel

      • OptionaltraceId: string

        Optional trace ID for request tracking

      Returns Promise<boolean>

      Promise resolving to whether cancellation was successful

    • Delegates a single A2A task to a suitable remote agent.

      Parameters

      • task: A2ATask

        The A2A task to delegate

      • OptionaltraceId: string

        Optional trace ID for request tracking

      Returns Promise<null | A2ATask>

      Promise resolving to the updated task or null if delegation failed

    • Delegates a list of A2A tasks to suitable remote agents. For each task, finds the best agent and submits the task.

      Parameters

      • tasks: A2ATask[]

        Array of A2A tasks to delegate

      • OptionaltraceId: string

        Optional trace ID for request tracking

      Returns Promise<A2ATask[]>

      Promise resolving to array of successfully delegated tasks