dragon.ai.agent.config.dispatch.DispatchHeader
- class DispatchHeader[source]
Bases:
objectTyped header sent by the batch dispatcher to an agent’s input queue.
Parameters
- task:
Human-readable task description for the agent.
- serialized_ddict:
Serialized handle of the shared DDict for the current run.
- completion_event:
A
Eventthe agent sets when it finishes. The dispatcher blocks on this event instead of polling DDict.Nonewhen the agent is invoked outside of Dragon Batch (e.g. direct unit tests).- dispatch_id:
Universally unique identifier for this specific invocation, generated automatically via
uuid.uuid4(). Scopes all per-invocation DDict keys (RESULT_KEY,STATUS_KEY,LLM_EVENT_KEY,TOOL_EVENT_KEY,HITL_EVENT_KEY) so that concurrent dispatches of the same(task_id, agent_id)pair — e.g. retries or parallel pipeline runs — never collide in the shared DDict. The dispatcher reads this value back after construction to format the same keys when checking status.- upstream_agent_ids:
List of direct-dependency
agent_idvalues whose results this agent should read from DDict. Populated fromPipelineNode.depends_onby the batch dispatcher. Empty list (default) = fall back to reading the full global state (backward-compatible).- tracing:
Pipeline-level tracing flag propagated from
OrchestratorConfig. WhenTruethe agent creates aDictTracingProcessorand writes per-event DDict keys in real time.
- __init__(task: str , serialized_ddict: str , completion_event: Any = None, dispatch_id: str = <factory>, upstream_agent_ids: list [str ] = <factory>, tracing: bool = False) None
Methods
__init__(task, serialized_ddict, ...)Attributes