Python: Add sample to show handoff as agent with HITL (#2534)

* Add sample to show handoff as agent with HITL

* Update uv.lock with latest pkg versions. Fix lint error.

* Upgrade grpcio to 1.76.0

* Handle grpcio versions

* Case insensitive compare for declarative
This commit is contained in:
Evan Mattson
2025-12-02 09:50:13 +09:00
committed by GitHub
Unverified
parent 8ae33d3c2b
commit e3b700ad9f
6 changed files with 697 additions and 307 deletions
@@ -149,9 +149,9 @@ class WorkflowGraphValidator:
# check only when there is at least one edge group defined.
if self._edges: # Only evaluate when the workflow defines edges
edge_executor_ids: set[str] = set()
for _e in self._edges:
edge_executor_ids.add(_e.source_id)
edge_executor_ids.add(_e.target_id)
for e in self._edges:
edge_executor_ids.add(e.source_id)
edge_executor_ids.add(e.target_id)
if start_executor_id not in edge_executor_ids:
raise GraphConnectivityError(
f"Start executor '{start_executor_id}' is not present in the workflow graph"
@@ -253,7 +253,7 @@ class Connection(SerializationMixin):
# We're being called on a subclass, use the normal from_dict
return SerializationMixin.from_dict.__func__(cls, value, dependencies=dependencies) # type: ignore[misc]
kind = value.get("kind", "")
kind = value.get("kind", "").lower()
if kind == "reference":
return SerializationMixin.from_dict.__func__( # type: ignore[misc]
ReferenceConnection, value, dependencies=dependencies
@@ -262,7 +262,7 @@ class Connection(SerializationMixin):
return SerializationMixin.from_dict.__func__( # type: ignore[misc]
RemoteConnection, value, dependencies=dependencies
)
if kind == "key":
if kind in ("key", "apikey"):
return SerializationMixin.from_dict.__func__( # type: ignore[misc]
ApiKeyConnection, value, dependencies=dependencies
)