Merge branch 'main' into crickman/dotnet-sample-improvements

This commit is contained in:
Chris
2026-02-19 13:49:56 -08:00
committed by GitHub
Unverified
32 changed files with 2605 additions and 123 deletions
@@ -20,7 +20,6 @@ management, enabling persistent conversation history storage across sessions
with Redis as the backend data store.
"""
# Default Redis URL for local Redis Stack.
# Override via the REDIS_URL environment variable for remote or authenticated instances.
REDIS_URL = os.getenv("REDIS_URL", "redis://localhost:6379")
@@ -153,7 +153,7 @@ class Coordinator(Executor):
# Human approved the draft as-is; forward it unchanged.
await ctx.send_message(
AgentExecutorRequest(
messages=original_request.conversation + [Message("user", text="The draft is approved as-is.")],
messages=[*original_request.conversation, *[Message("user", text="The draft is approved as-is.")]],
should_respond=True,
),
target_id=self.final_editor_id,
@@ -161,16 +161,15 @@ class Coordinator(Executor):
return
# Human provided feedback; prompt the writer to revise.
conversation: list[Message] = list(original_request.conversation)
instruction = (
"A human reviewer shared the following guidance:\n"
f"{note or 'No specific guidance provided.'}\n\n"
"Rewrite the draft from the previous assistant message into a polished final version. "
"Keep the response under 120 words and reflect any requested tone adjustments."
)
conversation.append(Message("user", text=instruction))
await ctx.send_message(
AgentExecutorRequest(messages=conversation, should_respond=True), target_id=self.writer_id
AgentExecutorRequest(messages=[Message("user", text=instruction)], should_respond=True),
target_id=self.writer_id,
)
@@ -123,7 +123,8 @@ class Coordinator(Executor):
)
conversation.append(Message("user", text=instruction))
await ctx.send_message(
AgentExecutorRequest(messages=conversation, should_respond=True), target_id=self.writer_name
AgentExecutorRequest(messages=conversation, should_respond=True),
target_id=self.writer_name,
)
@@ -144,7 +144,9 @@ async def run_agent_framework_with_cycle() -> None:
if last_message and "APPROVED" in last_message.text:
await context.yield_output("Content approved.")
else:
await context.send_message(AgentExecutorRequest(messages=response.full_conversation, should_respond=True))
await context.send_message(
AgentExecutorRequest(messages=response.full_conversation, should_respond=True)
)
workflow = (
WorkflowBuilder(start_executor=researcher)