Mirascope

A unified interface for calling frontier models and building tool-using agents with structured outputs.

Stars
★ 1.5k
Last updated
1d ago v2.8.2
FARS reviewed
Nov 08, 2026
License
MIT
Primary language
Python

At a glance

How it runs
Library / SDKFramework
Works with
Universal · cross-platformClaude API
Cost
Free software; you pay for model usage
Setup effort
Low · running in minutes
You'll need
Pythonuvprovider API credentialsShell / CLINetwork access
Typical use
A Python developer who wants one decorator-based interface for model calls instead of embedding provider-specific SDK calls throughout business functions.
Not a fit if
  • Users wanting a ready-made chat UI instead of writing code
  • Teams needing built-in tool sandboxing and permission isolation
Website
mirascope.com ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-12-02latest release v2.8.2 (2026-10-22)

What does this agent do, and when should you use it?

Mirascope is an MIT-licensed Python and TypeScript monorepo that presents a unified programming interface for frontier LLMs. Its Python API turns ordinary functions into model calls with @llm.call and can constrain and parse responses through Pydantic models. Developers register callable functions with @llm.tool, then drive tool execution through response.tool_calls, execute_tools(), and resume(). The project also states support for streaming, async execution, and multi-turn conversations, although those workflows are not detailed in the supplied quick start. It is an application library rather than a documented standalone chat deployment, and the repository also contains a website and unified cross-language documentation.

An application defines a Python function decorated with @llm.call("provider/model"); the string returned by that function becomes the model request, and invoking the function returns a response object. Supplying a Pydantic type such as format=Book lets the application call .parse() to obtain a typed structured result. A function decorated with @llm.tool can be passed through tools=[...]; the application inspects response.tool_calls, runs local functions with response.execute_tools(), and submits their results back through response.resume(...) until no tool calls remain. The monorepo provides Python and TypeScript implementations and examples. For repository development, bun run website:dev launches the documentation site, while bun run ci runs spelling checks, Python and TypeScript linting and type-checking, and the documentation build.

  1. A Python developer who wants one decorator-based interface for model calls instead of embedding provider-specific SDK calls throughout business functions.
  2. A backend team that needs model responses parsed into Pydantic entities such as books, tickets, or other domain records.
  3. An agent developer who wants to expose existing Python functions as model tools while retaining explicit control over execution and continuation.
  4. A team evaluating streaming, asynchronous, or multi-turn model interactions through an application library.
  5. An engineering organization with both Python and TypeScript services that wants to evaluate implementations in both languages with shared documentation.

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • uv add "mirascope[all]"

How do you install or deploy this agent?

Run this in a Python project:

uv add "mirascope[all]"

This requires Python and uv. Calling a hosted model also requires network access and credentials for the selected provider, but the supplied material does not specify credential names, environment variables, or supported Python versions. Bun is explicitly required only for developing the documentation website.

How do you use this agent?

Start with:

from mirascope import llm

@llm.call("anthropic/claude-sonnet-4-5")
def recommend_book(genre: str):

return f"Recommend a {genre} book."
response = recommend_book("fantasy")
print(response.text())

For structured output, define a Pydantic BaseModel, pass it as format, and call .parse(). For tools, decorate a function with @llm.tool, register it through tools=[get_available_books], and process while response.tool_calls: with response.resume(response.execute_tools()). Provider credentials must be configured before the first request, but the source does not document the exact Anthropic credential setup.

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

FARS trust-control audit

Not found in source — apply before daily use
  • rollback or recovery path — Back up first, or work on a git branch or snapshot, so its changes can be undone.

What are this agent's strengths and limitations?

Pros
  • The @llm.call abstraction provides a single model-call interface, and the project explicitly describes support for any frontier LLM.
  • Structured outputs integrate directly with Pydantic and expose a clear .parse() step.
  • The application retains visible control of the tool loop through tool_calls, execute_tools(), and resume().
  • The monorepo contains both Python and TypeScript implementations plus unified cross-language documentation.
  • The documented scope extends beyond basic calls to streaming, async, and multi-turn conversations.
Limitations
  • The quick start shows only an Anthropic model identifier and does not enumerate other provider adapters or their configuration.
  • The supplied material does not document credential variable names, retries, timeouts, rate limits, or failure handling.
  • Tools execute through application functions, leaving permissions, isolation, and side-effect controls to the adopter.
  • The Python command installs the [all] extra, but its contents and a minimal dependency option are not explained.
  • A TypeScript implementation is present, but no TypeScript installation command or first invocation is included.

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
Mirascope This agent 50 · Major gaps Library / SDKFree + model costs ★ 1.5k 1d ago Python Claude API
TanStack AI 60 · Some gaps Library / SDKFree + model costs ★ 3.4k 1d ago TypeScript OpenAI API · Claude API
Strands Agents 60 · Some gaps Library / SDKFree + model costs ★ 9.4k today TypeScript OpenAI API · Claude API
Composio 60 · Some gaps Library / SDKFree + model costs ★ 31k today TypeScript Claude Code · OpenAI API · Claude API

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Major gaps
50/ 100 5-point scale 2.5 / 5
Trust 10/29
Reliability 8/14
Adaptability 9/18
Convention 11/18
Effectiveness 7/13
Verifiability 5/8
Why each dimension lost points
Trust10 / 29 · 1.7/5

The examples show LLM calls and a tool execution loop, but do not show permission constraints, per-action user confirmation, or recovery from side effects, so least privilege, confirmation, and external-effect control are weakly evidenced. The README describes a unified interface without explaining data flows or a sensitive-data policy. Test configuration loads keys from .env and filters listed sensitive request headers before recording, supporting a score of 2 for sensitive-data handling. No dependency audit or mitigation evidence is supplied. Source attribution is limited, and maintenance ownership or update responsibility is not clear.

Reliability8 / 14 · 2.9/5

The README, root scripts, and CI broadly agree on the Python, TypeScript, and website split. CI configures linting, type checking, and tests across languages, but this is configuration evidence and does not establish successful execution. Lockfile checking and frozen-lockfile installs cover parts of dependency management, so availability safeguards are incomplete. The API documentation generator catches exceptions, prints an error, and returns a failure status, supporting ordinary diagnosis; broader user recovery guidance is not shown.

Adaptability9 / 18 · 2.5/5

The README targets developers using a unified interface and demonstrates ordinary calls, structured output, and a tool loop; the TypeScript entry example also shows tracing configuration. Capability boundaries, tool-use risks, and unsupported cases are only lightly described. Invocation is primarily explicit through decorators or API definitions, making the basic trigger clear, though evidence for automation or boundary controls is limited. The repository separates Python, TypeScript, website, and documentation, and labels TypeScript alpha, showing some attention to environment fit.

Convention11 / 18 · 3.1/5

The README covers quick start, repository structure, development, and CI. AGENTS.md identifies itself as coding-assistant context and contributor guidance, not product runtime instructions; the information architecture is clear. Installation notes and examples cover calls, structured output, and tool use. The MIT license text is complete, and semantic versioning and a monorepo version are visible, but no changelog is supplied. Known limitations are only lightly documented, including the TypeScript alpha label; maintenance ownership and a clear update path are not shown.

Effectiveness7 / 13 · 2.7/5

Quick-start examples provide reusable code for calls, parsing, and tool execution, making outputs useful to developers. A unified multi-provider interface and decorator API show a discernible marginal benefit. Cost-benefit evidence is limited: the all-extras install option and multiple runtimes and providers may add setup cost, while the packet gives no deployment-cost, performance, or benefit comparison.

Verifiability5 / 8 · 3.1/5

The main product and workflow claims have corresponding evidence in the README, exported entry points, package configuration, and CI workflow. These sources corroborate the monorepo language split, installation path, and configured checks; CI configuration does not prove checks passed. Explicit statements remain distinguishable from reviewer inference, and neither badges nor publisher identity are treated as proof.

Risks and how to mitigate them
  • Not found in source: rollback or recovery pathBack up first, or work on a git branch or snapshot, so its changes can be undone.
  • The tool example executes model-returned tool calls; review tool side effects, permissions, and confirmation flows in your integration.
  • Test configuration allows .env to override environment variables. Protect test credentials, and note that VCR filtering covers only the listed request headers.
Evidence confidence: Low Reviewed Nov 08, 2026 Reviewed revision 0337c63a81b8 New commits since this review; the score may not cover them
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/mirascope.svg)](https://followagents.com/en/agents/mirascope)
<a href="https://followagents.com/en/agents/mirascope"><img src="https://followagents.com/badge/mirascope.svg" alt="FARS review"></a>

Recent releases

Latest entries from the project's GitHub Releases. Notes are quoted from upstream as written, not rewritten or tested by FollowAgents.

  1. v2.8.2
    Release notes excerpt
    Fixes - Keep OpenAI streamed tool calls separate when providers omit or reuse their index; handle failed and incomplete Responses streams, refusals, and strict structured output more reliably. - Improve Anthropic error and finish-reason mapping, and prevent a tool cache breakpoint from leaking into later requests. - Correct Google streamed usage totals and tool-use prompt token accounting; handle empty tool arguments and image refusals. - Refresh MiniMax Flash model suggestions and improve context-length finish reasons in instrumentation. …
    View on GitHub ↗
  2. v2.8.1
    Release notes excerpt
    Fixes - Correct Anthropic streamed input token totals to include cache reads and writes. - Keep cumulative and partial stream usage events accurate in Python and TypeScript. Thanks to @pcbeingused333 for reporting and starting the fix in #2911. TypeScript remains an alpha release (2.8.1-alpha.0).
    View on GitHub ↗
  3. v2.8.0
    Release notes excerpt
    What's Changed - Add API Route as an OpenAI-compatible provider in Python and the TypeScript alpha. - Support adaptive thinking and effort for newer Claude models in both SDKs. - Keep parallel tool calls separate when OpenAI-compatible streams omit a tool-call index, in both SDKs. - Preserve Google streaming finish reasons and token usage from chunks without content, including usage-only chunks without a candidate. - Preserve Annotated and Field constraints in tool schemas without changing callable parameter names. …
    View on GitHub ↗

FAQ

Does Mirascope include the cost of model usage?
No pricing arrangement is documented. Calls depend on external model providers, so pricing and quotas are determined by the selected provider.
Which credentials are required?
Credentials for the chosen model provider are required. The example selects anthropic/claude-sonnet-4-5, but the supplied material does not name the credential variable or configuration procedure.
Are tool calls completed automatically?
Not as a completely hidden single step in the example. Application code checks response.tool_calls, invokes execute_tools(), and calls resume() until the tool loop ends.
Can it be deployed directly as a chat service?
The material presents Mirascope as a library embedded in an application. It does not provide a standalone chat server, container image, or production deployment command.
Is TypeScript supported?
Yes, the repository explicitly contains a TypeScript implementation and examples, but the supplied material does not show its installation or usage syntax.
Was this page helpful?
View on GitHub ↗ Install ↓

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts