Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Atlas Guardrails

Atlas Guardrails provides monitoring, observability, and guardrails for Large Language Model interactions. Track, validate, and secure your LLM API calls with minimal — often zero — changes to your existing application code.

  • Observers wrap your LLM client so traffic is monitored automatically, no call-site changes.
  • Guardrails give you explicit guard/observe calls when you want fine-grained control.
  • Blocking mode can enforce policy (rewrite or block non-compliant requests/responses).
  • Traceability correlates inputs and outputs and records processing traces.

Installation

# SDK only
pip install atlas-guardrails

# SDK + the OpenAI client observer
pip install "atlas-guardrails[openai-observers]"

# Pre-release (alpha) build from the develop branch
pip install --pre atlas-guardrails

atlas-guardrails automatically pulls in its companion package atlas-guardrails-core at the same version; both share the atlas_guardrails import namespace.

Editable / development install
git clone git@github.com:Varonis-Systems/Atlas-alltrue-llm-observability.git
cd Atlas-alltrue-llm-observability

# Using uv (recommended — installs the workspace + dev dependencies)
uv sync --extra openai-observers

# Or using pip
pip install -e ".[openai-observers]"

Quickstart

Set your credentials (created in the Atlas application):

export ALLTRUE_API_KEY="<your-api-key>"
export ALLTRUE_ENDPOINT_IDENTIFIER="<your-endpoint-identifier>"

Then monitor every OpenAI chat completion with no changes to your call sites:

import os
from openai import OpenAI
from atlas_guardrails.observers.openai import OpenAIObserver

observer = OpenAIObserver(
    alltrue_api_key=os.environ["ALLTRUE_API_KEY"],
    alltrue_endpoint_identifier=os.environ["ALLTRUE_ENDPOINT_IDENTIFIER"],
    blocking=False,  # monitor only; set True to enforce policy
)
observer.register()

# Your existing code — now observed automatically.
completion = OpenAI().chat.completions.create(
    model="gpt-4o",
    messages=[{"role": "user", "content": "What day is today?"}],
)
print(completion.choices[0].message.content)

observer.unregister()

Prefer explicit validation instead of patching the client? Use ChatGuardrails:

from atlas_guardrails.guardrails.chat import ChatGuardrails, GuardrailsException

guardrails = ChatGuardrails(
    alltrue_api_key=os.environ["ALLTRUE_API_KEY"],
    alltrue_endpoint_identifier=os.environ["ALLTRUE_ENDPOINT_IDENTIFIER"],
)

try:
    guarded = await guardrails.guard_input(["What day is today?"])
except GuardrailsException as exc:
    print(f"Input blocked: {exc}")

Configuration essentials

Setting Constructor arg Env var Required
API key alltrue_api_key ALLTRUE_API_KEY Yes
Endpoint identifier alltrue_endpoint_identifier ALLTRUE_ENDPOINT_IDENTIFIER Yes
API base URL alltrue_api_url ALLTRUE_API_URL No (defaults to the Atlas production endpoint)

Constructor arguments win over environment variables, and a .env file in the working directory is loaded automatically. See the full configuration reference for every option (logging, blocking, batching, timeouts, control directives).

Documentation

  • docs/USAGE.md — full usage guide: observers, guardrails, blocking vs non-blocking, batch mode, control directives, traceability, statistics, and troubleshooting.
  • docs/RELEASING.md — versioning, branching model, and CI/CD.

Features

  • Zero-touch observers for the OpenAI client (sync and async).
  • Explicit guardrails for custom pipelines and non-OpenAI flows.
  • Blocking mode to validate and, if needed, rewrite or block requests/responses.
  • Require-approval (HOLD) flow for human-in-the-loop policies.
  • Traceability via a chat_id plus retrievable processing traces.
  • Processing statistics — per-call cost, latency, and policy outcomes via a collector callback.
  • Batch mode to reduce request volume when monitoring.
  • Async and sync support.

Releasing

atlas-guardrails and atlas-guardrails-core are versioned and published together. Pushes to develop produce alpha pre-releases (pip install --pre atlas-guardrails); the develop → main PR cuts the final release. See docs/RELEASING.md for the full branching model, conventional-commit rules, and CI/CD setup.

License

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

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

atlas_guardrails-0.5.0a1.tar.gz (27.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

atlas_guardrails-0.5.0a1-py3-none-any.whl (31.9 kB view details)

Uploaded Python 3

File details

Details for the file atlas_guardrails-0.5.0a1.tar.gz.

File metadata

  • Download URL: atlas_guardrails-0.5.0a1.tar.gz
  • Upload date:
  • Size: 27.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

File hashes

Hashes for atlas_guardrails-0.5.0a1.tar.gz
Algorithm Hash digest
SHA256 831a72379637f0ad1f6b70788e2f049460986d1a59f9031ef5cc218906a1300c
MD5 3a1bbb8340edc072a37c4510bddadc7a
BLAKE2b-256 2c31b102d1669c1f52283be5ecf9016ce39b23bebe88691a39978a307650d06b

See more details on using hashes here.

File details

Details for the file atlas_guardrails-0.5.0a1-py3-none-any.whl.

File metadata

  • Download URL: atlas_guardrails-0.5.0a1-py3-none-any.whl
  • Upload date:
  • Size: 31.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.12.3 {"installer":{"name":"uv","version":"0.12.3","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}

File hashes

Hashes for atlas_guardrails-0.5.0a1-py3-none-any.whl
Algorithm Hash digest
SHA256 5f8c07f6502561cc2931d6c89e8a75c8c92cb742d525b7b73ccb431270782de2
MD5 5b567cb73cf27b1501b94e2ab3c6d2fe
BLAKE2b-256 097532a4dac5cd76bb77a4cb8f96fa8e2d30cf38b95682550024b59225ceb616

See more details on using hashes here.

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