Formal semantics for CancellationToken and topic-based pub/sub #7583
greatmengqi
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
AutoGen v0.4's
CancellationToken(_cancellation_token.py) and topic-subscription model are the most principled cancellation and observability designs among the major agent frameworks.I wrote a paper formalizing these patterns. The cancellation result that may interest you: cancellation can be modeled as a monad transformer on the interpreter's effect functor, adding zero new AST primitives. This gives you structural propagation through shared context and cleanup soundness for free — which aligns closely with how AutoGen's
CancellationToken.cancel()+link_future()already works.Papers:
The formalization covers six axes (observability, shared state, event rendezvous, control transfer, sessions, cancellation) across four frameworks. AutoGen is the only one that gets cancellation right at the API level.
Beta Was this translation helpful? Give feedback.
All reactions