Interface AgentProtocolEventBus
- All Known Implementing Classes:
AgentProtocolTaskEventBus
public interface AgentProtocolEventBus
Event bus abstraction used by Agent Protocol task SSE endpoints.
Implementations are responsible for assigning a monotonically increasing sequence per task,
publishing events, and replaying events after fromSeq. The default implementation is
AgentProtocolTaskEventBus, which keeps the replay buffer in process memory. Applications
that need cross-instance streaming can provide a shared implementation, such as a Redis Streams
adapter, as the AgentProtocolEventBus bean.
-
Method Summary
Modifier and TypeMethodDescriptionvoidCompletes and releases the event stream for a terminal task.io.agentscope.harness.agent.subagent.protocol.RemoteAgentEventPublishes an event for a task and returns the event after protocol fields are assigned.reactor.core.publisher.Flux<io.agentscope.harness.agent.subagent.protocol.RemoteAgentEvent>Subscribes to a task's event stream, replaying only events whose sequence is greater thanfromSeq.
-
Method Details
-
publish
io.agentscope.harness.agent.subagent.protocol.RemoteAgentEvent publish(String taskId, io.agentscope.harness.agent.subagent.protocol.RemoteAgentEvent event) Publishes an event for a task and returns the event after protocol fields are assigned. -
subscribe
reactor.core.publisher.Flux<io.agentscope.harness.agent.subagent.protocol.RemoteAgentEvent> subscribe(String taskId, long fromSeq) Subscribes to a task's event stream, replaying only events whose sequence is greater thanfromSeq. -
complete
Completes and releases the event stream for a terminal task.
-