# ragook6/agentcoregateway architecture

> Architecture diagram of the GitHub repository ragook6/agentcoregateway, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ragook6/agentcoregateway
- Repository: https://github.com/ragook6/agentcoregateway

## Overview

This repository implements an AI vacation planner: a user submits a destination through the Streamlit interface, which calls an API endpoint backed by Lambda; Lambda invokes the AgentCore runtime, where a CrewAI workflow produces the plan. The crew configures research and itinerary agents, with travel-package lookup through an authenticated AgentCore Gateway and search/LLM integrations. The source excerpts show the UI, Lambda, runtime entrypoint, and crew wiring; task and agent YAML contents and gateway internals were not sampled, so their detailed behavior is not expanded.

Main entry points: [`demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py) (Crew Entrypoint), [`demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/streamlit_api.py`](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/streamlit_api.py) (Vacation UI), [`demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/lambda_function.py`](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/lambda_function.py) (Lambda Handler), [`demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/agents.yaml`](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/agents.yaml) (Vacation Research)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["User Interface"]
  node_streamlit["Vacation UI<br/>[streamlit_api.py]"]
  node_api["API Endpoint"]
end

subgraph group_runtime["Request Runtime"]
  node_lambda["Lambda Handler<br/>[lambda_function.py]"]
  node_agentcore["AgentCore Runtime"]
end

subgraph group_planning["Planning Workflow"]
  node_crew["Crew Entrypoint<br/>[crew.py]"]
  node_research["Vacation Research<br/>[agents.yaml]"]
  node_itinerary["Itinerary Planning<br/>[tasks.yaml]"]
  node_report["Plan Report<br/>[tasks.yaml]"]
end

subgraph group_integrations["External Integrations"]
  node_gateway_tool["Package Tool<br/>[crew.py]"]
  node_gateway["AgentCore Gateway"]
  node_cognito["Cognito Token Service"]
  node_search["Serper Search"]
  node_bedrock["Bedrock LLM"]
end

node_traveler(("Traveler"))

node_traveler -->|"enters destination"| node_streamlit
node_streamlit -->|"posts prompt"| node_api
node_api -.->|"routes request"| node_lambda
node_lambda -->|"invokes runtime"| node_agentcore
node_agentcore -.->|"dispatches invocation"| node_crew
node_crew -->|"configures agent"| node_research
node_crew -->|"configures task"| node_itinerary
node_crew -->|"writes report"| node_report
node_crew -->|"registers tool"| node_gateway_tool
node_gateway_tool -->|"fetches token"| node_cognito
node_gateway_tool -->|"calls package tool"| node_gateway
node_crew -->|"provides search"| node_search
node_crew -->|"configures model"| node_bedrock

click node_streamlit "https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/streamlit_api.py"
click node_lambda "https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/lambda_function.py"
click node_crew "https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py"
click node_research "https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/agents.yaml"
click node_itinerary "https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/tasks.yaml"
click node_report "https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/tasks.yaml"
click node_gateway_tool "https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit,node_api toneBlue
class node_lambda,node_agentcore toneAmber
class node_crew,node_research,node_itinerary,node_report toneMint
class node_gateway_tool,node_gateway,node_cognito,node_search,node_bedrock toneRose
class node_traveler toneIndigo
```

## Components

### User Interface

- [Vacation UI](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/streamlit_api.py): `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/streamlit_api.py`
- **API Endpoint**

### Request Runtime

- [Lambda Handler](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/lambda_function.py): `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/lambda_function.py`
- **AgentCore Runtime**

### Planning Workflow

- [Crew Entrypoint](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py): `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`
- [Vacation Research](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/agents.yaml): `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/agents.yaml`
- [Itinerary Planning](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/tasks.yaml): `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/tasks.yaml`
- [Plan Report](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/tasks.yaml): `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/config/tasks.yaml`

### External Integrations

- [Package Tool](https://github.com/ragook6/agentcoregateway/blob/main/demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py): `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`
- **AgentCore Gateway**
- **Cognito Token Service**
- **Serper Search**
- **Bedrock LLM**

### Other components

- **Traveler**

## Connections

- Traveler → Vacation UI: enters destination (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/streamlit_api.py`)
- Vacation UI → API Endpoint: posts prompt (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/streamlit_api.py`)
- API Endpoint → Lambda Handler: routes request
- Lambda Handler → AgentCore Runtime: invokes runtime (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/lambda_function.py`)
- AgentCore Runtime → Crew Entrypoint: dispatches invocation
- Crew Entrypoint → Vacation Research: configures agent (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`)
- Crew Entrypoint → Itinerary Planning: configures task (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`)
- Crew Entrypoint → Plan Report: writes report (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`)
- Crew Entrypoint → Package Tool: registers tool (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`)
- Package Tool → Cognito Token Service: fetches token (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`)
- Package Tool → AgentCore Gateway: calls package tool (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`)
- Crew Entrypoint → Serper Search: provides search (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`)
- Crew Entrypoint → Bedrock LLM: configures model (evidence: `demo_app_agentcore_gateway/demo_app_agentcore_gateway/vacation_planner/src/vacation_planner/crew.py`)
