avfranco commited on
Commit
60652b0
·
1 Parent(s): 41e94bd

ea4all-mcp-mcp-docs-disabled-uvx

Browse files
Files changed (1) hide show
  1. ea4all/ea4all_mcp.py +8 -8
ea4all/ea4all_mcp.py CHANGED
@@ -9,6 +9,7 @@
9
  #2025-07-26
10
  ## Gradio MCP synced with LGS
11
  ## Langgraph MCP Docs Agentic System disabled -asyncio conflict - fixed with nest_asyncio at Graph code
 
12
  ##
13
 
14
  from langchain.callbacks.tracers import LangChainTracer
@@ -19,7 +20,6 @@ from ea4all.src.ea4all_gra.configuration import AgentConfiguration as gra
19
  from ea4all.src.ea4all_apm.graph import apm_graph
20
  from ea4all.src.ea4all_vqa.graph import diagram_graph
21
  from ea4all.src.ea4all_gra.graph import togaf_graph
22
- from ea4all.src.ea4all_mcp.graph import mcp_docs_graph
23
  from ea4all.src.ea4all_indexer.graph import indexer_graph
24
  from ea4all.src.shared.utils import (
25
  get_relevant_questions,
@@ -216,7 +216,7 @@ async def run_pmo_agentic_system(question:str) -> AsyncGenerator[list, None]:
216
 
217
  #yield run_pmo_crew(inputs)
218
 
219
- async def run_aws_microsoft_docs_agentic_system(question: str) -> AsyncGenerator[list, None]:
220
  """
221
  description:
222
  Answers questions about AWS or Microsoft official documentation. Build AWS Diagrams.
@@ -225,9 +225,9 @@ async def run_aws_microsoft_docs_agentic_system(question: str) -> AsyncGenerator
225
  Returns:
226
  response: Response to user's question.
227
  """
228
-
229
- print("---MCP Docs team got a request--- Routing to MCP_DOCS_AGENTIC node")
230
 
 
 
231
  # Invoke the EA4ALL MCP Docs graph
232
  mcp_response = await mcp_docs_graph.ainvoke(
233
  {"messages": [{"role": "user", "content": question}]}
@@ -236,7 +236,7 @@ async def run_aws_microsoft_docs_agentic_system(question: str) -> AsyncGenerator
236
  chat_memory = []
237
  chat_memory.append(ChatMessage(role="assistant", content=mcp_response['messages'][-1].content))
238
 
239
- yield chat_memory
240
 
241
 
242
  #Blocks w/ ChatInterface, BYOD, About
@@ -343,7 +343,7 @@ with gr.Blocks(title="Your ArchitectGPT",fill_height=True, fill_width=True) as e
343
  )
344
  dbr_run=gr.Button(scale=None,value="Run Reference Architecture")
345
  dbr_cls=gr.ClearButton([togaf_vision, architecture_runway])
346
- with gr.Tab(label="AWS & Microsoft Documentation QnA", id="id_mcp_docs"):
347
  with gr.Tabs() as tabs_docs_qna:
348
  with gr.Tab(label="Connect, Explore, Together", id="docs_qna_1"):
349
  gr.Markdown(value=agentic_aws_microsoft_docs_desc)
@@ -353,7 +353,7 @@ with gr.Blocks(title="Your ArchitectGPT",fill_height=True, fill_width=True) as e
353
  layout="bubble",
354
  )
355
  docs_prompt = gr.Textbox(lines=1, show_label=False, max_lines=1, submit_btn=True, autofocus=True, placeholder="Type your question about AWS or Microsoft Documentation here, or AWS Diagrams.")
356
- gr.ClearButton([ea4all_chatbot,qna_prompt], value="Clear", size="sm", visible=True)
357
  with gr.Tab(label="Overview", id="how_to"):
358
  gr.Markdown(value=TITLE)
359
  gr.Image(
@@ -435,7 +435,7 @@ with gr.Blocks(title="Your ArchitectGPT",fill_height=True, fill_width=True) as e
435
  #pmo_examples.input(lambda value: value, pmo_examples, pmo_prompt)
436
 
437
  #Invoke the EA4ALL MCP Docs Agentic System
438
- docs_prompt.submit(run_aws_microsoft_docs_agentic_system,[docs_prompt], ea4all_chatbot, api_name="aws_microsoft_docs_agent")
439
 
440
  #Set initial state of apm and llm
441
  ea4all_mcp.load(ea4all_agent_init, outputs=[
 
9
  #2025-07-26
10
  ## Gradio MCP synced with LGS
11
  ## Langgraph MCP Docs Agentic System disabled -asyncio conflict - fixed with nest_asyncio at Graph code
12
+ ## STDIO UVX MCP Server not working on HF Spaces - disabled
13
  ##
14
 
15
  from langchain.callbacks.tracers import LangChainTracer
 
20
  from ea4all.src.ea4all_apm.graph import apm_graph
21
  from ea4all.src.ea4all_vqa.graph import diagram_graph
22
  from ea4all.src.ea4all_gra.graph import togaf_graph
 
23
  from ea4all.src.ea4all_indexer.graph import indexer_graph
24
  from ea4all.src.shared.utils import (
25
  get_relevant_questions,
 
216
 
217
  #yield run_pmo_crew(inputs)
218
 
219
+ async def run_aws_microsoft_docs_agentic_system(question: str):
220
  """
221
  description:
222
  Answers questions about AWS or Microsoft official documentation. Build AWS Diagrams.
 
225
  Returns:
226
  response: Response to user's question.
227
  """
 
 
228
 
229
+ """DISABLED
230
+ print("---MCP Docs team got a request--- Routing to MCP_DOCS_AGENTIC node")
231
  # Invoke the EA4ALL MCP Docs graph
232
  mcp_response = await mcp_docs_graph.ainvoke(
233
  {"messages": [{"role": "user", "content": question}]}
 
236
  chat_memory = []
237
  chat_memory.append(ChatMessage(role="assistant", content=mcp_response['messages'][-1].content))
238
 
239
+ yield chat_memory"""
240
 
241
 
242
  #Blocks w/ ChatInterface, BYOD, About
 
343
  )
344
  dbr_run=gr.Button(scale=None,value="Run Reference Architecture")
345
  dbr_cls=gr.ClearButton([togaf_vision, architecture_runway])
346
+ """with gr.Tab(label="AWS & Microsoft Documentation QnA", id="id_mcp_docs"):
347
  with gr.Tabs() as tabs_docs_qna:
348
  with gr.Tab(label="Connect, Explore, Together", id="docs_qna_1"):
349
  gr.Markdown(value=agentic_aws_microsoft_docs_desc)
 
353
  layout="bubble",
354
  )
355
  docs_prompt = gr.Textbox(lines=1, show_label=False, max_lines=1, submit_btn=True, autofocus=True, placeholder="Type your question about AWS or Microsoft Documentation here, or AWS Diagrams.")
356
+ gr.ClearButton([ea4all_chatbot,qna_prompt], value="Clear", size="sm", visible=True)"""
357
  with gr.Tab(label="Overview", id="how_to"):
358
  gr.Markdown(value=TITLE)
359
  gr.Image(
 
435
  #pmo_examples.input(lambda value: value, pmo_examples, pmo_prompt)
436
 
437
  #Invoke the EA4ALL MCP Docs Agentic System
438
+ #docs_prompt.submit(run_aws_microsoft_docs_agentic_system,[docs_prompt], ea4all_chatbot, api_name="aws_microsoft_docs_agent")
439
 
440
  #Set initial state of apm and llm
441
  ea4all_mcp.load(ea4all_agent_init, outputs=[