khlevon commited on
Commit
6f89266
·
1 Parent(s): 1ddfc0b

docs: update architecture diagrams and readme to include openai chat app integration

Browse files
README.md CHANGED
@@ -125,6 +125,39 @@ Each agent has **filtered tool access**:
125
  - PlannerAgent: All Flixbus tools, blocked from map tools
126
  - ItineraryAgent: Only `gm_walking_dir_tool` + `get_city_info_tool`
127
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
128
  ## Request Flow
129
 
130
  1. User fills form in Gradio UI
 
125
  - PlannerAgent: All Flixbus tools, blocked from map tools
126
  - ItineraryAgent: Only `gm_walking_dir_tool` + `get_city_info_tool`
127
 
128
+ ## OpenAI ChatGPT App Integration
129
+
130
+ This MCP server is fully compatible with the **OpenAI ChatGPT**. You can connect the MCP server to ChatGPT and use the Flixbus tools directly within conversations.
131
+
132
+ ### Rich UI Widgets
133
+
134
+ When used through the ChatGPT app, tools render **interactive visual widgets** instead of raw JSON:
135
+
136
+ | Tool | Widget |
137
+ |------|--------|
138
+ | `get_city_info_tool` | City card with name, country, coordinates, and Flixbus UUID |
139
+ | `search_cities_in_radius_tool` | Grid of city cards showing nearby destinations |
140
+ | `get_tripe_options_list_tool` | Trip options with prices, times, and booking links |
141
+
142
+ Widgets are implemented as HTML/CSS/JS components in `src/tools/widgets/` and registered using Gradio's `@gr.mcp.resource()` decorator with OpenAI-specific metadata:
143
+
144
+ ```python
145
+ @gr.mcp.tool(
146
+ name="get_city_info_tool",
147
+ _meta={
148
+ "openai/outputTemplate": "ui://widget/get_city_info_widget.html",
149
+ "openai/resultCanProduceWidget": True,
150
+ "openai/widgetAccessible": True,
151
+ },
152
+ )
153
+ ```
154
+
155
+ ### Connecting to ChatGPT
156
+
157
+ 1. In ChatGPT app, go to Settings -> Apps & connections -> Enable Developer mode -> Create app with the folloing MCP endpoint
158
+ 2. MCP endpoint: `https://mcp-1st-birthday-backpacking-assistant.hf.space/gradio_api/mcp/`
159
+ 3. The Flixbus tools will appear in your ChatGPT conversations
160
+
161
  ## Request Flow
162
 
163
  1. User fills form in Gradio UI
docs/assets/architecture_detailed.svg CHANGED
docs/assets/architecture_lite.svg CHANGED
docs/diagrams/architecture_detailed.mmd CHANGED
@@ -14,7 +14,7 @@ config:
14
  deterministicIDSeed: 46
15
  flowchart:
16
  useMaxWidth: false
17
- wrappingWidth: 250
18
  inheritDir: true
19
  curve: linear
20
  gantt:
@@ -37,6 +37,17 @@ flowchart LR
37
 
38
  end
39
 
 
 
 
 
 
 
 
 
 
 
 
40
  %% Blaxel
41
  subgraph Blaxel["Blaxel Platform"]
42
 
@@ -77,7 +88,8 @@ flowchart LR
77
  ux_agent ux_agent__blaxel_llm_sandbox@--HTTPS--> blaxel_llm_sandbox
78
  ux_agent ux_agent__api_gateway@--> api_gateway
79
 
80
-
 
81
 
82
 
83
  %% styles
@@ -102,5 +114,8 @@ flowchart LR
102
  class ux_agent__blaxel_llm_sandbox animate_stroke
103
  class ux_agent__api_gateway animate_stroke
104
 
 
 
 
105
  %% global styles
106
  classDef animate_stroke stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;
 
14
  deterministicIDSeed: 46
15
  flowchart:
16
  useMaxWidth: false
17
+ wrappingWidth: 350
18
  inheritDir: true
19
  curve: linear
20
  gantt:
 
37
 
38
  end
39
 
40
+
41
+ %% OpenAI ChatGPT App
42
+ subgraph OpenAIChatGPTApp["OpenAI ChatGPT"]
43
+
44
+ gpt_app("`
45
+ Backpacking Assistant ChatGPT App
46
+ Our MCP server supports OpenAI ChatGPT app widgets
47
+ `")
48
+
49
+ end
50
+
51
  %% Blaxel
52
  subgraph Blaxel["Blaxel Platform"]
53
 
 
88
  ux_agent ux_agent__blaxel_llm_sandbox@--HTTPS--> blaxel_llm_sandbox
89
  ux_agent ux_agent__api_gateway@--> api_gateway
90
 
91
+ %% gpt app connections
92
+ gpt_app gpt_app__mcp_server@--> mcp_server
93
 
94
 
95
  %% styles
 
114
  class ux_agent__blaxel_llm_sandbox animate_stroke
115
  class ux_agent__api_gateway animate_stroke
116
 
117
+ %% gpt app connections
118
+ class gpt_app__mcp_server animate_stroke
119
+
120
  %% global styles
121
  classDef animate_stroke stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;
docs/diagrams/architecture_lite.mmd CHANGED
@@ -14,7 +14,7 @@ config:
14
  deterministicIDSeed: 46
15
  flowchart:
16
  useMaxWidth: false
17
- wrappingWidth: 250
18
  inheritDir: true
19
  curve: linear
20
  gantt:
@@ -37,6 +37,16 @@ flowchart LR
37
 
38
  end
39
 
 
 
 
 
 
 
 
 
 
 
40
  %% Blaxel
41
  subgraph Blaxel["Blaxel Platform"]
42
 
@@ -68,6 +78,7 @@ flowchart LR
68
  BackpackingAssistantAgent BackpackingAssistantAgent__blaxel_search_mcp@--> blaxel_search_mcp
69
  BackpackingAssistantAgent BackpackingAssistantAgent__mcp_server@--> mcp_server
70
 
 
71
 
72
  %% styles
73
  class user__ui_app animate_stroke
@@ -82,5 +93,7 @@ flowchart LR
82
  class BackpackingAssistantAgent__blaxel_search_mcp animate_stroke
83
  class BackpackingAssistantAgent__mcp_server animate_stroke
84
 
 
 
85
  %% global styles
86
  classDef animate_stroke stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;
 
14
  deterministicIDSeed: 46
15
  flowchart:
16
  useMaxWidth: false
17
+ wrappingWidth: 350
18
  inheritDir: true
19
  curve: linear
20
  gantt:
 
37
 
38
  end
39
 
40
+ %% OpenAI ChatGPT App
41
+ subgraph OpenAIChatGPTApp["OpenAI ChatGPT"]
42
+
43
+ gpt_app("`
44
+ Backpacking Assistant ChatGPT App
45
+ Our MCP server supports OpenAI ChatGPT app widgets
46
+ `")
47
+
48
+ end
49
+
50
  %% Blaxel
51
  subgraph Blaxel["Blaxel Platform"]
52
 
 
78
  BackpackingAssistantAgent BackpackingAssistantAgent__blaxel_search_mcp@--> blaxel_search_mcp
79
  BackpackingAssistantAgent BackpackingAssistantAgent__mcp_server@--> mcp_server
80
 
81
+ gpt_app gpt_app__mcp_server@--> mcp_server
82
 
83
  %% styles
84
  class user__ui_app animate_stroke
 
93
  class BackpackingAssistantAgent__blaxel_search_mcp animate_stroke
94
  class BackpackingAssistantAgent__mcp_server animate_stroke
95
 
96
+ class gpt_app__mcp_server animate_stroke
97
+
98
  %% global styles
99
  classDef animate_stroke stroke-dasharray: 9,5,stroke-dashoffset: 900,animation: dash 25s linear infinite;