Thanks to visit codestin.com
Credit goes to github.com

Skip to content

schmitech/orbit

License Python Docker Release PyPI NPM GitHub stars

ORBIT – Unified, self‑hosted AI inference with your data

ORBIT (Open Retrieval-Based Inference Toolkit) is a middleware platform that provides a unified API for AI inference. It acts as a central gateway, allowing you to connect various local and remote AI models with your private data sources like SQL databases and vector stores.

ORBIT gives you a single, consistent API to run LLMs (local or cloud) against your private data sources with portability, performance, high-availability, and security at the core.

⭐️ If ORBIT helps you ship faster, please consider starring the repo to support the roadmap.

Table of Contents


Highlights

  • Unified AI gateway that normalizes requests across local models, cloud APIs, and hybrid deployments.
  • Bring-your-own data with production-grade RAG adapters for SQL, vector stores, and custom datasources.
  • Secure by default with token-based auth, role-aware API keys, and pluggable content moderation.
  • Ready for teams thanks to batteries-included clients (CLI, React widget, Node/Python SDKs) and automation scripts.

Quick Start

Prerequisites

  • Python 3.12+ (for running the server or CLI locally)
  • Docker Engine 24+ (if you prefer containers)
  • MongoDB (Atlas or local) to unlock authentication, RAG, and history persistence
  • Optional: Redis cache plus your choice of vector DB (Chroma, Qdrant, Pinecone, Milvus)

Docker

Refer to the Docker Setup Guide or run the bundled scripts from the docker/ directory:

cd docker
chmod +x docker-init.sh orbit-docker.sh
./docker-init.sh --build --profile minimal

Local install

# Download the latest release archive
curl -L https://github.com/schmitech/orbit/releases/download/v1.5.8/orbit-1.5.8.tar.gz -o orbit-1.5.8.tar.gz
tar -xzf orbit-1.5.8.tar.gz
cd orbit-1.5.8

# Bootstrap dependencies and download a small model
cp env.example .env
./install/setup.sh --profile minimal --download-gguf granite4-micro

# Start the ORBIT server
source venv/bin/activate
./bin/orbit.sh start 

# Check the logs
cat ./logs/orbit.log

Browse to http://localhost:3000/dashboard to monitor the ORBIT server:

ORBIT Dashboard
ORBIT Dashboard: Monitor, search, and configure your environment.

Talk to ORBIT from the CLI

pip install schmitech-orbit-client

# Point to a running ORBIT instance (defaults to http://localhost:3000)
orbit-chat
orbit-chat-cli.mp4

Using the orbit-chat CLI. Run orbit-chat -h for options.

Spin up the React Chat app

cd clients/chat-app
npm install
npm run dev
orbit-chat-ui.mp4

Chatting with ORBIT using the React client.

Next steps

  • Create an API key tied to the adapter you want to expose (./bin/orbit.py key create).
  • Enable or customize adapters in config/adapters.yaml and redeploy to connect new datasources.
  • Skim the docs for deep dives on auth, configuration, and deployment patterns.

Why ORBIT

  • Run securely with your data thanks to first-class support for on-prem hardware, air-gapped installs, and strict authentication defaults.
  • Mix and match models (local, hosted, or API) through a single contract without rewriting downstream apps.
  • Production-ready RAG with adapters for SQL, vector databases, and pipelines that keep context fresh.
  • Dev-friendly tooling including a CLI, SDKs, React widget, and language clients maintained in this repo.

Built for

  • Platform & infra teams who need a stable control plane for LLM workloads.
  • Product teams shipping AI copilots that depend on reliable retrieval and guardrails.
  • Researchers & tinkerers exploring local-first stacks or evaluating different foundation models.

Have a story or feature request? Open an issue or add it to the Roadmap.


Architecture Overview

ORBIT Architecture
Click to learn more about the Core Components

Core Components

ORBIT Server (/server/): FastAPI-based inference middleware

  • Inference Layer: Supports multiple LLM providers (OpenAI, Anthropic, Cohere, Ollama, etc.) via unified interface
  • RAG System: Retrieval-Augmented Generation with SQL and Vector DB adapters (file-based / multimodal retrieval underway, it will be available in release 2.0.0)
  • Authentication: PBKDF2-SHA256 with bearer tokens, MongoDB-backed sessions
  • Fault Tolerance: Circuit breaker pattern with exponential backoff for provider failures
  • Content Moderation: Multi-layered safety with LLM Guard and configurable moderators

Configuration (/config/): YAML-based modular configuration

  • Main config in config.yaml with environment variable support
  • Separate configs for adapters, datasources, embeddings, inference, moderators, and rerankers
  • Dynamic loading with validation and resolver system

Client Libraries:

  • React-based chat application with Zustand state management
  • Embeddable chat widget with theming support
  • Node.js and Python API client libraries

Dependencies

  • MongoDB (Required): Authentication, RAG storage, conversation history
  • Redis (Optional): Caching layer
  • Vector DBs (Optional): Chroma, Qdrant, Pinecone, Milvus for semantic search
  • SQL DBs (Optional): PostgreSQL, MySQL, SQLite for structured data retrieval

What Can You Build with ORBIT?

ORBIT uses a flexible adapter architecture to connect your data to AI models. An API key is tied to a specific adapter, effectively creating a specialized "agent" for a certain task. Here are a few examples:

Scenario 1: Knowledge Base Q&A

Provide instant, semantically-aware answers from a knowledge base. Perfect for customer support or internal documentation.

Sample Questions:

  • "What are the summer camp programs for kids?"
  • "How do I register for the contemporary dance class?"

NOTE: You need an instance of MongoDB to enable adapters

Setup the sample SQLite Database with Q/A records about a municipality.

Here's the Sample Q/A datasets for this example. The knowledge base corresponds to a municipal services assistant.

Set inference_only mode to false in config/config.yaml:

inference_only: false

Enable the adapter in config/adapters.yaml:

- name: "qa-sql"
  enabled: true
  type: "retriever"
  datasource: "sqlite"
  adapter: "qa"
  implementation: "retrievers.implementations.qa.QASSQLRetriever"

Restart ORBIT:

./bin/orbit.sh start --delete-logs

Generate sample data and API Key (Default SQLite DB in examples/sqlite/sqlite_db):

#Login as admin first. Default password is admin123. You should change after installing ORBIT.
./bin/orbit.sh login

# Set up SQLite database with Q&A data.
./examples/sample-db-setup.sh sqlite

Start chatting with your new key:

orbit-chat --url http://localhost:3000 --api-key YOUR_API_KEY
city-chat.mp4

Setting up the sample SQLite Q/A dataset

Scenario 2: Chat with Your SQL Database

Ask questions about your data in natural language and get answers without writing SQL.

Sample Questions:

  • "Show me all users from Toronto"
  • "What are the top 10 users by age?"
  • "Find users created in the last month"

Quick Start with Contact Example

Install Ollama and pull the nomic-embed-text:latest embedding model. Also pull a model of choice for inference purposes.

ollama pull nomic-embed-text:latest
ollama pull gemma3:12b

Enable the contact domain sample adapter in /config/adapters.yaml:

- name: "intent-sql-sqlite-contact"
  enabled: true
  type: "retriever"
  datasource: "sqlite"
  adapter: "intent"
  implementation: "retrievers.implementations.intent.IntentSQLiteRetriever"
  inference_provider: "ollama"
  model: "gemma3:12b"
  embedding_provider: "ollama"

Start ORBIT:

./bin/orbit.sh start --delete-logs

Create an API Key for this adapter:

# Login admin credentials
./bin/orbit.sh login

# Create an API key for the SQL intent adapter
./bin/orbit.py key create \
  --intent-sql-sqlite-contact \
  --name "Contact Adapter Demo" \
  --notes "Demo using SQLite" \
  --prompt-file examples/prompts/contact-assistant-prompt.txt

# Generate sample data
python ./utils/sql-intent-template/examples/sqlite/contact/generate_contact_data.py \
  --records 500 \
  --output ./examples/sqlite/sqlite_db \
  --clean

# Test data exists
sqlite3 examples/sqlite/sqlite_db 'SELECT * FROM users LIMIT 5;'

# Start chatting with your new key
orbit-chat --url http://localhost:3000 --api-key YOUR_API_KEY
contact-chat.mp4

Testing the SQL Intent Adapter using the ORBIT CLI tool

Looking for more samples? Browse the examples/ directory for data loaders, prompts, and client integrations you can adapt.


Support the Project

Your support keeps ORBIT independent and focused on open-source innovation.

  • ⭐ Star the repo to signal that ORBIT matters to you.
  • 📣 Share a demo, blog, or tweet so other builders discover it.
  • 🐛 Open issues and PRs—your feedback directly shapes the roadmap.
GitHub stars Star History Chart

Documentation

For more detailed information, please refer to the official documentation.

Full API Reference

ORBIT provides a RESTful API for programmatic access. The full API reference with examples is available at /docs (Swagger UI) when the server is running.

Core Chat & Inference

  • POST /v1/chat - MCP protocol chat endpoint (JSON-RPC 2.0 format)
  • GET /health - Overall system health

Authentication

  • POST /auth/login - User authentication
  • POST /auth/logout - End session
  • GET /auth/me - Get current user info
  • POST /auth/register - Register new user
  • POST /auth/change-password - Change user password

API Key Management (Admin)

  • GET /admin/api-keys - List API keys
  • POST /admin/api-keys - Create new API key
  • DELETE /admin/api-keys/{api_key} - Delete API key
  • POST /admin/api-keys/deactivate - Deactivate API key
  • GET /admin/api-keys/{api_key}/status - Get API key status

System Prompts (Admin)

  • GET /admin/prompts - List system prompts
  • POST /admin/prompts - Create system prompt
  • PUT /admin/prompts/{prompt_id} - Update system prompt
  • DELETE /admin/prompts/{prompt_id} - Delete system prompt

Health & Monitoring

  • GET /health - System health overview
  • GET /health/adapters - Adapter health status
  • GET /health/embedding-services - Embedding service status
  • GET /health/mongodb-services - MongoDB connection status
  • GET /health/ready - Readiness check
  • GET /health/system - System resource usage

File Management (Experimental)

  • POST /upload - Single file upload
  • POST /upload/batch - Batch file upload
  • GET /info/{file_id} - File information
  • DELETE /{file_id} - Delete file
  • GET /status - File system status

Community & Support

License

Apache 2.0 - See LICENSE for details.

About

An adaptable, open-source context-aware inference engine designed for privacy, control, and independence from proprietary models.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published