Skip to content

[FEATURE] Split transport mode from message delivery type in ExecutionMode #641

Description

@lakindu-yl

Split transport mode from message delivery type in ExecutionMode

Summary

ExecutionMode (ak-py/src/agentkernel/core/model.py:162-170) currently mixes two
unrelated concerns into one enum: rest_sync, rest_async, stream, async.

Three of these describe the transport / invocation style (sync REST, async REST,
WebSocket async), but stream describes how the response is delivered (delta chunks
vs. one complete message). stream also implies SSE, which Agent Kernel does not
support — the current "stream" mode is really WebSocket async delivering delta chunks.

Proposed change

Two independent settings:

1. Execution mode — how the request is invoked

Value Meaning
rest_sync Synchronous REST
rest_async Asynchronous REST
async WebSocket

2. Message type — how the response is returned

Value Meaning
delta Incremental chunks as the agent produces them
complete The full response in a single message

This removes the misleading stream mode, makes the naming match what the system
actually does, and lets chunked delivery be configured per transport instead of being
baked into one mode.

Scope

  • Update ExecutionMode and add the message-type field to AKConfig
  • Map the existing stream mode to async + delta (backwards-compatible handling / deprecation)
  • Update mode-to-handler routing, deployment routers, and framework adapters
  • Update docs

Acceptance criteria

  • stream is no longer a valid execution mode
  • Execution mode and message type are configurable independently
  • Existing stream configs continue to work (or fail with a clear migration message)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions