Bridle
Getting started

Install

Install bridle-ai from PyPI and set up an Anthropic key.

Bridle requires Python 3.11 or newer.

Install

pip install bridle-ai

The PyPI distribution is bridle-ai; the import is bridle.

import bridle
print(bridle.__version__)  # 0.1.0

Set up Anthropic

v0.1.0 ships an Anthropic adapter. Set your key and call install() to register it:

import os
os.environ["ANTHROPIC_API_KEY"] = "sk-ant-..."

from bridle.models.anthropic import install
install()

install() registers the Anthropic adapter as the active model client. Without it, the first step raises ConfigurationError.

Pick a model

Bridle ships zero default models. Choose a default for the process, an agent, or a single call. See model resolution for the full precedence rules.

import bridle
bridle.configure(model="claude-sonnet-4-6")

Verify

A one-line smoke test:

import bridle
from bridle import step
from bridle.models.anthropic import install

install()
bridle.configure(model="claude-sonnet-4-6")

answer: str = step("reply with the single word: ready", schema=str)
print(bridle.resolve(answer))  # "ready"

If this prints ready, you are set up.

Next

On this page