Mirascope/mirascope
The LLM Anti-Framework
What it solves
Mirascope provides a unified interface for interacting with various frontier Large Language Models (LLMs). It simplifies the process of calling LLMs, managing prompts, and integrating tools for agentic behavior, reducing the boilerplate code required to switch between different model providers.
How it works
The library uses a decorator-based approach to define LLM calls. By applying @llm.call, the library handles the communication with the model provider. It supports structured output via Pydantic models, allowing developers to parse the same response into a typed object. It also provides @llm.tool to define functions that the LLM can call, enabling the build of agents that can execute tools and resume conversation turns based on tool outputs.
Who it’s for
Developers building LLM-powered applications who want a consistent API across different model providers and a streamlined way to implement structured data extraction and tool-calling agents.
Highlights
- Unified Interface: Access multiple frontier LLMs through a single, consistent API.
- Structured Output: Native support for Pydantic for easy parsing of model responses into structured data.
- Tool Calling: Simplified tool definition and execution loop for creating AI agents.
- Multi-language Support: Available in both Python and TypeScript.