forked from awslabs/multi-agent-orchestrator
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update doc about bedrock flow agent & direct call for classifier
- Loading branch information
1 parent
801a391
commit 7e766c4
Showing
3 changed files
with
132 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,50 @@ | ||
## BedrockFlowsAgent example | ||
This example, in Python and Typescript, show how to integrate your Bedrock Flows into the multi-agent orchestrator. | ||
|
||
This is the flow we used for our testing. | ||
|
||
### tech-agent-flow | ||
|
||
In this flow we connected an input node to a prompt node and the output of the prompt is connected to an output node. | ||
|
||
|
||
 | ||
|
||
|
||
The prompt node has 2 inputs: | ||
# BedrockFlowsAgent Example | ||
|
||
This example demonstrates how to use the **[BedrockFlowsAgent](https://awslabs.github.io/multi-agent-orchestrator/agents/built-in/bedrock-flows-agent/)** for direct agent invocation, avoiding the multi-agent orchestration when you only need a single specialized agent. | ||
|
||
## Direct Agent Usage | ||
Call your agent directly using: | ||
|
||
Python: | ||
```python | ||
response = await orchestrator.agent_process_request( | ||
user_input, | ||
user_id, | ||
session_id, | ||
classifier_result | ||
) | ||
``` | ||
|
||
TypeScript: | ||
```typescript | ||
const response = await orchestrator.agentProcessRequest( | ||
userInput, | ||
userId, | ||
sessionId, | ||
classifierResult | ||
) | ||
``` | ||
|
||
This approach leverages the BedrockFlowsAgent's capabilities: | ||
- Conversation history management | ||
- Bedrock Flow integration | ||
- Custom input/output encoding | ||
|
||
### Tech Agent Flow Configuration | ||
The example flow connects: | ||
- Input node → Prompt node → Output node | ||
|
||
The prompt node accepts: | ||
- question (current question) | ||
- history (previous conversation) | ||
|
||
 | ||
 | ||
|
||
📝 **Note** | ||
📅 As of December 2, 2024, Bedrock Flows does not include built-in memory management. | ||
|
||
📝 Note | ||
|
||
📅 As of December 2, 2024, Bedrock Flows does not include a memory feature to retain previous interactions. | ||
|
||
In this example, we demonstrate: | ||
- 1️⃣ How to integrate your flow into a multi-agent orchestrator. | ||
- 2️⃣ How to incorporate conversation history into your flow to provide a smoother user experience and generate more accurate results. | ||
|
||
🚀 Let's get started! | ||
See the code samples above for complete implementation details. | ||
|
||
--- | ||
*Note: For multi-agent scenarios, add your agents to the orchestrator and use `orchestrator.route_request` (Python) or `orchestrator.routeRequest` (TypeScript) to enable classifier-based routing.* |