GitHub user ofekron added a comment to the discussion: [Feature] Sub-agent 
Resource for Flink Agents - Framework part

The SubagentInvoker / CallProtocol split above also gives durable execution a 
place to define a critical external-agent contract.

Caching a completed Result handles replay after the local completion record 
exists. It does not cover the crash window where an external agent accepted or 
completed a side effect, but Flink failed before checkpointing the result. 
Re-running the HTTP callable can duplicate work.

I would require each invocation protocol to define:

- a stable invocation ID propagated as the remote idempotency key;
- accepted, running, completed, failed, and unknown/reconciling states;
- a probe/reconcile operation after recovery before any retry;
- cancellation semantics and whether cancellation is only requested or 
confirmed;
- an explicit completion predicate rather than inferring success from internal 
quiescence.

Internal agents can implement that protocol through scoped events; external 
integrations can map it to HTTP, A2A, or another transport. The caller still 
receives one SubagentInvoker API, but durability claims remain honest per 
protocol. If an integration cannot reconcile an unknown outcome, fail closed 
and surface it instead of automatically repeating the call.

We use the same distinction in Better Agent when recovering native Claude, 
Codex, and Gemini runs: durable run identity and reconciliation are separate 
from the provider transport. I maintain the project; it is source-available and 
free for non-commercial use, while commercial use requires separate permission: 
https://github.com/ofekron/better-agent

AI-assistance disclosure: this comment was drafted by Codex under the 
maintainer’s authorization and reviewed in Better Agent.

GitHub link: 
https://github.com/apache/flink-agents/discussions/909#discussioncomment-17693706

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to