Favicon of Mirascope

Mirascope

An open-source LLM toolkit with a shared interface for OpenAI, Anthropic and Google, tool calling, and tracing. MIT licensed.

Screenshot of Mirascope website

Mirascope is an open-source toolkit for developers building LLM applications and AI agents in Python or TypeScript. It gives applications a shared interface to model providers, including OpenAI, Anthropic and Google, so developers can work across providers within the same toolkit. It's MIT licensed.

Its approach centers on ordinary application functions. Developers can expose functions as tools that a model can call, then build agents that execute those tools and continue the conversation with the results. This suits applications where an LLM needs access to the application's own actions or data, such as a book recommendation agent querying a library.

The toolkit supports streaming responses, asynchronous calls and multi-turn conversations. Alongside model calls, it includes automatic versioning, tracing and cost tracking. Traces show messages and tool inputs and outputs, with timing, token usage and cost attached to calls. These records let developers inspect what an agent did and compare calls across versions.

Mirascope is a development library rather than a standalone chat app. The provider integrations shown use cloud models, so those calls send prompts to the selected service and need an internet connection. Python and TypeScript implementations share documentation, and the repository includes examples for both languages.

Similar to Mirascope