skillfed

guardrails-ai-types

Offical Guardrails AI Types

guardrails-ai-types v0.5.0 122.8K downloads/30d#11,934 on PyPI2
Permissive 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) Active released

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-types

uv

uv add guardrails-ai-types

poetry

poetry add guardrails-ai-types

Installing 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

guardrails ai typesllm output validation typesguarded chat completionsguardrails api client typespydantic types for guardrailsvalidation outcome typesguard configuration types
llm-safetytypes-and-validationguardrails

More Artificial Intelligence packages