Skip to main content

LLM Guardrails tailored to your Principles

PyPI Version Python Versions GitHub License

Overview

Orbitals is a lightweight Python library for adding LLM guardrails in just a few lines of code. With Orbitals, you can add a governance layer tailored to user-specific principles. Rather than enforcing generic notions of safety, compliance, and correctness, Orbitals validates inputs (e.g., user requests) and outputs (e.g., assistant responses) against user-defined specifications and custom policies. This makes guardrails explicit, auditable, and aligned with the user's philosophy.

Key Features

  • User-defined specifications — Guardrails that match your use case and your custom policies, not generic safety rules
  • Simple integration — Add guardrails with minimal code changes
  • Open framework, open models — Orbitals is open-source and is a simple interface for our open models

Getting started

Installation

You can install Orbitals via pip:

pip install orbitals[all]

Basic Usage

Here's a quick example to get you started with Orbitals, in which we use the ScopeGuard module to guard an AI service (for example, a customer support chatbot) from user requests that violate specified principles or fall outside of the scope of the core task of the assistant.

from orbitals.scope_guard import ScopeGuard

ai_service_description = "You are a helpful assistant for ..."
user_message = "Can I buy ..."

guardrail = ScopeGuard()
result = guardrail.validate(
    user_message, ai_service_description=ai_service_description
)

The result of a guardrail validation will indicate whether the input or output passed the guardrail checks, along with details on any violations. You can then handle violations as needed, such as by rejecting the input or modifying the output. For example:

if result.scope_class.value == "Restricted" or result.scope_class.value == "Out of Scope":
    print("Request violates guardrail:", result.evidences)
else:
    # The user request is safe!
    # We can now pass it to the AI assistant for processing.
    ...

Available Guardrails

Orbitals currently provides the following guardrail modules:

Guardrail Description Hosting Options
ScopeGuard Classifies user queries against AI assistant specifications to detect out-of-scope requests, policy violations, and chit-chat Self-hosted / Cloud hosting
ScopeGuard V2 Next-generation ScopeGuard with structured AI service descriptions and new scope classes for predefined answers and human escalation, plus reasoning and suggested responses Cloud hosting (API-only for now; models currently private)
ClaimExtractor Extracts atomic, decontextualized claims (Factoid, Capability, User Assertion, Unverifiable) and user intents from a conversation, with optional verbatim evidences — a building block for fact-checking, hallucination detection, intent routing, and response auditing Self-hosted / Cloud hosting
🚀 Coming Soon More guardrails are on the way — stay tuned for updates! —

Hosting Options

  • Self-hosted: Use open-weight models that you can deploy on your own infrastructure, ensuring data privacy and control.
  • Cloud hosting: (Coming soon) Managed hosting options for ease of use and scalability

Documentation

For detailed documentation, including installation instructions, usage guides, and API references, please visit the Orbitals Documentation.

FAQ

  • Can I use Orbitals for commercial applications?
    Yes, Orbitals is designed to be used in both research and commercial applications. It is licensed under the Apache 2.0 License, which allows for commercial use.
  • Other questions?
    Feel free to reach out to us at orbitals@principled-intelligence.com!

Contributing

We welcome contributions from the community! If you'd like to contribute to Orbitals, please check out our Contributing Guide for guidelines on how to get started.

License

This project is licensed under the Apache 2.0 License. See the LICENSE file for details.

Contact

For questions, feedback, or support, please reach out to us at orbitals@principled-intelligence.com.


Built with ❤️ by Principled Intelligence
Follow us on LinkedIn for the latest updates.

Metadata

Release files for orbitals 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for orbitals 0.5.0
File Size Uploaded
orbitals-0.5.0.tar.gz 1.6 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for orbitals 0.5.0
File Interpreter ABI Platform
orbitals-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 1.7 MB

Release files / orbitals-0.5.0.tar.gz

Download URL orbitals-0.5.0.tar.gz
Size 1.6 MB
Tags Source
SHA-256 checksum
How to use checksums
0b5b01d3096f61a756d8a18531f1c7108ebc790136a83f81a277d29fb8455a79
BLAKE2b-256 checksum
How to use checksums
a8ee830b19c9942008d234264458c202656ce5e3fceb3aa97b0e1e59522570a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / orbitals-0.5.0-py3-none-any.whl

Download URL orbitals-0.5.0-py3-none-any.whl
Size 80.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d001d83971879fc5dade857947fb77fe7acaa7077913ad0cc42ecb667267be56
BLAKE2b-256 checksum
How to use checksums
fc24e250559c7ad392abced968998cebf0832749234fd64a0953df8504cd1dee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.15 {"installer":{"name":"uv","version":"0.12.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page