Update app.py
Browse files
app.py
CHANGED
@@ -384,6 +384,14 @@ with gr.Blocks(title="MCP-OpenFloor Bridge", theme=gr.themes.Soft()) as demo:
|
|
384 |
- **Environment Variable**: `export OPENFLOOR_AGENTS="https://agent1.com,https://agent2.com"`
|
385 |
- **Request Header**: `x-openfloor-agents: https://agent1.com,https://agent2.com`
|
386 |
""")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
387 |
|
388 |
if __name__ == "__main__":
|
389 |
demo.launch(
|
|
|
384 |
- **Environment Variable**: `export OPENFLOOR_AGENTS="https://agent1.com,https://agent2.com"`
|
385 |
- **Request Header**: `x-openfloor-agents: https://agent1.com,https://agent2.com`
|
386 |
""")
|
387 |
+
|
388 |
+
# Expose functions as MCP tools
|
389 |
+
gr.api(discover_openfloor_agents)
|
390 |
+
gr.api(send_message_to_openfloor_agent)
|
391 |
+
gr.api(send_to_best_openfloor_agent)
|
392 |
+
gr.api(execute_agent_capability)
|
393 |
+
gr.api(list_all_agent_capabilities)
|
394 |
+
gr.api(send_task_to_agents_with_keywords)
|
395 |
|
396 |
if __name__ == "__main__":
|
397 |
demo.launch(
|