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.3/orbit-1.5.3.tar.gz -o orbit-1.5.3.tar.gz
tar -xzf orbit-1.5.3.tar.gz
cd orbit-1.5.3

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

# Start the ORBIT server
source venv/bin/activate
./bin/orbit.sh start # Logs: ./logs/orbit.log

Keep an eye on the logs, then browse to http://localhost:3000 to confirm your instance is responding.

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.

#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
orbit-example-sqlite.mp4

Setting up the sample SQLite Q/A dataset

Testing with the node client:

# Test using node client
cd clients/node-api
npm install
npm run build
npm run test-query-from-pairs ../../examples/city-qa-pairs.json "http://localhost:3000" "your-api-key" 5 134444
npm-city-example.mp4

Testing the Q/A Adapter using the node API client

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 orders from John Smith"
  • "What are the top 10 customers by order value?"
# Set up PostgreSQL with a sample schema and data
cd examples/postgres

# Update with  your connection parameters
cp env.example .env

# Test connection
python test_connection.py

# Create the DB
python setup_schema.py

# Install faker to generate synthetic data
pip install faker

# Add sample data
python customer-order.py --action insert --clean --customers 100 --orders 1000

# Create an API key for the SQL intent adapter.
# Make sure you are logged in as admin if auth is enabled in `/config/config.yaml`.
python bin/orbit.py key create \
  --adapter intent-sql-postgres \
  --name "Order Management Assistant" \
  --prompt-file examples/postgres/prompts/customer-assistant-enhanced-prompt.txt

#make sure the sample SQL intent adapter is enabled in `/config/adapters.yaml`
- name: "intent-sql-postgres"
    enabled: false
    type: "retriever"
    datasource: "postgres"
    adapter: "intent"
    implementation: "retrievers.implementations.intent.IntentPostgreSQLRetriever"
    inference_provider: "ollama"

# Start or restart the server
./bin/orbit.sh start --delete-logs

# Start chatting with your new key
orbit-chat --url http://localhost:3000 --api-key YOUR_API_KEY
intent-example.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

Contributors 4

  •  
  •  
  •  
  •