diff --git a/python/packages/core/agent_framework/_types.py b/python/packages/core/agent_framework/_types.py index 00edbaa937a..3ec0d045048 100644 --- a/python/packages/core/agent_framework/_types.py +++ b/python/packages/core/agent_framework/_types.py @@ -424,8 +424,6 @@ def _restore_compaction_annotation_in_additional_properties( CreatedAtT = str # Use a datetimeoffset type? Or a more specific type like datetime.datetime? -URI_PATTERN = re.compile(r"^data:(?P[^;]+);base64,(?P[A-Za-z0-9+/=]+)$") - KNOWN_MEDIA_TYPES = [ "application/json", "application/octet-stream", diff --git a/python/packages/core/agent_framework/_workflows/_workflow_builder.py b/python/packages/core/agent_framework/_workflows/_workflow_builder.py index 3eed9ca800a..4f2861bd906 100644 --- a/python/packages/core/agent_framework/_workflows/_workflow_builder.py +++ b/python/packages/core/agent_framework/_workflows/_workflow_builder.py @@ -569,7 +569,11 @@ def add_chain(self, executors: Sequence[Executor | SupportsAgentRun]) -> Self: The output of each executor in the chain will be sent to the next executor in the chain. The input types of each executor must be compatible with the output types of the previous executor. - Cycles in the chain are not allowed, meaning an executor cannot appear more than once in the chain. + An edge is added between each consecutive pair of executors in the sequence. If an executor + appears more than once, the corresponding edges are still added, which can introduce a cycle + (for example, ``add_chain([a, b, a])`` adds the edges ``a -> b`` and ``b -> a``). This is + permitted: the workflow graph supports cycles, just as calling ``add_edge(a, b)`` followed by + ``add_edge(b, a)`` does. Args: executors: A list of executors or agents to chain together.