File size: 6,388 Bytes
6f224d0
 
667e85c
 
 
7df4e24
667e85c
7df4e24
 
667e85c
6f224d0
 
667e85c
a9dc537
667e85c
a9dc537
667e85c
 
 
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
 
 
 
 
 
 
a9dc537
667e85c
a9dc537
667e85c
 
 
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
 
 
 
 
a9dc537
667e85c
 
 
 
 
a9dc537
667e85c
 
 
 
 
a9dc537
667e85c
 
 
 
 
a9dc537
667e85c
a9dc537
 
 
667e85c
a9dc537
667e85c
 
 
a9dc537
 
667e85c
a9dc537
 
667e85c
 
 
a9dc537
667e85c
 
a9dc537
667e85c
 
a9dc537
 
667e85c
a9dc537
667e85c
a9dc537
 
667e85c
 
a9dc537
667e85c
 
 
a9dc537
667e85c
 
a9dc537
 
667e85c
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
 
 
a9dc537
667e85c
 
 
 
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
 
 
 
 
 
 
 
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
a9dc537
667e85c
 
 
 
a9dc537
667e85c
a9dc537
667e85c
a9dc537
 
 
 
 
 
 
 
 
 
 
 
 
 
667e85c
 
a9dc537
 
667e85c
 
 
 
 
 
 
 
 
 
a9dc537
 
 
 
 
 
 
 
 
 
667e85c
a9dc537
 
 
667e85c
 
 
 
 
 
 
a9dc537
 
 
667e85c
 
 
 
 
 
 
 
a9dc537
 
 
667e85c
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
---
title: SPARKNET
emoji: πŸ”₯
colorFrom: red
colorTo: blue
sdk: streamlit
sdk_version: 1.28.0
app_file: demo/app.py
python_version: "3.10"
pinned: false
---

# πŸ”₯ SPARKNET: AI-Powered Technology Transfer Office Automation

**Multi-agent AI platform for research valorization and IP management**

[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://sparknet.streamlit.app)
[![VISTA Project](https://img.shields.io/badge/VISTA-Horizon%20EU-blue)](https://vista-project.eu)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

---

## Overview

SPARKNET is an enterprise-grade **Technology Transfer Office (TTO) Automation Platform** that combines multi-agent AI orchestration with document intelligence to automate key TTO workflows. Built for the VISTA/Horizon EU project.

### 🎯 Core TTO Scenarios

| Scenario | Status | Description |
|----------|--------|-------------|
| πŸ’‘ **Patent Wake-Up** | βœ… Live | Transform dormant patents into commercialization opportunities |
| βš–οΈ **Agreement Safety** | βœ… Live | AI-assisted legal document review with risk detection |
| 🀝 **Partner Matching** | βœ… Live | Intelligent stakeholder matching for technology transfer |
| πŸ“‹ **License Compliance** | πŸ”¨ Dev | Payment tracking, milestone verification, revenue alerts |
| πŸ† **Award Identification** | πŸ”¨ Dev | Funding opportunity scanning and nomination assistance |

### πŸ“Š Coverage Dashboard

- **3 Fully Covered** - Production-ready scenarios
- **5 Partially Covered** - In development
- **2 Not Covered** - Planned for future

---

## Features

### πŸ›‘οΈ AI Quality Assurance
- **CriticAgent Validation**: Every AI output validated against VISTA quality standards
- **Confidence Scoring**: Automatic abstention for low-confidence results
- **Source Verification**: Hallucination mitigation with evidence grounding
- **Human-in-the-Loop**: Critical decisions require human approval

### πŸ€– Multi-Agent Architecture
- **PlannerAgent**: Task decomposition and workflow planning
- **ExecutorAgent**: Task execution with tool usage
- **CriticAgent**: Output validation and refinement
- **MemoryAgent**: Context management and retrieval

### πŸ“„ Document Intelligence
- OCR with PaddleOCR/Tesseract
- Layout detection and semantic chunking
- Schema-driven field extraction
- Visual evidence grounding (bbox, page, confidence)

### πŸ’¬ RAG Q&A
- Vector search with ChromaDB
- Grounded retrieval with citations
- Multi-document querying
- Citation generation

---

## Quick Start

### Streamlit Cloud (Recommended)

The app is deployed on Streamlit Cloud. Visit:
```
https://sparknet.streamlit.app
```

### Local Installation

```bash
# Clone repository
git clone https://github.com/MHHamdan/SPARKNET.git
cd SPARKNET

# Install dependencies
pip install -r requirements.txt

# Run Streamlit app
streamlit run demo/app.py
```

### With Local LLM (Ollama)

For privacy-preserving local inference:

```bash
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh

# Pull models
ollama pull llama3.2:latest
ollama pull nomic-embed-text

# Run SPARKNET
streamlit run demo/app.py
```

---

## Configuration

### API Keys

Configure in `.streamlit/secrets.toml` or environment variables:

```toml
[auth]
password = "your-password"

GROQ_API_KEY = "your-groq-key"
GOOGLE_API_KEY = "your-google-key"
OPENROUTER_API_KEY = "your-openrouter-key"
```

See `.env.example` for all available configuration options.

### Supported LLM Providers

| Provider | Free Tier | Notes |
|----------|-----------|-------|
| Groq | 14,400 req/day | Fastest inference |
| Google Gemini | 15 req/min | Good for general use |
| OpenRouter | Many free models | Multi-model access |
| GitHub Models | Free GPT-4o | Requires GitHub token |
| HuggingFace | Thousands of models | Good for embeddings |
| Ollama | Unlimited (local) | Maximum privacy |

---

## Project Structure

```
SPARKNET/
β”œβ”€β”€ demo/                    # Streamlit application
β”‚   β”œβ”€β”€ app.py              # Main app
β”‚   β”œβ”€β”€ auth.py             # Authentication
β”‚   β”œβ”€β”€ llm_providers.py    # LLM provider management
β”‚   └── pages/              # Multi-page app
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ agents/             # Agent implementations
β”‚   β”‚   β”œβ”€β”€ scenario1/      # Patent Wake-Up
β”‚   β”‚   β”œβ”€β”€ scenario3/      # License Compliance
β”‚   β”‚   └── scenario4/      # Award Identification
β”‚   β”œβ”€β”€ rag/                # RAG subsystem
β”‚   β”œβ”€β”€ workflow/           # LangGraph workflows
β”‚   └── document_intelligence/  # Document processing
β”œβ”€β”€ configs/                # Configuration files
β”œβ”€β”€ .streamlit/             # Streamlit config
└── SECURITY.md            # Security documentation
```

---

## Security & GDPR

SPARKNET supports GDPR-compliant deployments:

- **Local Inference**: Use Ollama for 100% on-premise processing
- **Data Isolation**: Configure data retention policies
- **Audit Logging**: Track all AI interactions
- **Private Deployment**: Enterprise deployment options

See [SECURITY.md](SECURITY.md) for detailed security documentation.

---

## Development

### Running Tests
```bash
pytest tests/
```

### Code Formatting
```bash
black src/
flake8 src/
```

---

## Roadmap

- [x] Patent Wake-Up workflow
- [x] Agreement Safety review
- [x] Partner Matching
- [x] CriticAgent validation
- [ ] License Compliance Monitoring (in progress)
- [ ] Award Identification (in progress)
- [ ] Grant Writing Assistant
- [ ] Negotiation Support

---

## Contributing

Contributions are welcome! Please:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests
5. Submit a pull request

---

## Acknowledgments

- **Ollama** for local LLM inference
- **NVIDIA** for CUDA and GPU support
- **LangChain** for LLM orchestration
- **Streamlit** for the web framework
- **The open-source AI community**

---

## Support

- **GitHub Issues**: [github.com/MHHamdan/SPARKNET/issues](https://github.com/MHHamdan/SPARKNET/issues)
- **Documentation**: See `/docs` folder

---

## License

MIT License - see [LICENSE](LICENSE) file for details.

---

<p align="center">
  <strong>πŸ”₯ SPARKNET</strong><br>
  AI-Powered Technology Transfer Office Automation<br>
  <em>VISTA/Horizon EU Project</em>
</p>