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
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)
Split transport mode from message delivery type in
ExecutionModeSummary
ExecutionMode(ak-py/src/agentkernel/core/model.py:162-170) currently mixes twounrelated 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
streamdescribes how the response is delivered (delta chunksvs. one complete message).
streamalso implies SSE, which Agent Kernel does notsupport — the current "stream" mode is really WebSocket async delivering delta chunks.
Proposed change
Two independent settings:
1. Execution mode — how the request is invoked
rest_syncrest_asyncasync2. Message type — how the response is returned
deltacompleteThis removes the misleading
streammode, makes the naming match what the systemactually does, and lets chunked delivery be configured per transport instead of being
baked into one mode.
Scope
ExecutionModeand add the message-type field toAKConfigstreammode toasync+delta(backwards-compatible handling / deprecation)Acceptance criteria
streamis no longer a valid execution modestreamconfigs continue to work (or fail with a clear migration message)