Skip to content

Latest commit

 

History

History
55 lines (33 loc) · 1.55 KB

File metadata and controls

55 lines (33 loc) · 1.55 KB

Build Genai Agent Workflowsw with Step Functions

This repository provides code for Build Genai Agent Workflowsw with Step Functions workshop. This workshop uses Step Funtions and Bedrock to implement complex tasks with prompt chaining.

This workshop is based on Amazon Bedrock Serverless Prompt Chaining.

Write a story

This example generates a short story about a given topic.

Screenshot

This task is broken down into multiple subtasks to first generate a list of characters for the story, generate each character's arc for the story, and then finally generate the short story using the character descriptions and arcs. This example illustrates using a loop in a Step Functions state machine to process a list generated by a foundation model in Bedrock, in this case to process the generated list of characters.

Visualization of the blog post workflow

CDK code: stacks/story_writer_stack.py

Deploy the examples

Install both nodejs and python on your computer.

Install CDK:

npm install -g aws-cdk

Set up a virtual env:

python3 -m venv .venv

source .venv/bin/activate

pip install -requirements.txt

Deploy the example with CDK:

cdk deploy --all

Security

See CONTRIBUTING for more information.

License

This library is licensed under the MIT-0 License. See the LICENSE file.