guardrails-ai-types
Offical Guardrails AI Types
What it is and what it does
guardrails-ai-types is a types package providing Pydantic-based data structures for the Guardrails AI REST client. It defines the core types—Guard, ValidationOutcome, and related structures—needed to interact with the guardrails-api service for validating LLM outputs and creating guarded chat completions. The package serves as the type layer for the guardrails-ai SDK, enabling type-safe Python code when working with remote guardrails services.
The package is actively maintained and has low installation friction, depending only on pydantic. It supports current Python versions (3.10+) and is distributed under the MIT License, making it freely usable in both open-source and commercial contexts.
Use it for:
- Type-checking guardrails client code when validating LLM outputs against remote guard definitions.
- Building type-safe applications that create and manage guarded chat completions with streaming support.
- Defining validation outcomes and summaries when integrating LLM safety checks into production systems.
- Enabling IDE autocomplete and static analysis for guardrails-ai SDK method calls and responses.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type definitions and data structures for the Guardrails AI REST client, enabling type-safe interaction with the guardrails-api service for LLM output validation and guarded chat completions.
Yes, if you are using the guardrails-ai SDK to validate LLM outputs or create guarded chat completions. The package provides essential type definitions with minimal overhead (one pydantic dependency), active maintenance, and permissive licensing. Install it as part of your guardrails-ai setup for type safety and IDE support.
Install
guardrails-ai-types on PyPI
pip
pip install guardrails-ai-typesuv
uv add guardrails-ai-typespoetry
poetry add guardrails-ai-typesInstalling guardrails-ai-types
Before you install
Low friction install with a single runtime dependency on pydantic. Actively maintained with recent commits and releases within the past month.
License in practice
MIT License permits free use, modification, and distribution with minimal restrictions—suitable for both open-source and commercial projects.
Quickstart
pip install guardrails-ai-types
from guardrails_ai.sdk import Guard, ValidationOutcome
# Use imported types in your guardrails client code
guard: Guard = await client.guards.retrieve(name="my-guard")
validation_outcome: ValidationOutcome = await client.guards.validate(name="my-guard", llm_output="Hello, world.")
Requires Python 3.10 or later (supports_current); designed as a types package for use with the guardrails-ai SDK client.
Verify before relying
- Whether this package is intended for direct installation or primarily as a transitive dependency of guardrails-ai-sdk.
- What specific validation rules or guardrail types are included beyond the core Guard and ValidationOutcome classes shown in the excerpt.
Package facts
| License | MIT License Copyright (c) 2024 Guardrails AI Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal… (full text in the JSON record) (permissive) |
| Python support | supports the current Python release (<4,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — pydantic |
| Maintenance | actively maintained — 35 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 122,775/month — #11,934 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: guardrails_ai_types-0.5.0-py3-none-any.whl
Tags
More Artificial Intelligence packages
LiteLLM provides a unified Python interface to…
permissive · top 100 on PyPI
huggingface-hubClient library and CLI tool for downloading,…
permissive · top 100 on PyPI
langchainLangChain provides a framework for building…
permissive · top 1,000 on PyPI
hf-xethf-xet provides chunk-based deduplication and…
permissive · top 1,000 on PyPI
tokenizersTokenizers converts raw text into token…
permissive · top 1,000 on PyPI
transformersTransformers provides a unified framework for…
permissive · top 1,000 on PyPI
guardrails-aiGuardrails is a Python framework that validates…
permissive · top 15,000 on PyPI
guardrails-hub-typesProvides internal data structure definitions…
permissive · top 15,000 on PyPI
nemoguardrailsAdds programmable guardrails to LLM-based…
permissive · top 15,000 on PyPI
openresponses-typesProvides Pydantic models for the OpenResponses…
permissive · top 15,000 on PyPI
datarobot-moderationsEnforces content moderation on LLM prompts and…
unclear · top 15,000 on PyPI
openai-guardrailsAdds configurable safety and compliance…
permissive · top 15,000 on PyPI
flake8-typing-importsA flake8 plugin that detects unguarded typing…
permissive · top 15,000 on PyPI
pydantic-ai-shieldsPydantic AI Shields provides guardrail…
permissive · top 15,000 on PyPI
k8Provides Python type models for Kubernetes…
permissive · top 15,000 on PyPI
llm-guardLLM Guard provides input and output scanning…
unclear · top 15,000 on PyPI