Dev Tools

Mirascope: Smaller, Sharper, Easier Than LangChain

All articles
🪞🧰⚙️

The Pydantic-flavoured LLM library you actually want.

If you've been quietly searching for "LangChain but small and typed", Mirascope has been sitting in your search results pretending to be invisible.

The Setup

Mirascope is provider-native: it doesn't abstract OpenAI and Anthropic into a fake common type, it gives you typed decorators per provider with Pydantic response models. The whole library reads like a well-mannered Python package.

{`pip install "mirascope[anthropic]"
# Pick your providers as extras — no bloat.`}

The Money Pattern

Decorate a function, declare a response model, get a typed object back. Streaming, tools, and async are first-class. No Runnable, no LCEL, no DSL pretending to be a pipe.

{`from mirascope.core import anthropic
from pydantic import BaseModel

class Verdict(BaseModel):
    severity: str
    payout_aud: float

@anthropic.call(
    model="claude-sonnet-4-5",
    response_model=Verdict,
)
def triage(claim_notes: str) -> str:
    return f"Decide severity and AUD payout for: {claim_notes}"

v = triage("Cracked skylight, dented gutters, Gold Coast 4217.")
print(v.severity, v.payout_aud)`}

The Catch

The community is small. You won't find 12 YouTube tutorials and a Udemy course — you'll find good docs and a Discord. For some teams that's fine, for others it's a deal-breaker. Pick your tradeoff honestly.

The Verdict

Mirascope is what you'd build if you sat down to design a Python LLM library in 2026 from scratch. Less framework, more function. If PydanticAI ever gets too opinionated, this is where you're going next.

Let us make some quick suggestions?
Please provide your full name.
Please provide your phone number.
Please provide a valid phone number.
Please provide your email address.
Please provide a valid email address.
Please provide your brand name or website.
Please provide your brand name or website.