Package com.tnsai.coordination.handoff
Interface Handoff
- All Known Implementing Classes:
DefaultHandoff
public interface Handoff
Strategy interface for executing a one-shot handoff between two agents.
A handoff compresses everything the receiver needs into the
HandoffContext payload at dispatch time. The sender's
reasoning is not available to the receiver after the call returns —
by design, since handoff is the right tool when the receiver should
operate independently from the sender's history (sandboxed
execution, trust-boundary crossings, bounded sub-task dispatch).
Read this package's
documentation before reaching for Handoff as a default.
It is a narrow tool, not a coordination default. For multi-session
continuity prefer SnapshotStore;
for primary inter-agent reasoning prefer
com.tnsai.coordination.roma; for quality gates prefer
com.tnsai.coordination.judge. The package-level docs lay
out which case fits which tool.
-
Method Summary
Modifier and TypeMethodDescriptionhandoff(com.tnsai.agents.Agent from, com.tnsai.agents.Agent to, HandoffContext ctx) Hands off a task from one agent to another.
-
Method Details
-
handoff
Hands off a task from one agent to another. The receiver gets only what is inctx— none offrom's message history, scratchpad, or decision trace travels along.- Parameters:
from- the source agentto- the target agentctx- the handoff context containing task details- Returns:
- the result of the handoff
-