Uses of Record Class
com.tnsai.coordination.handoff.HandoffContext
Packages that use HandoffContext
Package
Description
Narrow, bounded task delegation between agents (TNS-117).
-
Uses of HandoffContext in com.tnsai.coordination.handoff
Methods in com.tnsai.coordination.handoff that return HandoffContextModifier and TypeMethodDescriptionstatic HandoffContextCreates a context with only a task ID.static HandoffContextCreates a context with a task ID and payload.HandoffContext.withPayload(String key, Object value) Returns a new context with an additional payload entry.Methods in com.tnsai.coordination.handoff with parameters of type HandoffContextModifier and TypeMethodDescriptionConditionalHandoff.execute(Handoff handoff, com.tnsai.agents.Agent from, HandoffContext ctx) Evaluates routes in order and executes the handoff to the first matching target.HandoffChain.execute(Handoff handoff, HandoffContext initialContext) Executes the chain starting from the first agent.DefaultHandoff.handoff(com.tnsai.agents.Agent from, com.tnsai.agents.Agent to, HandoffContext ctx) Handoff.handoff(com.tnsai.agents.Agent from, com.tnsai.agents.Agent to, HandoffContext ctx) Hands off a task from one agent to another.default voidHandoffListener.onBefore(com.tnsai.agents.Agent from, com.tnsai.agents.Agent to, HandoffContext ctx) Called before the handoff is executed.default voidHandoffListener.onFailed(com.tnsai.agents.Agent from, com.tnsai.agents.Agent to, HandoffContext ctx, Exception ex) Called when a handoff fails with an exception.Method parameters in com.tnsai.coordination.handoff with type arguments of type HandoffContextModifier and TypeMethodDescriptionHandoffChain.Builder.add(com.tnsai.agents.Agent agent, Predicate<HandoffContext> condition) Adds a conditional step that is skipped when the predicate returns false.ConditionalHandoff.when(Predicate<HandoffContext> predicate, com.tnsai.agents.Agent target) Adds a conditional route.