├── oss-idp-agentic-flow ├── bc.png ├── docling-extract.py ├── requirements.txt ├── se.png ├── vision-model.py └── workflow.png ├── .gitignore ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── demo-apps ├── health-app │ ├── .gitignore │ ├── LICENSE │ ├── README.md │ ├── client │ │ ├── README.md │ │ ├── eslint.config.js │ │ ├── index.html │ │ ├── package-lock.json │ │ ├── package.json │ │ ├── postcss.config.js │ │ ├── src │ │ │ ├── App.css │ │ │ ├── App.tsx │ │ │ ├── assets │ │ │ │ ├── avatars │ │ │ │ │ ├── Dr. Davis.png │ │ │ │ │ ├── Dr. Johnson.png │ │ │ │ │ ├── Dr. Smith.png │ │ │ │ │ └── Dr. Williams.png │ │ │ │ ├── aws-logo.svg │ │ │ │ └── fonts │ │ │ │ │ └── amazon-ember.css │ │ │ ├── components │ │ │ │ ├── AgentActions.tsx │ │ │ │ ├── AgentVisualiser.tsx │ │ │ │ ├── ChatBox.tsx │ │ │ │ ├── ChatMessage.tsx │ │ │ │ ├── ChatRow.tsx │ │ │ │ ├── ConnectedHeader.tsx │ │ │ │ ├── FixedTypingIndicator.tsx │ │ │ │ ├── NavBar.tsx │ │ │ │ ├── StatusBar.tsx │ │ │ │ ├── StatusDisplay.tsx │ │ │ │ ├── WelcomeScreen.tsx │ │ │ │ └── tools │ │ │ │ │ ├── BookingSummaryWidget.tsx │ │ │ │ │ ├── DoctorAppointmentsWidget.tsx │ │ │ │ │ ├── DoctorDisplay.tsx │ │ │ │ │ ├── ToolDisplay.tsx │ │ │ │ │ ├── ToolMagic.tsx │ │ │ │ │ └── ToolStatus.tsx │ │ │ ├── libs │ │ │ │ └── audio.ts │ │ │ ├── main.tsx │ │ │ ├── providers │ │ │ │ ├── RTVIProvider.tsx │ │ │ │ └── ThemeProvider.tsx │ │ │ ├── styles.css │ │ │ ├── types.ts │ │ │ ├── utils │ │ │ │ ├── collections.ts │ │ │ │ ├── date.tsx │ │ │ │ ├── doctorAvatars.ts │ │ │ │ ├── strings.ts │ │ │ │ └── tailwind.ts │ │ │ └── vite-env.d.ts │ │ ├── tailwind.config.js │ │ ├── tsconfig.json │ │ ├── tsconfig.node.json │ │ └── vite.config.ts │ ├── data │ │ ├── bedrock-kb.png │ │ ├── chunking.png │ │ ├── datasource.png │ │ ├── embedding.png │ │ ├── kb.png │ │ ├── store.db │ │ └── sync.png │ └── server │ │ ├── .env.example │ │ ├── .python-version │ │ ├── bot.py │ │ ├── data │ │ ├── kb │ │ │ ├── common_conditions.md │ │ │ └── common_conditions.md.metadata.json │ │ └── store.db │ │ ├── index.html │ │ ├── init_db.py │ │ ├── logger_config.py │ │ ├── notebook.ipynb │ │ ├── prompt.txt │ │ ├── prompt_manager.py │ │ ├── pyproject.toml │ │ ├── requirements.txt │ │ ├── runner.py │ │ ├── server.py │ │ └── tools.py └── travel-app │ ├── README.md │ ├── backend │ ├── .gitignore │ ├── DEPLOYMENT_GUIDE.md │ ├── README.md │ ├── api_config.json │ ├── data-setup │ │ ├── dsql │ │ │ ├── data │ │ │ │ ├── seed_dsql.py │ │ │ │ └── src │ │ │ │ │ ├── database │ │ │ │ │ ├── __init__.py │ │ │ │ │ ├── activity_generator.py │ │ │ │ │ ├── data_generator.py │ │ │ │ │ ├── db_manager.py │ │ │ │ │ ├── hybrid_adapter.py │ │ │ │ │ └── models.py │ │ │ │ │ ├── knowledge_base │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── kb_adapter.py │ │ │ │ │ └── models │ │ │ │ │ ├── __init__.py │ │ │ │ │ └── travel_plan.py │ │ │ ├── schemas │ │ │ │ └── dsql_schema.sql │ │ │ └── setup_dsql.sh │ │ └── knowledge_base │ │ │ └── create_kb_documents.py │ ├── lambda │ │ ├── __init__.py │ │ ├── handler.py │ │ ├── orchestrator_wrapper.py │ │ ├── proxy_handler.py │ │ ├── tools │ │ │ ├── __init__.py │ │ │ ├── activities.py │ │ │ ├── budget.py │ │ │ ├── destinations.py │ │ │ ├── flights.py │ │ │ ├── hotels.py │ │ │ └── itinerary.py │ │ └── utils │ │ │ ├── __init__.py │ │ │ ├── agent_tracker.py │ │ │ ├── dsql.py │ │ │ └── status_tracker.py │ ├── requirements-lambda.txt │ ├── requirements.txt │ └── scripts │ │ ├── deploy.sh │ │ ├── deploy_all.sh │ │ ├── deploy_complete.sh │ │ ├── deploy_proxy.sh │ │ ├── package.sh │ │ ├── setup_api_gateway.sh │ │ └── update_orchestrator_permissions.sh │ └── frontend │ ├── .env.local │ ├── README.md │ ├── build │ ├── asset-manifest.json │ ├── index.html │ ├── manifest.json │ └── static │ │ ├── css │ │ ├── main.2a72a2cb.css │ │ └── main.2a72a2cb.css.map │ │ └── js │ │ ├── main.c8efce8a.js │ │ ├── main.c8efce8a.js.LICENSE.txt │ │ └── main.c8efce8a.js.map │ ├── package-lock.json │ ├── package.json │ ├── public │ ├── index.html │ └── manifest.json │ ├── src │ ├── App.tsx │ ├── components │ │ ├── WebSocketStatus.tsx │ │ ├── common │ │ │ ├── Footer.tsx │ │ │ ├── Header.tsx │ │ │ ├── Notifications.tsx │ │ │ ├── WebSocketStatus.tsx │ │ │ └── index.ts │ │ └── travel │ │ │ ├── AgentLegendPanel.tsx │ │ │ ├── ChatInput.tsx │ │ │ ├── OutputDisplay.tsx │ │ │ ├── PlanCompletedTransition.tsx │ │ │ ├── TravelPlanRenderer.tsx │ │ │ ├── VisualizationArea.tsx │ │ │ ├── animation.css │ │ │ ├── result-items │ │ │ ├── AccommodationResultItem.tsx │ │ │ ├── ActivityResultItem.tsx │ │ │ ├── FlightResultItem.tsx │ │ │ └── ItineraryResultItem.tsx │ │ │ └── visualization │ │ │ ├── AgentLegend.tsx │ │ │ ├── AgentLegendHorizontal.tsx │ │ │ ├── AnimationTest.tsx │ │ │ ├── ConnectionLine.tsx │ │ │ ├── DynamicLoopVisualization.tsx │ │ │ ├── PlannerBrain.tsx │ │ │ ├── SpecialistAgent.tsx │ │ │ ├── UpdateIndicator.tsx │ │ │ ├── UpdateNotificationManager.tsx │ │ │ └── WorkflowStage.tsx │ ├── context │ │ └── ChatContext.tsx │ ├── hooks │ │ ├── index.ts │ │ ├── useNotifications.ts │ │ ├── useTravelPlan.ts │ │ └── useWebSocket.ts │ ├── index.css │ ├── index.tsx │ ├── models │ │ ├── TravelPlan.ts │ │ └── WorkflowUpdate.ts │ ├── pages │ │ ├── AboutPage.tsx │ │ ├── DemoPage.tsx │ │ └── HomePage.tsx │ ├── services │ │ ├── SharePrintService.ts │ │ ├── api │ │ │ └── BackendStrandsApiClient.ts │ │ ├── common │ │ │ ├── NotificationService.ts │ │ │ ├── apiClient.ts │ │ │ └── config.ts │ │ ├── data │ │ │ └── DataTransformationService.ts │ │ ├── index.ts │ │ ├── polling │ │ │ └── PollingService.ts │ │ ├── travel │ │ │ ├── InteractionService.ts │ │ │ ├── SampleTravelData.ts │ │ │ └── TravelPlanService.ts │ │ └── websocket │ │ │ ├── BackendStrandsAdapter.ts │ │ │ ├── WebSocketService.ts │ │ │ └── WorkflowUpdateService.ts │ ├── theme.ts │ └── utils │ │ ├── formatters.ts │ │ └── testHelpers.ts │ └── tsconfig.json ├── infrastructure ├── .DS_Store ├── README.md ├── cost-efficient-model-inference-sagemaker-graviton │ ├── build_and_push.sh │ ├── buildspec.yml │ ├── code │ │ ├── inference.py │ │ └── requirements.txt │ ├── deploy-SLMs-with-sagemaker-inference-graviton-DeepSeek-R1-Distilled.ipynb │ └── stack.png ├── efficient model inference │ ├── .DS_Store │ ├── CODE_OF_CONDUCT.md │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── README.md │ ├── base_eks_setup │ │ ├── prometheus-monitoring.yaml │ │ └── provision-v2.sh │ ├── deepseek │ │ ├── deepseek_on_graviton.py │ │ └── deepseek_on_graviton.sh │ ├── dockerfiles │ │ ├── benchmark │ │ │ ├── Dockerfile │ │ │ ├── perf_benchmark.go │ │ │ └── prompts.txt │ │ └── ray-llama-cpp │ │ │ ├── Dockerfile.arm │ │ │ └── Dockerfile.intel │ ├── karpenter-pools │ │ ├── karpenter-cpu-inference-arm.yaml │ │ ├── karpenter-cpu-inference.yaml │ │ └── karpenter-cpu.yaml │ ├── ray-server │ │ ├── local-requirements.txt │ │ └── serve-llama.py │ └── ray-services │ │ ├── .DS_Store │ │ ├── ingress │ │ ├── add-sg-lb-eks.sh │ │ └── ingress-cpu.yaml │ │ ├── ray-service-llama-3.2-CPU-LLAMA-Graviton.yaml │ │ └── ray-service-llama-3.2-CPU-LLAMA-x86.yaml ├── inference_component_scale_to_zero │ ├── README.md │ ├── __init__.py │ ├── app.py │ ├── cdk.json │ ├── inference_component_cdk │ │ ├── __init__.py │ │ └── inference_component_cdk_stack.py │ ├── inference_component_cdk_stack.py │ ├── requirements-dev.txt │ ├── requirements.txt │ └── source.bat ├── notebooklm-with-bedrock-and-amazon-eks │ ├── README.md │ ├── images │ │ ├── Notebook-lm-on-AWS.jpg │ │ └── notebooklm.gif │ ├── kokoro │ │ └── deployment │ │ │ └── kokoro-tts.yaml │ ├── llama3-8b │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── deployment │ │ │ ├── openai-webui-deployment.yaml │ │ │ └── vllm-rayserve-deployment.yaml │ │ └── openai-client.py │ ├── notebook-lm │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── build.sh │ │ ├── deployment │ │ │ ├── notebook-lm-deployment.yaml │ │ │ └── notebooklm-sa.yaml │ │ ├── poetry.lock │ │ ├── pyproject.toml │ │ ├── requirements.txt │ │ ├── run-standalone.sh │ │ └── src │ │ │ ├── app.py │ │ │ ├── constants.py │ │ │ ├── prompts.py │ │ │ ├── schema.py │ │ │ └── utils.py │ └── whisper-asr │ │ ├── Dockerfile │ │ ├── README.md │ │ ├── build.sh │ │ ├── deployment │ │ └── whisper-asr.yaml │ │ ├── images │ │ └── Architecture.png │ │ ├── requirements.txt │ │ └── whisper-transformers.py └── train_openclip_with_hyperpod │ ├── README.md │ ├── open_clip_trn.tar.gz │ └── open_clip_trn │ ├── .gitignore │ ├── CITATION.cff │ ├── Dockerfile │ ├── HISTORY.md │ ├── LICENSE │ ├── MANIFEST.in │ ├── Makefile │ ├── README.md │ ├── distributed_train.sh │ ├── only_compile.sh │ ├── only_compile_dis.sh │ ├── only_train.sh │ ├── only_train_dis.sh │ ├── pytest.ini │ ├── requirements-test.txt │ ├── requirements-training.txt │ ├── requirements.txt │ ├── setup.sh │ ├── setup_mfsq.py │ ├── setup_openclip.py │ ├── src │ ├── open_clip │ │ ├── __init__.py │ │ ├── bpe_simple_vocab_16e6.txt.gz │ │ ├── coca_model.py │ │ ├── constants.py │ │ ├── convert.py │ │ ├── factory.py │ │ ├── hf_configs.py │ │ ├── hf_model.py │ │ ├── loss.py │ │ ├── model.py │ │ ├── model_configs │ │ │ ├── EVA01-g-14-plus.json │ │ │ ├── EVA01-g-14.json │ │ │ ├── EVA02-B-16.json │ │ │ ├── EVA02-E-14-plus.json │ │ │ ├── EVA02-E-14.json │ │ │ ├── EVA02-L-14-336.json │ │ │ ├── EVA02-L-14.json │ │ │ ├── MobileCLIP-B.json │ │ │ ├── MobileCLIP-S1.json │ │ │ ├── MobileCLIP-S2.json │ │ │ ├── RN101-quickgelu.json │ │ │ ├── RN101.json │ │ │ ├── RN50-quickgelu.json │ │ │ ├── RN50.json │ │ │ ├── RN50x16.json │ │ │ ├── RN50x4.json │ │ │ ├── RN50x64.json │ │ │ ├── ViT-B-16-SigLIP-256.json │ │ │ ├── ViT-B-16-SigLIP-384.json │ │ │ ├── ViT-B-16-SigLIP-512.json │ │ │ ├── ViT-B-16-SigLIP-i18n-256.json │ │ │ ├── ViT-B-16-SigLIP.json │ │ │ ├── ViT-B-16-plus-240.json │ │ │ ├── ViT-B-16-plus.json │ │ │ ├── ViT-B-16-quickgelu.json │ │ │ ├── ViT-B-16.json │ │ │ ├── ViT-B-32-256.json │ │ │ ├── ViT-B-32-plus-256.json │ │ │ ├── ViT-B-32-quickgelu.json │ │ │ ├── ViT-B-32.json │ │ │ ├── ViT-H-14-378-quickgelu.json │ │ │ ├── ViT-H-14-CLIPA-336.json │ │ │ ├── ViT-H-14-CLIPA.json │ │ │ ├── ViT-H-14-quickgelu.json │ │ │ ├── ViT-H-14.json │ │ │ ├── ViT-H-16.json │ │ │ ├── ViT-L-14-280.json │ │ │ ├── ViT-L-14-336.json │ │ │ ├── ViT-L-14-CLIPA-336.json │ │ │ ├── ViT-L-14-CLIPA.json │ │ │ ├── ViT-L-14-quickgelu.json │ │ │ ├── ViT-L-14.json │ │ │ ├── ViT-L-16-320.json │ │ │ ├── ViT-L-16-SigLIP-256.json │ │ │ ├── ViT-L-16-SigLIP-384.json │ │ │ ├── ViT-L-16.json │ │ │ ├── ViT-M-16-alt.json │ │ │ ├── ViT-M-16.json │ │ │ ├── ViT-M-32-alt.json │ │ │ ├── ViT-M-32.json │ │ │ ├── ViT-S-16-alt.json │ │ │ ├── ViT-S-16.json │ │ │ ├── ViT-S-32-alt.json │ │ │ ├── ViT-S-32.json │ │ │ ├── ViT-SO400M-14-SigLIP-384.json │ │ │ ├── ViT-SO400M-14-SigLIP.json │ │ │ ├── ViT-bigG-14-CLIPA-336.json │ │ │ ├── ViT-bigG-14-CLIPA.json │ │ │ ├── ViT-bigG-14.json │ │ │ ├── ViT-e-14.json │ │ │ ├── ViT-g-14.json │ │ │ ├── ViTamin-B-LTT.json │ │ │ ├── ViTamin-B.json │ │ │ ├── ViTamin-L-256.json │ │ │ ├── ViTamin-L-336.json │ │ │ ├── ViTamin-L.json │ │ │ ├── ViTamin-L2-256.json │ │ │ ├── ViTamin-L2-336.json │ │ │ ├── ViTamin-L2.json │ │ │ ├── ViTamin-S-LTT.json │ │ │ ├── ViTamin-S.json │ │ │ ├── ViTamin-XL-256.json │ │ │ ├── ViTamin-XL-336.json │ │ │ ├── ViTamin-XL-384.json │ │ │ ├── coca_ViT-B-32.json │ │ │ ├── coca_ViT-L-14.json │ │ │ ├── coca_base.json │ │ │ ├── coca_roberta-ViT-B-32.json │ │ │ ├── convnext_base.json │ │ │ ├── convnext_base_w.json │ │ │ ├── convnext_base_w_320.json │ │ │ ├── convnext_large.json │ │ │ ├── convnext_large_d.json │ │ │ ├── convnext_large_d_320.json │ │ │ ├── convnext_small.json │ │ │ ├── convnext_tiny.json │ │ │ ├── convnext_xlarge.json │ │ │ ├── convnext_xxlarge.json │ │ │ ├── convnext_xxlarge_320.json │ │ │ ├── mt5-base-ViT-B-32.json │ │ │ ├── mt5-xl-ViT-H-14.json │ │ │ ├── nllb-clip-base-siglip.json │ │ │ ├── nllb-clip-base.json │ │ │ ├── nllb-clip-large-siglip.json │ │ │ ├── nllb-clip-large.json │ │ │ ├── roberta-ViT-B-32.json │ │ │ ├── swin_base_patch4_window7_224.json │ │ │ ├── vit_medium_patch16_gap_256.json │ │ │ ├── vit_relpos_medium_patch16_cls_224.json │ │ │ ├── xlm-roberta-base-ViT-B-32.json │ │ │ └── xlm-roberta-large-ViT-H-14.json │ │ ├── modified_resnet.py │ │ ├── openai.py │ │ ├── pos_embed.py │ │ ├── pretrained.py │ │ ├── push_to_hf_hub.py │ │ ├── timm_model.py │ │ ├── tokenizer.py │ │ ├── transform.py │ │ ├── transformer.py │ │ ├── utils.py │ │ ├── version.py │ │ ├── zero_shot_classifier.py │ │ └── zero_shot_metadata.py │ └── open_clip_train │ │ ├── __init__.py │ │ ├── data.py │ │ ├── distributed.py │ │ ├── file_utils.py │ │ ├── logger.py │ │ ├── main.py │ │ ├── params.py │ │ ├── precision.py │ │ ├── profiler.py │ │ ├── scheduler.py │ │ ├── train.py │ │ └── zero_shot.py │ ├── submit-openclip.sh │ └── weighted_training │ ├── __init__.py │ ├── cfg │ ├── e5-base.json │ ├── e5-large-multi.json │ ├── e5-large-v2.json │ ├── e5-large.json │ ├── e5-small-proj.json │ ├── e5-small-unsupervised.json │ ├── e5-small-v2.json │ ├── e5-small.json │ ├── gte-base.json │ ├── gte-large.json │ └── roberta-base-hf.json │ ├── main.py │ ├── models.py │ ├── params.py │ └── utils.py ├── integration ├── MCP │ ├── Bedrock_QWEN.png │ ├── Bedrock_marketplace_with_mcp_and_langchain.ipynb │ └── deployment.png ├── README.md ├── genaiops-langfuse-on-aws │ ├── README.md │ ├── config.py │ ├── lab1 │ │ ├── images │ │ │ ├── langfuse-dashboard-use-case-1.png │ │ │ ├── langfuse-link-prompt.png │ │ │ ├── langfuse-prompt-management.png │ │ │ ├── langfuse-trace-guardrail-denied-topic.png │ │ │ ├── langfuse-trace-guardrail-pii-configuration.png │ │ │ ├── langfuse-trace-guardrail-pii.png │ │ │ ├── langfuse-trace-guardrail-prompt-injection.png │ │ │ ├── langfuse-trace-tool-use-vision.png │ │ │ ├── langfuse-trace-tool-use.png │ │ │ ├── langfuse-trace-use-case-1.png │ │ │ ├── langfuse-trace-use-case-2.png │ │ │ ├── langfuse-trace-use-case-3.png │ │ │ ├── langfuse-trace-use-case-4.png │ │ │ ├── trace-observation-ui.png │ │ │ ├── trace-observation.png │ │ │ ├── trace-scores.png │ │ │ ├── trace-sessions-ui.png │ │ │ ├── trace-sessions.png │ │ │ └── ws-event-outputs.png │ │ ├── lab1-langfuse-basics.ipynb │ │ └── lab1-langfuse-basics.ja.ipynb │ ├── lab2 │ │ ├── README.md │ │ ├── datasets │ │ │ ├── LICENSE │ │ │ ├── corpus │ │ │ │ ├── 1973_oil_crisis.txt │ │ │ │ ├── Amazon_rainforest.txt │ │ │ │ ├── Black_Death.txt │ │ │ │ ├── Civil_disobedience.txt │ │ │ │ ├── Computational_complexity_theory.txt │ │ │ │ ├── Construction.txt │ │ │ │ ├── Ctenophora.txt │ │ │ │ ├── European_Union_law.txt │ │ │ │ ├── Fresno,_California.txt │ │ │ │ ├── Geology.txt │ │ │ │ ├── Huguenot.txt │ │ │ │ ├── Normans.txt │ │ │ │ ├── Oxygen.txt │ │ │ │ ├── Packet_switching.txt │ │ │ │ ├── Pharmacy.txt │ │ │ │ ├── Private_school.txt │ │ │ │ ├── Sky_(United_Kingdom).txt │ │ │ │ ├── Southern_California.txt │ │ │ │ ├── Steam_engine.txt │ │ │ │ └── Victoria_(Australia).txt │ │ │ └── qa.manifest.jsonl │ │ ├── images │ │ │ └── bedrock-kbs │ │ │ │ ├── 01-bedrock-kb-console.png │ │ │ │ ├── 02a-create-kb-basics.png │ │ │ │ ├── 02b-create-kb-data-source.png │ │ │ │ ├── 02c-create-kb-index.png │ │ │ │ ├── 03-kb-detail-page.png │ │ │ │ ├── 04a-kb-data-source-after-sync.png │ │ │ │ ├── 04b-kb-data-sync-details.png │ │ │ │ ├── 04c-kb-main-page.png │ │ │ │ ├── 04d-langfuse-single-eval-trace-no-score.png │ │ │ │ ├── 04e-langfuse-single-eval-trace-score.png │ │ │ │ ├── 05-kb-select-model-claude-3-sonnet.png │ │ │ │ ├── 06a-kb-test.png │ │ │ │ └── score-with-sampling.png │ │ ├── lab2-rag-langfuse.ipynb │ │ └── lab2-rag-langfuse.ja.ipynb │ ├── lab3 │ │ ├── README.md │ │ ├── images │ │ │ ├── langfuse-trace-guardrail-denied-topic.png │ │ │ ├── langfuse-trace-guardrail-pii-configuration.png │ │ │ ├── langfuse-trace-guardrail-pii.png │ │ │ ├── langfuse-trace-guardrail-prompt-injection.png │ │ │ ├── product_description_traces.png │ │ │ ├── scored_trace.png │ │ │ └── ws-event-outputs.png │ │ ├── lab3.1-model-based-eval.ipynb │ │ ├── lab3.1-model-based-eval.ja.ipynb │ │ ├── lab3.2-bedrock-guardrials.ipynb │ │ └── lab3.2-bedrock-guardrials.ja.ipynb │ └── utils.py └── langfuse │ ├── images │ ├── trace-observation.png │ └── trace-sessions.png │ └── langfuse-genaiops.ipynb └── operations ├── sagemaker-mlflow-model-registry ├── requirements.txt └── sm-mlflow_model_registry_register_model_shared_model_group.ipynb ├── sagemaker-mlflow-trace-evaluate-langgraph-agent ├── .env_sample ├── .gitignore ├── LICENSE ├── README.md ├── additional_evaluations_with_ragas.ipynb ├── data.py ├── evaluations.ipynb ├── golden_questions_answer.jsonl ├── graph.py ├── graph_diagram.png ├── mlflow_prompts.py ├── pyproject.toml ├── requirements.txt ├── run.py ├── tools.py ├── utils.py └── uv.lock └── sagemaker-unified-model-registry ├── .DS_Store ├── AbaloneExample.ipynb ├── Directmarketing.ipynb └── bank-additional-full.csv / oss-idp-agentic-flow/bc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/ oss-idp-agentic-flow/bc.png -------------------------------------------------------------------------------- / oss-idp-agentic-flow/docling-extract.py: -------------------------------------------------------------------------------- 1 | 2 | from docling.document_converter import DocumentConverter 3 | 4 | 5 | 6 | 7 | source = "se.png" 8 | converter = DocumentConverter() 9 | result = converter.convert(source) 10 | 11 | print(result.document.export_to_html()) -------------------------------------------------------------------------------- / oss-idp-agentic-flow/requirements.txt: -------------------------------------------------------------------------------- 1 | docling 2 | langgraph 3 | langchain-openai 4 | langchain 5 | langfuse 6 | -------------------------------------------------------------------------------- / oss-idp-agentic-flow/se.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/ oss-idp-agentic-flow/se.png -------------------------------------------------------------------------------- / oss-idp-agentic-flow/workflow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/ oss-idp-agentic-flow/workflow.png -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Jupyter Notebook 2 | .ipynb_checkpoints 3 | */.ipynb_checkpoints/* 4 | __pycache__/ 5 | 6 | # IDE 7 | .idea/ 8 | .vscode/ 9 | *.swp 10 | *.swo 11 | 12 | # Environment 13 | .env 14 | .venv 15 | env/ 16 | venv/ 17 | ENV/ 18 | env.bak/ 19 | venv.bak/ 20 | 21 | # OS 22 | .DS_Store 23 | Thumbs.db 24 | 25 | # Logs and databases 26 | *.log 27 | *.sqlite 28 | -------------------------------------------------------------------------------- /CODE_OF_CONDUCT.md: -------------------------------------------------------------------------------- 1 | ## Code of Conduct 2 | This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). 3 | For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact 4 | opensource-codeofconduct@amazon.com with any additional questions or comments. 5 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT No Attribution 2 | 3 | Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 12 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 13 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 14 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 15 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 16 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 17 | 18 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## AWS GenAI ML Platform Examples 2 | 3 | This repository contains a collection of examples and resources to help you get started with the AWS Generative AI (GenAI)/ML Platform. 4 | 5 | ### Overview 6 | The AWS GenAI/ML Platform is a collection of tools and examples that enables you to build, train, and deploy models at scale. This repository provides a set of sample notebooks, scripts, and configurations to help you explore different aspects of the platform, including: 7 | 8 | - Data management: Examples for ingesting, preprocessing, and managing data for your GenAI models. 9 | - Governance: Samples for implementing governance and compliance best practices. 10 | - Infrastructure: Configuration templates for provisioning the necessary AWS resources. 11 | - Integration: Demonstrations of integrating opensource frameworks with AWS services. 12 | - Operations: Guidance on model lifecycle management. 13 | 14 | ### Getting Started 15 | To get started, follow these steps: 16 | 17 | Clone the repository to your local machine: 18 | 19 | ``` 20 | git clone https://github.com/aws-samples/genai-ml-platform-examples.git 21 | ``` 22 | 23 | Navigate to the repository directory: 24 | 25 | ``` 26 | cd genai-ml-platform-examples 27 | ``` 28 | 29 | 30 | Explore the contents of the repository and follow the instructions in the `README.md` files within each subdirectory. 31 | 32 | ### Contributing 33 | 34 | We welcome contributions to this repository! If you have any examples, improvements, or bug fixes to share, please see [CONTRIBUTING](CONTRIBUTING.md#security-issue-notifications) for more information. 35 | 36 | ## License 37 | 38 | This library is licensed under the MIT-0 License. See the LICENSE file. 39 | 40 | -------------------------------------------------------------------------------- /demo-apps/health-app/LICENSE: -------------------------------------------------------------------------------- 1 | MIT No Attribution 2 | 3 | Copyright (c) 2025 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 6 | software and associated documentation files (the "Software"), to deal in the Software 7 | without restriction, including without limitation the rights to use, copy, modify, 8 | merge, publish, distribute, sublicense, and/or sell copies of the Software, and to 9 | permit persons to whom the Software is furnished to do so. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 12 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A 13 | PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 14 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 15 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 16 | SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -------------------------------------------------------------------------------- /demo-apps/health-app/client/README.md: -------------------------------------------------------------------------------- 1 | # React Implementation 2 | 3 | Basic implementation using the [Pipecat React SDK](https://docs.pipecat.ai/client/react/introduction). 4 | 5 | ## Setup 6 | 7 | 1. Run the bot server; see [README](../../README). 8 | 9 | 2. Navigate to the `client/react` directory: 10 | 11 | ```bash 12 | cd client/react 13 | ``` 14 | 15 | 3. Install dependencies: 16 | 17 | ```bash 18 | npm install 19 | ``` 20 | 21 | 4. Run the client app: 22 | 23 | ``` 24 | npm run dev 25 | ``` 26 | 27 | 5. Visit http://localhost:5173 in your browser. 28 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/eslint.config.js: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import tseslint from 'typescript-eslint' 6 | 7 | export default tseslint.config( 8 | { ignores: ['dist'] }, 9 | { 10 | extends: [js.configs.recommended, ...tseslint.configs.recommended], 11 | files: ['**/*.{ts,tsx}'], 12 | languageOptions: { 13 | ecmaVersion: 2020, 14 | globals: globals.browser, 15 | }, 16 | plugins: { 17 | 'react-hooks': reactHooks, 18 | 'react-refresh': reactRefresh, 19 | }, 20 | rules: { 21 | ...reactHooks.configs.recommended.rules, 22 | 'react-refresh/only-export-components': [ 23 | 'warn', 24 | { allowConstantExport: true }, 25 | ], 26 | }, 27 | }, 28 | ) 29 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | AWS AI Health Assistant 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "react", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "lint": "eslint .", 10 | "preview": "vite preview" 11 | }, 12 | "dependencies": { 13 | "@aws-amplify/ui-react": "^6.11.1", 14 | "@cloudscape-design/chat-components": "^1.0.44", 15 | "@cloudscape-design/components": "^3.0.968", 16 | "@cloudscape-design/design-tokens": "^3.0.57", 17 | "@cloudscape-design/global-styles": "^1.0.43", 18 | "@emotion/react": "^11.14.0", 19 | "@emotion/styled": "^11.14.0", 20 | "@mui/icons-material": "^7.1.0", 21 | "@mui/material": "^7.1.0", 22 | "@pipecat-ai/client-js": "^0.3.5", 23 | "@pipecat-ai/client-react": "^0.3.5", 24 | "@pipecat-ai/daily-transport": "^0.3.8", 25 | "@tailwindcss/vite": "^4.1.7", 26 | "clsx": "^2.1.1", 27 | "motion": "^12.12.1", 28 | "react": "^18.3.1", 29 | "react-dom": "^18.3.1", 30 | "react-icons": "^5.5.0", 31 | "react-type-animation": "^3.2.0", 32 | "tailwind-merge": "^3.3.0" 33 | }, 34 | "devDependencies": { 35 | "@eslint/js": "^9.15.0", 36 | "@types/react": "^18.3.12", 37 | "@types/react-dom": "^18.3.1", 38 | "@vitejs/plugin-react": "^4.3.4", 39 | "autoprefixer": "^10.4.21", 40 | "eslint": "^9.15.0", 41 | "eslint-plugin-react-hooks": "^5.0.0", 42 | "eslint-plugin-react-refresh": "^0.4.14", 43 | "globals": "^15.12.0", 44 | "postcss": "^8.5.3", 45 | "tailwindcss": "^3.4.17", 46 | "typescript": "~5.6.2", 47 | "typescript-eslint": "^8.15.0", 48 | "vite": "^6.0.9" 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/postcss.config.js: -------------------------------------------------------------------------------- 1 | export default { 2 | plugins: { 3 | tailwindcss: {}, 4 | autoprefixer: {}, 5 | }, 6 | } 7 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/App.css: -------------------------------------------------------------------------------- 1 | * { 2 | box-sizing: border-box; 3 | } 4 | 5 | html, 6 | body { 7 | margin: 0; 8 | padding: 0; 9 | font-family: Arial, sans-serif; 10 | background-color: #f0f0f0; 11 | overflow-x: hidden; 12 | height: 100%; 13 | width: 100%; 14 | } 15 | 16 | body { 17 | position: relative; 18 | } 19 | 20 | .app { 21 | width: 100%; 22 | height: 100vh; 23 | position: relative; 24 | display: flex; 25 | flex-direction: column; 26 | } 27 | 28 | .status-bar { 29 | display: flex; 30 | justify-content: space-between; 31 | align-items: center; 32 | padding: 10px; 33 | background-color: #fff; 34 | border-radius: 8px; 35 | margin-bottom: 20px; 36 | } 37 | 38 | .controls button { 39 | padding: 8px 16px; 40 | margin-left: 10px; 41 | border: none; 42 | border-radius: 4px; 43 | cursor: pointer; 44 | } 45 | 46 | button:disabled { 47 | opacity: 0.5; 48 | cursor: not-allowed; 49 | } 50 | 51 | .connect-btn { 52 | background-color: #4caf50; 53 | color: white; 54 | } 55 | 56 | .disconnect-btn { 57 | background-color: #f44336; 58 | color: white; 59 | } 60 | 61 | .main-content { 62 | background-color: #fff; 63 | border-radius: 8px; 64 | padding: 20px; 65 | margin-bottom: 20px; 66 | } 67 | 68 | .bot-container { 69 | display: flex; 70 | flex-direction: column; 71 | align-items: center; 72 | } 73 | 74 | .video-container { 75 | width: 640px; 76 | height: 360px; 77 | background-color: #ddd; 78 | margin-bottom: 20px; 79 | border-radius: 8px; 80 | overflow: hidden; 81 | } 82 | 83 | .video-container video { 84 | width: 100%; 85 | height: 100%; 86 | object-fit: cover; 87 | } 88 | 89 | .mic-enabled { 90 | background-color: #4caf50; 91 | color: white; 92 | } 93 | 94 | .mic-disabled { 95 | background-color: #f44336; 96 | color: white; 97 | } 98 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/assets/avatars/Dr. Davis.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/client/src/assets/avatars/Dr. Davis.png -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/assets/avatars/Dr. Johnson.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/client/src/assets/avatars/Dr. Johnson.png -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/assets/avatars/Dr. Smith.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/client/src/assets/avatars/Dr. Smith.png -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/assets/avatars/Dr. Williams.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/client/src/assets/avatars/Dr. Williams.png -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/assets/fonts/amazon-ember.css: -------------------------------------------------------------------------------- 1 | @font-face { 2 | font-family: 'Amazon Ember'; 3 | src: url('https://m.media-amazon.com/images/G/01/AmazonUI/fonts/amazonember_rg-cc7ebaa05a2cd3b02c0929ac0475a44ab30b7efa._V2_.woff2') format('woff2'), 4 | url('https://m.media-amazon.com/images/G/01/AmazonUI/fonts/amazonember_rg-cb7f64bb6cde397b119ea106551893deedb8975d._V2_.woff') format('woff'); 5 | font-weight: 400; 6 | font-style: normal; 7 | font-display: swap; 8 | } 9 | 10 | @font-face { 11 | font-family: 'Amazon Ember'; 12 | src: url('https://m.media-amazon.com/images/G/01/AmazonUI/fonts/amazonember_bd-46b91bda68161c14e554a779643ef4957431987b._V2_.woff2') format('woff2'), 13 | url('https://m.media-amazon.com/images/G/01/AmazonUI/fonts/amazonember_bd-a344921ffd52563d3c1590dace4ef09c14c0d9a3._V2_.woff') format('woff'); 14 | font-weight: 700; 15 | font-style: normal; 16 | font-display: swap; 17 | } 18 | 19 | @font-face { 20 | font-family: 'Amazon Ember'; 21 | src: url('https://m.media-amazon.com/images/G/01/AmazonUI/fonts/amazonember_lt-9cc1bb64eb270135f1691c71588a5c5ff7e2420c._V2_.woff2') format('woff2'), 22 | url('https://m.media-amazon.com/images/G/01/AmazonUI/fonts/amazonember_lt-b605de63d0843593ad5c0cfeddee29ac251b528d._V2_.woff') format('woff'); 23 | font-weight: 300; 24 | font-style: normal; 25 | font-display: swap; 26 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/ChatMessage.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "../utils/tailwind"; 2 | 3 | type ChatMessageProps = { 4 | message: string, 5 | sender: 'user' | 'assistant' 6 | }; 7 | 8 | export default function ChatMessage(props: ChatMessageProps) { 9 | return ( 10 |
11 | {props.message} 12 |
13 | ) 14 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/ChatRow.tsx: -------------------------------------------------------------------------------- 1 | import { MdHealthAndSafety } from "react-icons/md"; 2 | import { cn } from "../utils/tailwind"; 3 | import Avatar from "@cloudscape-design/chat-components/avatar"; 4 | 5 | type ChatRowProps = { 6 | sender: 'user' | 'assistant' 7 | hideIcon: boolean; 8 | timestamp: Date 9 | children: React.ReactNode 10 | }; 11 | 12 | export default function ChatRow(props: ChatRowProps) { 13 | 14 | return ( 15 |
16 | {/* Icon */} 17 |
18 | { 19 | props.sender === 'user' ? ( 20 |
21 | 27 |
28 | ) : ( 29 |
30 | 31 |
32 | ) 33 | } 34 |
35 | 36 | {/* Message Box */} 37 |
38 | {props.children} 39 |
{props.timestamp.toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}
40 |
41 |
42 | ) 43 | } 44 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/ConnectedHeader.tsx: -------------------------------------------------------------------------------- 1 | import { cn } from "../utils/tailwind"; 2 | 3 | type ConnectedHeaderProps = { 4 | connected: boolean 5 | onBtnClick: () => void 6 | }; 7 | 8 | export default function ConnectedHeader(props: ConnectedHeaderProps) { 9 | return ( 10 |
11 |
12 |
13 | Connected to AI Health Assistant 14 |
15 |
 
16 |
17 |
18 | 25 |
26 |
27 | ) 28 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/NavBar.tsx: -------------------------------------------------------------------------------- 1 | import { MdHealthAndSafety } from "react-icons/md"; 2 | import awsLogo from "../assets/aws-logo.svg"; 3 | 4 | export default function NavBar() { 5 | return ( 6 |
7 |
8 |
9 | AWS Logo 10 |
11 |
12 |
13 |

AI Health Assistant

14 |

Powered by Amazon Nova Sonic

15 |
16 |
17 |
18 | ) 19 | } 20 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/StatusBar.tsx: -------------------------------------------------------------------------------- 1 | import { FaMicrophone } from "react-icons/fa"; 2 | 3 | type StatusBarProps = { 4 | onMicClick: () => void, 5 | onDisplayProcessingClick: () => void, 6 | status: 'LISTENING' | 'CONNECTING' | 'PROCESSING' | 'SPEAKING' 7 | }; 8 | 9 | const statusMessages = { 10 | 'LISTENING': 'Listening ...', 11 | 'CONNECTING': 'Connecting', 12 | 'PROCESSING': 'Processing', 13 | 'SPEAKING': 'Speaking', 14 | } 15 | 16 | export function StatusBar(props: StatusBarProps) { 17 | return ( 18 |
19 |
20 | 23 |
24 |
25 | {statusMessages[props.status]} 26 |
27 |
28 | ) 29 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/StatusDisplay.tsx: -------------------------------------------------------------------------------- 1 | import { useRTVIClientTransportState } from '@pipecat-ai/client-react'; 2 | import { Chip, useTheme } from '@mui/material'; 3 | import CheckCircleIcon from '@mui/icons-material/CheckCircle'; 4 | import ErrorIcon from '@mui/icons-material/Error'; 5 | import SyncIcon from '@mui/icons-material/Sync'; 6 | 7 | export function StatusDisplay() { 8 | const transportState = useRTVIClientTransportState(); 9 | const theme = useTheme(); 10 | 11 | // Determine color and icon based on state 12 | let color = theme.palette.grey[500]; 13 | let icon = ; 14 | let label = transportState; 15 | 16 | if (transportState === 'connected') { 17 | color = theme.palette.success.main; 18 | icon = ; 19 | } else if (transportState === 'disconnected') { 20 | color = theme.palette.error.main; 21 | icon = ; 22 | } else if (transportState === 'connecting') { 23 | color = theme.palette.warning.main; 24 | } 25 | 26 | return ( 27 | 41 | ); 42 | } 43 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/WelcomeScreen.tsx: -------------------------------------------------------------------------------- 1 | import Spinner from "@cloudscape-design/components/spinner"; 2 | import { motion } from "motion/react"; 3 | import { MdHealthAndSafety } from "react-icons/md"; 4 | import { cn } from "../utils/tailwind"; 5 | 6 | type WelcomeScreenProps = { 7 | connecting: boolean; 8 | transportState: string; 9 | micClick: () => void 10 | }; 11 | 12 | export default function WelcomeScreen(props: WelcomeScreenProps) { 13 | return ( 14 |
15 | 16 |

Welcome to AWS AI Health Assistant

17 |

Ask questions about symptoms, medications, or get health recommendations.

18 |
19 |
20 | {props.connecting ? ( 21 | 23 |

Connecting, please wait

24 |
25 | ) : ( 26 | Talk to assistant 33 | )} 34 | {props.transportState === 'error' &&

Unable to connect at the moment, please try again shortly

} 35 |
36 |
37 |
38 | ) 39 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/tools/DoctorDisplay.tsx: -------------------------------------------------------------------------------- 1 | 2 | import Avatar from "@cloudscape-design/chat-components/avatar"; 3 | import Rating from "@mui/material/Rating"; 4 | import { cn } from "../../utils/tailwind"; 5 | 6 | type DoctorDisplayProps = { 7 | doctorAvatar?: string | null 8 | doctorName: string 9 | theme?: 'dark' | 'light' 10 | }; 11 | 12 | export default function DoctorDisplay(props: DoctorDisplayProps) { 13 | return ( 14 |
15 | {props.doctorAvatar ? ( 16 |
17 | {`${props.doctorName} 23 |
24 | ) : ( 25 | 31 | )} 32 |
33 |
{props.doctorName}
34 |
General Practitioner
35 | 36 |
37 |
38 | ) 39 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/components/tools/ToolDisplay.tsx: -------------------------------------------------------------------------------- 1 | import BookingSummaryWidget from "./BookingSummaryWidget"; 2 | import DoctorAppointments, { shouldAddDoctorsAppointment } from "./DoctorAppointmentsWidget"; 3 | 4 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 5 | export const availableTools: Record boolean> = { 6 | 'get_non_clashing_slots': shouldAddDoctorsAppointment, 7 | 'book_appointment': () => true 8 | }; 9 | 10 | type ToolDisplayProps = { 11 | type: string, 12 | timestamp: Date, 13 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 14 | data: any 15 | }; 16 | 17 | export default function ToolDisplay(props: ToolDisplayProps) { 18 | if (props.type === 'get_non_clashing_slots') { 19 | return 20 | } else if (props.type === 'book_appointment') { 21 | return 22 | } else return null; 23 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/libs/audio.ts: -------------------------------------------------------------------------------- 1 | export async function getAudioDevices() { 2 | console.log('getting audio devices'); 3 | const devices: MediaDeviceInfo[] = 4 | await navigator.mediaDevices.enumerateDevices(); 5 | const microphones = devices.filter((device: MediaDeviceInfo) => { 6 | return ( 7 | device.kind === 'audioinput' && 8 | device.deviceId !== '' && 9 | device.label !== '' 10 | ); 11 | }); 12 | const speakers = devices.filter((device: MediaDeviceInfo) => { 13 | return ( 14 | device.kind === 'audiooutput' && 15 | device.deviceId !== '' && 16 | device.label !== '' 17 | ); 18 | }); 19 | return { 20 | input: microphones, 21 | output: speakers, 22 | }; 23 | } 24 | 25 | export async function askPermission() { 26 | return await navigator.mediaDevices 27 | .getUserMedia({ audio: true, video: false }) 28 | .then((stream) => { 29 | return true; 30 | }) 31 | // If there is an error, we can't get access to the mic 32 | .catch((err) => { 33 | if (err instanceof DOMException && err.name === 'NotAllowedError') { 34 | return false; 35 | } else { 36 | throw new Error('Unexpected error getting microphone access'); 37 | } 38 | }); 39 | } 40 | 41 | export async function getCurrentPermissions() { 42 | let permissionState: PermissionState = 'prompt'; 43 | 44 | if (navigator?.permissions) { 45 | await navigator.permissions 46 | ?.query({ name: 'microphone' }) 47 | .then((result) => { 48 | permissionState = result.state; 49 | }) 50 | .catch((err) => { 51 | if (err) { 52 | console.log(err); 53 | } 54 | console.log('error with permission query'); 55 | }); 56 | } 57 | 58 | return permissionState; 59 | } 60 | 61 | export function getDeviceById(deviceId: string) { 62 | return navigator.mediaDevices.getUserMedia({ 63 | audio: { deviceId: { exact: deviceId } }, 64 | }); 65 | } 66 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/main.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom/client'; 3 | import App from './App'; 4 | import { RTVIProvider } from './providers/RTVIProvider'; 5 | 6 | ReactDOM.createRoot(document.getElementById('root')!).render( 7 | 8 | 9 | 10 | 11 | 12 | ); 13 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/providers/ThemeProvider.tsx: -------------------------------------------------------------------------------- 1 | import { ThemeProvider as MUIThemeProvider, createTheme } from '@mui/material/styles'; 2 | import { PropsWithChildren } from 'react'; 3 | 4 | const theme = createTheme({ 5 | typography: { 6 | fontFamily: '"Amazon Ember", sans-serif', 7 | }, 8 | }); 9 | 10 | export function ThemeProvider({ children }: PropsWithChildren) { 11 | return {children}; 12 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/styles.css: -------------------------------------------------------------------------------- 1 | @tailwind base; 2 | @tailwind components; 3 | @tailwind utilities; 4 | /* You can add global styles to this file, and also import other style files */ 5 | 6 | body, 7 | html { 8 | width: 100%; 9 | height: 100%; 10 | margin: 0; 11 | font-family: "Roboto", "Helvetica", "Arial", sans-serif; 12 | } 13 | 14 | #root { 15 | height: 100%; 16 | } 17 | 18 | @keyframes pulse { 19 | 0% { 20 | transform: scale(1); 21 | } 22 | 50% { 23 | transform: scale(1.1); 24 | } 25 | 100% { 26 | transform: scale(1); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/types.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-explicit-any */ 2 | type Message = { 3 | text: string; 4 | }; 5 | 6 | export type ToolEvent = { 7 | toolId: string; 8 | invocationId: string; 9 | payload: any; 10 | }; 11 | 12 | export type Event = ( 13 | | { 14 | type: "message"; 15 | data: Message; 16 | } 17 | | { 18 | type: "tool"; 19 | data: ToolEvent; 20 | } 21 | ) & { 22 | id: string; 23 | sender: "user" | "assistant"; 24 | timestamp: Date; 25 | }; 26 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/utils/collections.ts: -------------------------------------------------------------------------------- 1 | type MapValuesToKeysIfAllowed = { 2 | [K in keyof T]: T[K] extends PropertyKey ? K : never; 3 | }; 4 | type Filter = MapValuesToKeysIfAllowed[keyof T]; 5 | 6 | export function groupBy< 7 | // eslint-disable-next-line @typescript-eslint/no-explicit-any 8 | T extends Record, 9 | Key extends Filter 10 | >(arr: T[], key: Key): Record { 11 | return arr.reduce((accumulator, val) => { 12 | const groupedKey = val[key]; 13 | if (!accumulator[groupedKey]) { 14 | accumulator[groupedKey] = []; 15 | } 16 | accumulator[groupedKey].push(val); 17 | return accumulator; 18 | }, {} as Record); 19 | } 20 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/utils/date.tsx: -------------------------------------------------------------------------------- 1 | export const formatDateBooking = (dateString: string) => { 2 | const dateObj = new Date(dateString); 3 | const day = dateObj.getDate(); 4 | const month = dateObj.toLocaleDateString('en-US', { month: 'long', year: 'numeric' }); 5 | const dayOfWeek = dateObj.toLocaleDateString('en-US', { weekday: 'long' }); 6 | 7 | function getOrdinalSuffix(day: number) { 8 | if (day >= 11 && day <= 13) { 9 | return 'th'; 10 | } 11 | switch (day % 10) { 12 | case 1: return 'st'; 13 | case 2: return 'nd'; 14 | case 3: return 'rd'; 15 | default: return 'th'; 16 | } 17 | } 18 | 19 | return <>{dayOfWeek}, {day}{getOrdinalSuffix(day)} {month}; 20 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/utils/doctorAvatars.ts: -------------------------------------------------------------------------------- 1 | import drSmith from '../assets/avatars/Dr. Smith.png'; 2 | import drWilliams from '../assets/avatars/Dr. Williams.png'; 3 | import drJohnson from '../assets/avatars/Dr. Johnson.png'; 4 | import drDavis from '../assets/avatars/Dr. Davis.png'; 5 | 6 | // Map of doctor names to their avatar images 7 | const doctorAvatars: Record = { 8 | 'Dr. Smith': drSmith, 9 | 'Dr. Williams': drWilliams, 10 | 'Dr. Johnson': drJohnson, 11 | 'Dr. Davis': drDavis, 12 | }; 13 | 14 | // Default avatar to use when no specific avatar is found 15 | const defaultAvatar = drSmith; 16 | 17 | /** 18 | * Get the avatar image for a specific doctor 19 | * @param doctorName Full name of the doctor 20 | * @returns URL to the doctor's avatar image 21 | */ 22 | export const getDoctorAvatar = (doctorName: string): string => { 23 | // Check for exact matches 24 | if (doctorAvatars[doctorName]) { 25 | return doctorAvatars[doctorName]; 26 | } 27 | 28 | // Check for partial matches 29 | for (const [name, avatar] of Object.entries(doctorAvatars)) { 30 | if (doctorName.includes(name)) { 31 | return avatar; 32 | } 33 | } 34 | 35 | // Return default avatar if no match found 36 | return defaultAvatar; 37 | }; 38 | 39 | export default doctorAvatars; -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/utils/strings.ts: -------------------------------------------------------------------------------- 1 | export function capitalize(text: string) { 2 | return text.charAt(0).toUpperCase() + text.slice(1); 3 | } 4 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/utils/tailwind.ts: -------------------------------------------------------------------------------- 1 | import { twMerge } from 'tailwind-merge'; 2 | import { ClassValue, clsx } from 'clsx'; 3 | 4 | export const cn = (...inputs: ClassValue[]) => { 5 | return twMerge(clsx(inputs)); 6 | }; 7 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | declare module "*.svg" { 4 | import React from "react"; 5 | const SVG: React.FC>; 6 | export default SVG; 7 | } 8 | 9 | declare module "*.png" { 10 | const value: string; 11 | export default value; 12 | } 13 | 14 | declare module "*.jpg" { 15 | const value: string; 16 | export default value; 17 | } 18 | 19 | declare module "*.jpeg" { 20 | const value: string; 21 | export default value; 22 | } -------------------------------------------------------------------------------- /demo-apps/health-app/client/tailwind.config.js: -------------------------------------------------------------------------------- 1 | const { join } = require('path'); 2 | 3 | /** @type {import('tailwindcss').Config} */ 4 | module.exports = { 5 | content: [ 6 | "./index.html", 7 | "./src/**/*.{js,ts,jsx,tsx}", 8 | ], 9 | theme: { 10 | extend: { 11 | colors: { 12 | 'aws-dark-blue': '#232F3E', 13 | 'aws-dark-blue-light': '#31465F', 14 | 'aws-dark-blue-dark': '#1A242F', 15 | 'aws-orange': '#FF9900', 16 | 'aws-orange-light': '#FFA827', 17 | 'aws-orange-dark': '#E68A00', 18 | }, 19 | }, 20 | }, 21 | plugins: [], 22 | }; 23 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | "jsx": "react-jsx", 16 | 17 | /* Linting */ 18 | "strict": true, 19 | "noUnusedLocals": true, 20 | "noUnusedParameters": true, 21 | "noFallthroughCasesInSwitch": true 22 | }, 23 | "include": ["src"], 24 | "references": [{ "path": "./tsconfig.node.json" }] 25 | } 26 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "composite": true, 4 | "skipLibCheck": true, 5 | "module": "ESNext", 6 | "moduleResolution": "bundler", 7 | "allowSyntheticDefaultImports": true 8 | }, 9 | "include": ["vite.config.ts"] 10 | } 11 | -------------------------------------------------------------------------------- /demo-apps/health-app/client/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from "vite"; 2 | import react from "@vitejs/plugin-react"; 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | }); 8 | -------------------------------------------------------------------------------- /demo-apps/health-app/data/bedrock-kb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/data/bedrock-kb.png -------------------------------------------------------------------------------- /demo-apps/health-app/data/chunking.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/data/chunking.png -------------------------------------------------------------------------------- /demo-apps/health-app/data/datasource.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/data/datasource.png -------------------------------------------------------------------------------- /demo-apps/health-app/data/embedding.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/data/embedding.png -------------------------------------------------------------------------------- /demo-apps/health-app/data/kb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/data/kb.png -------------------------------------------------------------------------------- /demo-apps/health-app/data/store.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/data/store.db -------------------------------------------------------------------------------- /demo-apps/health-app/data/sync.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/data/sync.png -------------------------------------------------------------------------------- /demo-apps/health-app/server/.env.example: -------------------------------------------------------------------------------- 1 | # AI Health Assistant Environment Configuration 2 | # Copy this file to .env and fill in your actual values 3 | 4 | # Daily.co API Key 5 | # Get this from: https://dashboard.daily.co/developers 6 | # Used for audio/video communication between client and server 7 | DAILY_API_KEY=your_daily_api_key_here 8 | 9 | # AWS Credentials 10 | # These are required for AWS Bedrock access 11 | # You can get these from AWS IAM console or use AWS CLI configuration 12 | AWS_ACCESS_KEY_ID=your_aws_access_key_here 13 | AWS_SECRET_ACCESS_KEY=your_aws_secret_access_key_here 14 | 15 | # AWS Region 16 | # The region where your Bedrock services are available 17 | # Nova Sonic is available in specific regions - check AWS documentation 18 | AWS_REGION=us-east-1 19 | 20 | # Amazon Bedrock Knowledge Base ID 21 | # Create a Knowledge Base in AWS Bedrock console and use its ID here 22 | # The Knowledge Base should contain health-related content for symptom guidance 23 | # Format: Usually looks like "XXXXXXXXXX" (10 characters) 24 | AMAZON_BEDROCK_KB_ID=your_bedrock_knowledge_base_id_here 25 | 26 | # Optional: Database Path (defaults to server/health_assistant.db if not set) 27 | # DB_PATH=./health_assistant.db 28 | 29 | # Optional: Log Level (defaults to INFO if not set) 30 | # LOG_LEVEL=INFO -------------------------------------------------------------------------------- /demo-apps/health-app/server/.python-version: -------------------------------------------------------------------------------- 1 | 3.12 2 | -------------------------------------------------------------------------------- /demo-apps/health-app/server/data/store.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/health-app/server/data/store.db -------------------------------------------------------------------------------- /demo-apps/health-app/server/logger_config.py: -------------------------------------------------------------------------------- 1 | from loguru import logger 2 | import sys 3 | 4 | 5 | logger.remove(0) 6 | logger.add(sys.stderr, level="DEBUG") -------------------------------------------------------------------------------- /demo-apps/health-app/server/pyproject.toml: -------------------------------------------------------------------------------- 1 | [project] 2 | name = "server" 3 | version = "0.1.0" 4 | description = "Add your description here" 5 | readme = "README.md" 6 | requires-python = ">=3.12" 7 | dependencies = [ 8 | "boto3>=1.38.18", 9 | "fastapi[all]>=0.115.12", 10 | "pipecat-ai[aws-nova-sonic,daily,silero,webrtc]", 11 | "python-dotenv>=1.1.0", 12 | "uvicorn>=0.34.2", 13 | "websockets==13.1", 14 | ] 15 | 16 | [tool.uv.sources] 17 | pipecat-ai = { git = "https://github.com/adithyaxx/pipecat.git", rev = "emit-func-call-event" } 18 | -------------------------------------------------------------------------------- /demo-apps/health-app/server/requirements.txt: -------------------------------------------------------------------------------- 1 | python-dotenv 2 | fastapi[all] 3 | uvicorn 4 | websockets==13.1 5 | boto3 6 | git+https://github.com/adithyaxx/pipecat.git@emit-func-call-event#egg=pipecat-ai[daily,aws-nova-sonic,silero,webrtc] -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/.gitignore: -------------------------------------------------------------------------------- 1 | # Python 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | *.so 6 | .Python 7 | build/ 8 | develop-eggs/ 9 | dist/ 10 | downloads/ 11 | eggs/ 12 | .eggs/ 13 | lib/ 14 | lib64/ 15 | parts/ 16 | sdist/ 17 | var/ 18 | wheels/ 19 | *.egg-info/ 20 | .installed.cfg 21 | *.egg 22 | 23 | # Virtual Environment 24 | venv/ 25 | ENV/ 26 | env/ 27 | .venv 28 | 29 | # Lambda packages 30 | *.zip 31 | travel-planner-lambda.zip 32 | 33 | # AWS 34 | .aws/ 35 | response.json 36 | test-event.json 37 | 38 | # IDE 39 | .vscode/ 40 | .idea/ 41 | *.swp 42 | *.swo 43 | *~ 44 | 45 | # OS 46 | .DS_Store 47 | Thumbs.db 48 | 49 | # Logs 50 | *.log 51 | 52 | # Environment variables 53 | .env 54 | .env.local 55 | .env.*.local 56 | 57 | # Test coverage 58 | htmlcov/ 59 | .coverage 60 | .coverage.* 61 | coverage.xml 62 | *.cover 63 | .hypothesis/ 64 | .pytest_cache/ 65 | 66 | # Temporary files 67 | *.tmp 68 | *.bak 69 | .cache/ -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/api_config.json: -------------------------------------------------------------------------------- 1 | { 2 | "api_id": "djvk0wal4m", 3 | "api_endpoint": "https://djvk0wal4m.execute-api.us-west-2.amazonaws.com/prod", 4 | "region": "us-west-2", 5 | "stage": "prod", 6 | "proxy_function": "travel-planner-proxy" 7 | } 8 | -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/data-setup/dsql/data/src/database/__init__.py: -------------------------------------------------------------------------------- 1 | """Database module for travel planning demo.""" 2 | 3 | from .db_manager import DatabaseManager 4 | from .data_generator import DataGenerator 5 | from .models import City, Airline, Hotel, Flight, Activity 6 | 7 | __all__ = [ 8 | 'DatabaseManager', 9 | 'DataGenerator', 10 | 'City', 11 | 'Airline', 12 | 'Hotel', 13 | 'Flight', 14 | 'Activity' 15 | ] -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/data-setup/dsql/data/src/knowledge_base/__init__.py: -------------------------------------------------------------------------------- 1 | """Knowledge Base module for AWS Bedrock Knowledge Base integration.""" 2 | 3 | from .kb_adapter import KnowledgeBaseAdapter 4 | 5 | __all__ = ['KnowledgeBaseAdapter'] -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/data-setup/dsql/data/src/models/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/aws-samples/genai-ml-platform-examples/64e16cd9e590f1b6b0b84bf0d8b7626299e81d98/demo-apps/travel-app/backend/data-setup/dsql/data/src/models/__init__.py -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/lambda/__init__.py: -------------------------------------------------------------------------------- 1 | # Lambda package root -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/lambda/tools/__init__.py: -------------------------------------------------------------------------------- 1 | """Travel planning tools for the orchestrator.""" 2 | 3 | from .destinations import search_destinations 4 | from .flights import search_flights 5 | from .hotels import search_hotels 6 | from .activities import search_activities 7 | from .budget import analyze_budget 8 | from .itinerary import compile_itinerary 9 | 10 | __all__ = [ 11 | 'search_destinations', 12 | 'search_flights', 13 | 'search_hotels', 14 | 'search_activities', 15 | 'analyze_budget', 16 | 'compile_itinerary' 17 | ] -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/lambda/utils/__init__.py: -------------------------------------------------------------------------------- 1 | """Utility modules for Lambda.""" 2 | 3 | from .dsql import dsql, search_flights, search_hotels, search_activities, get_city_info 4 | 5 | __all__ = [ 6 | 'dsql', 7 | 'search_flights', 8 | 'search_hotels', 9 | 'search_activities', 10 | 'get_city_info' 11 | ] -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/requirements-lambda.txt: -------------------------------------------------------------------------------- 1 | # Core dependencies for Lambda 2 | strands-agents>=0.1.6 3 | boto3>=1.38.27 4 | psycopg2-binary>=2.9.9 5 | pydantic>=2.5.0 -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/requirements.txt: -------------------------------------------------------------------------------- 1 | boto3>=1.38.27 2 | psycopg2-binary>=2.9.9 3 | psycopg2 -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/scripts/deploy_complete.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Complete deployment script: Package and Deploy Lambda with DSQL integration 4 | set -e 5 | 6 | echo "🚀 Complete Travel Planner Lambda Deployment" 7 | echo "=============================================" 8 | 9 | # Change to project root 10 | cd "$(dirname "$0")/.." 11 | 12 | # Step 1: Package the Lambda 13 | echo "" 14 | echo "📦 Step 1: Packaging Lambda function..." 15 | ./scripts/package.sh 16 | 17 | # Step 2: Deploy the Lambda 18 | echo "" 19 | echo "🚀 Step 2: Deploying Lambda function..." 20 | ./scripts/deploy.sh 21 | 22 | echo "" 23 | echo "🎉 Complete deployment finished!" 24 | echo "" 25 | echo "📚 Usage Examples:" 26 | echo " Find hotels: /usr/local/bin/aws lambda invoke --function-name travel-planner-orchestrator --payload '{\"prompt\":\"Find luxury hotels in Paris\"}' /tmp/response.json" 27 | echo " Search destinations: /usr/local/bin/aws lambda invoke --function-name travel-planner-orchestrator --payload '{\"prompt\":\"Recommend romantic destinations in Europe\"}' /tmp/response.json" 28 | echo " Plan trip: /usr/local/bin/aws lambda invoke --function-name travel-planner-orchestrator --payload '{\"prompt\":\"Plan a 5-day trip to Tokyo for $3000\"}' /tmp/response.json" -------------------------------------------------------------------------------- /demo-apps/travel-app/backend/scripts/package.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Package Lambda function with layers for deployment 4 | # Based on strands example approach 5 | 6 | set -e 7 | 8 | echo "🚀 Packaging Travel Planner Lambda with layers..." 9 | 10 | # Colors for output 11 | GREEN='\033[0;32m' 12 | YELLOW='\033[1;33m' 13 | RED='\033[0;31m' 14 | NC='\033[0m' # No Color 15 | 16 | # Configuration 17 | LAMBDA_DIR="lambda" 18 | PACKAGING_DIR="packaging" 19 | APP_ZIP="packaging/app.zip" 20 | DEPS_ZIP="packaging/dependencies.zip" 21 | 22 | # Clean previous build 23 | echo -e "${YELLOW}Cleaning previous build...${NC}" 24 | rm -rf $PACKAGING_DIR 25 | mkdir -p $PACKAGING_DIR 26 | 27 | # Install dependencies with correct platform 28 | echo -e "${YELLOW}Installing dependencies for Lambda...${NC}" 29 | pip install -r requirements-lambda.txt \ 30 | --platform manylinux2014_x86_64 \ 31 | --target $PACKAGING_DIR/_dependencies \ 32 | --python-version 3.12 \ 33 | --implementation cp \ 34 | --only-binary=:all: \ 35 | --upgrade 36 | 37 | # Create dependencies layer zip 38 | echo -e "${YELLOW}Creating dependencies layer...${NC}" 39 | cd $PACKAGING_DIR/_dependencies 40 | # Lambda layers expect dependencies in python/ directory 41 | mkdir -p ../python 42 | cp -r * ../python/ 43 | cd ../ 44 | zip -r dependencies.zip python -q 45 | rm -rf python _dependencies 46 | cd .. 47 | 48 | # Create application zip 49 | echo -e "${YELLOW}Creating application package...${NC}" 50 | cd $LAMBDA_DIR 51 | zip -r ../$APP_ZIP . -q 52 | cd .. 53 | 54 | # Get package sizes 55 | APP_SIZE=$(du -h $APP_ZIP | cut -f1) 56 | DEPS_SIZE=$(du -h $DEPS_ZIP | cut -f1) 57 | 58 | echo -e "${GREEN}✅ Lambda packages created successfully!${NC}" 59 | echo -e " Application: $APP_ZIP ($APP_SIZE)" 60 | echo -e " Dependencies: $DEPS_ZIP ($DEPS_SIZE)" 61 | -------------------------------------------------------------------------------- /demo-apps/travel-app/frontend/.env.local: -------------------------------------------------------------------------------- 1 | 2 | REACT_APP_USE_SIMULATION=false 3 | REACT_APP_API_ENDPOINT=https://your-api.us-west-2.amazonaws.com/prod 4 | REACT_APP_USE_BACKEND_STRANDS=true 5 | REACT_APP_WEBSOCKET_ENDPOINT= 6 | -------------------------------------------------------------------------------- /demo-apps/travel-app/frontend/build/asset-manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": { 3 | "main.css": "/static/css/main.2a72a2cb.css", 4 | "main.js": "/static/js/main.c8efce8a.js", 5 | "index.html": "/index.html", 6 | "main.2a72a2cb.css.map": "/static/css/main.2a72a2cb.css.map", 7 | "main.c8efce8a.js.map": "/static/js/main.c8efce8a.js.map" 8 | }, 9 | "entrypoints": [ 10 | "static/css/main.2a72a2cb.css", 11 | "static/js/main.c8efce8a.js" 12 | ] 13 | } -------------------------------------------------------------------------------- /demo-apps/travel-app/frontend/build/index.html: -------------------------------------------------------------------------------- 1 | AWS Travel Planning Demo
-------------------------------------------------------------------------------- /demo-apps/travel-app/frontend/build/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Travel Demo", 3 | "name": "AWS Travel Planning Demo", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#1976d2", 24 | "background_color": "#ffffff" 25 | } -------------------------------------------------------------------------------- /demo-apps/travel-app/frontend/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "Travel Demo", 3 | "name": "AWS Travel Planning Demo", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#1976d2", 24 | "background_color": "#ffffff" 25 | } -------------------------------------------------------------------------------- /demo-apps/travel-app/frontend/src/App.tsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Routes, Route } from 'react-router-dom'; 3 | import Box from '@mui/material/Box'; 4 | import { ThemeProvider } from '@mui/material/styles'; 5 | import CssBaseline from '@mui/material/CssBaseline'; 6 | import Header from './components/common/Header'; 7 | import Footer from './components/common/Footer'; 8 | import HomePage from './pages/HomePage'; 9 | import DemoPage from './pages/DemoPage'; 10 | import AboutPage from './pages/AboutPage'; 11 | import { ChatProvider } from './context/ChatContext'; 12 | import { Notifications, WebSocketStatus } from './components/common'; 13 | import theme from './theme'; 14 | 15 | const App: React.FC = () => { 16 | return ( 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | } /> 25 | } /> 26 | } /> 27 | 28 | 29 |