You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Update Requests and Responses docs
* Add migration guide
* Add checkpoint updates
* Fix warnings and issues
* Add community readme
* Remove request_type param from ctx.request_info()
* Add version number
* Add version number link
* Add support tab to home
@@ -1290,61 +1290,62 @@ A key new feature in Agent Framework's `Workflow` is the concept of **request an
1290
1290
1291
1291
AutoGen's `Team` abstraction runs continuously once started and doesn't provide built-in mechanisms to pause execution for human input. Any human-in-the-loop functionality requires custom implementations outside the framework.
1292
1292
1293
-
#### Agent Framework RequestInfoExecutor
1293
+
#### Agent Framework Request-Response API
1294
1294
1295
-
Agent Framework provides `RequestInfoExecutor` - a workflow-native bridge that pauses the graph at a request for information, emits a `RequestInfoEvent` with a typed payload, and resumes execution only after the application supplies a matching `RequestResponse`.
1295
+
Agent Framework provides built-in request-response capabilities where any executor can send requests using `ctx.request_info()`and handle responses with the `@response_handler` decorator.
**Checkpoint with Human-in-the-Loop Integration:**
1530
1534
1531
-
Checkpointing works seamlessly with human-in-the-loop workflows, allowing workflows to be paused for human input and resumed later:
1535
+
Checkpointing works seamlessly with human-in-the-loop workflows, allowing workflows to be paused for human input and resumed later. When resuming from a checkpoint that contains pending requests, those requests will be re-emitted as events:
1532
1536
1533
1537
```python
1534
1538
# Assume we have workflow, checkpoint_id, and checkpoint_storage from previous examples
1535
-
asyncdefresume_with_responses_example():
1536
-
# Resume with pre-supplied human responses
1537
-
responses = {"request_id_123": "approved"}
1538
-
1539
+
asyncdefresume_with_pending_requests_example():
1540
+
# Resume from checkpoint - pending requests will be re-emitted
1541
+
request_info_events = []
1539
1542
asyncfor event in workflow.run_stream_from_checkpoint(
1540
1543
checkpoint_id,
1541
-
checkpoint_storage=checkpoint_storage,
1542
-
responses=responses # Pre-supply human responses
1544
+
checkpoint_storage=checkpoint_storage
1543
1545
):
1546
+
ifisinstance(event, RequestInfoEvent):
1547
+
request_info_events.append(event)
1548
+
1549
+
# Handle re-emitted pending request
1550
+
responses = {}
1551
+
for event in request_info_events:
1552
+
response = handle_request(event.data)
1553
+
responses[event.request_id] = response
1554
+
1555
+
# Send response back to workflow
1556
+
asyncfor event in workflow.send_responses_streaming(responses):
👋 Welcome! There are a variety of ways to get supported in the Agent Framework world.
13
+
14
+
| Your preference | What's available |
15
+
|---|---|
16
+
| Read the docs |[This learning site](/agent-framework/overview) is the home of the latest information for developers |
17
+
| Visit the repo | Our open-source [GitHub repository](https://github.com/microsoft/agent-framework) is available for perusal and suggestions |
18
+
| Connect with the Agent Framework Team | Visit our [GitHub Discussions](https://github.com/microsoft/agent-framework/discussions) to get supported quickly with our [CoC](https://github.com/microsoft/agent-framework/blob/main/CODE_OF_CONDUCT.md) actively enforced |
19
+
| Office Hours | We will be hosting regular office hours; the calendar invites and cadence are located here: [Community.MD](https://github.com/microsoft/agent-framework/blob/main/COMMUNITY.md)|
0 commit comments