Spaces:
No application file
No application file
HF Space: add metadata + root requirements
Browse files- README.md +42 -1
- requirements.txt +3 -0
README.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
# GraphRAG Agentic System
|
| 2 |
|
| 3 |
## Overview
|
|
@@ -88,6 +97,34 @@ The agent will then:
|
|
| 88 |
4. Execute the query using the `QueryExecutorTool`.
|
| 89 |
5. Return the final answer to the UI.
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
## Development
|
| 92 |
|
| 93 |
### Running the Agent Manually
|
|
@@ -124,4 +161,8 @@ To test the agent's logic directly without the full Docker stack, you can run it
|
|
| 124 |
βββ docker-compose.yml
|
| 125 |
βββ Makefile
|
| 126 |
βββ README.md
|
| 127 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
title: Agent MCP SQL
|
| 3 |
+
emoji: π§
|
| 4 |
+
sdk: streamlit
|
| 5 |
+
app_file: space_app.py
|
| 6 |
+
python_version: 3.11
|
| 7 |
+
pinned: false
|
| 8 |
+
---
|
| 9 |
+
|
| 10 |
# GraphRAG Agentic System
|
| 11 |
|
| 12 |
## Overview
|
|
|
|
| 97 |
4. Execute the query using the `QueryExecutorTool`.
|
| 98 |
5. Return the final answer to the UI.
|
| 99 |
|
| 100 |
+
### Deploying a Hugging Face Space (Streamlit front-end only)
|
| 101 |
+
|
| 102 |
+
This repo includes a self-contained Streamlit app for Hugging Face Spaces: `space_app.py`.
|
| 103 |
+
It connects to your externally reachable Agent and MCP services.
|
| 104 |
+
|
| 105 |
+
1) Expose your services (public host or tunnel)
|
| 106 |
+
- Agent FastAPI endpoint: `https://<your-host>/query`
|
| 107 |
+
- MCP FastAPI base: `https://<your-host>/mcp`
|
| 108 |
+
|
| 109 |
+
2) In a new HF Space (Streamlit), add these files:
|
| 110 |
+
- `space_app.py` (entrypoint)
|
| 111 |
+
- `requirements.txt` with:
|
| 112 |
+
```
|
| 113 |
+
streamlit==1.28.0
|
| 114 |
+
requests==2.31.0
|
| 115 |
+
pandas==2.1.0
|
| 116 |
+
```
|
| 117 |
+
|
| 118 |
+
3) In Space Settings β Variables and secrets, set:
|
| 119 |
+
- `AGENT_URL` (e.g., `https://your-agent-host/query`)
|
| 120 |
+
- `MCP_URL` (e.g., `https://your-mcp-host/mcp`)
|
| 121 |
+
- `MCP_API_KEY` (the MCP auth key)
|
| 122 |
+
- (Optional) `AGENT_HEALTH_URL`, `NEO4J_URL`
|
| 123 |
+
|
| 124 |
+
4) Configure the Space to run `space_app.py` as the Streamlit app file.
|
| 125 |
+
|
| 126 |
+
Once the Space starts, it will display the same chat UI and stream responses from your hosted Agent.
|
| 127 |
+
|
| 128 |
## Development
|
| 129 |
|
| 130 |
### Running the Agent Manually
|
|
|
|
| 161 |
βββ docker-compose.yml
|
| 162 |
βββ Makefile
|
| 163 |
βββ README.md
|
| 164 |
+
```
|
| 165 |
+
|
| 166 |
+
|
| 167 |
+
testing, what do you see from the mcp and db?
|
| 168 |
+
|
requirements.txt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
streamlit==1.28.0
|
| 2 |
+
requests==2.31.0
|
| 3 |
+
pandas==2.1.0
|