https://github.com/indexnetwork/semantic-router
https://github.com/indexnetwork/semantic-router
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/indexnetwork/semantic-router
- Owner: indexnetwork
- License: mit
- Created: 2024-11-19T02:44:41.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-21T14:34:59.000Z (over 1 year ago)
- Last Synced: 2025-02-03T20:01:46.841Z (over 1 year ago)
- Language: Python
- Size: 69.3 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Index Semantic Router
A trustless, privacy-preserving semantic routing agent that processes and evaluates content updates using LLM providers. Built with end-to-end TEE (Trusted Execution Environment) architecture for complete operational blindness - no one, including the operators, can see what's being processed or who is using it.

## Features
- Real-time content filtering using Server-Sent Events (SSE)
- End-to-end TEE architecture:
- [Lit Protocol](https://litprotocol.com/) for secure key management and configuration
- [OpenGradient](https://opengradient.ai/) for private LLM inference
- [Fleek](https://fleek.network/) for secure TEE-based decentralized runtime
- IPFS for decentralized prompt storage
- Multiple data source integrations:
- Farcaster
- Lu.ma (coming soon)
- Paragraph.xyz (coming soon)
## Prerequisites
- Python 3.8+
- Node.js 16+
- Google Cloud Project (for Gemini)
- OpenGradient account
- Lit Protocol setup
- IPFS node (optional, for self-hosting prompts)
## Installation
### Using Pre-built Image
1. Pull and run the official Docker image:
```bash
docker pull indexnetwork/semantic-router:0.0.2
docker run -p 8000:8000 --env ROUTER_CONFIG="" indexnetwork/semantic-router:0.0.2
```
> **Note**: Contact hello@index.network for testing purposes to obtain the ROUTER_CONFIG value. Do not share this configuration directly.
### Using Docker (Build from Source)
1. Clone the repository:
```bash
git clone https://github.com/indexnetwork/semantic-router
cd semantic-router
```
2. Build and run the Docker container:
```bash
docker build -t semantic-router .
docker run -p 8000:8000 semantic-router
```
3. Connect to the agent's SSE endpoint:
```bash
curl -N "http://localhost:8000/?prompt=If+its+a+significant+update+on+decentralized+AI+and+autonomous+agents."
```
## API
### GET /
Streams semantic evaluation results for the provided prompt.
Query Parameters:
- `prompt`: Your prompt, could be anything.
Response: Server-Sent Events stream with JSON payloads
## License
MIT License - see [LICENSE](LICENSE) file for details.