Create a batteries-included router with pre-configured Ollama for chat and ChromaDB for search. Perfect for getting started quickly without managing external infrastructure.
A Default Router comes with pre-packaged components for ease of use. It's designed to get you up and running with minimal configuration, providing everything you need to start serving AI-powered chat and search capabilities.
Pre-configured with Ollama for local LLM hosting. No API keys needed, runs entirely on your infrastructure.
Built-in ChromaDB for vector storage and retrieval. Automatically indexes your documents for semantic search.
Health checks and status tracking built-in. Know when your services are running and track their performance.
Before creating a default router, ensure you have:
https://github.com/OpenMined/syft-llm-router
http://localhost:8080
or navigate to it within SyftUIIf you have some data and want a lightweight setup, selecting only "Search" should suffice. You can always add chat capabilities later.
The system automatically handles the setup for you:
SyftBox/apps
After creation, you'll find this structure in your SyftBox apps directory:
my-router/
├── server.py # Main FastAPI server
├── chat_service.py # Ollama chat implementation
├── search_service.py # ChromaDB search
├── spawn_services.py # Service monitoring
├── pyproject.toml # Dependencies
├── run.sh # Startup script
└── data/ # ChromaDB storage
If you enabled the Search service, you can start adding your files to index:
SyftBox/apps
for an app called local-rag
Test your chat endpoint:
curl -X POST https://syftbox.net/api/v1/send/ \
-H "Content-Type: application/json" \
-d '{
"message": "What is machine learning?",
"suffix-sender": "true",
"timeout": "5000",
"x-syft-from": "guest@syftbox.net",
"x-syft-url": "syft://<your_email>/app_data/my_router/rpc/chat"
}'
Test your search endpoint:
curl -X POST https://syftbox.net/api/v1/send/ \
-H "Content-Type: application/json" \
-d '{
"query": "machine learning concepts",
"suffix-sender": "true",
"timeout": "5000",
"x-syft-from": "guest@syftbox.net",
"x-syft-url": "syft://<your_email>/app_data/my_router/rpc/search"
}'
Once you're happy with your router's performance, make it available to others:
Summary: "AI assistant with document search"
Description: "Powered by Llama2 and ChromaDB"
Tags: ["chat", "search", "llama2"]
Pricing:
Chat: $0.01 per request
Search: $0.005 per request
The system automatically monitors your router's health and shows status in the UI. When troubleshooting:
# View router logs
tail -f ~/SyftBox/apps/my-router/logs/app.log
ollama serve