# ![Ollama logo](https://models.dev/logos/ollama.svg)Ollama Ollama is available through the AI SDK. Install the provider package to use their models with Mastra. For detailed provider-specific documentation, see the [AI SDK Ollama provider docs](https://ai-sdk.dev/providers/community-providers/ollama). To use this provider with Mastra agents, see the [Agent Overview documentation](https://mastra.ai/docs/agents/overview). ## Installation **npm**: ```bash npm install ollama-ai-provider-v2 ``` **pnpm**: ```bash pnpm add ollama-ai-provider-v2 ``` **Yarn**: ```bash yarn add ollama-ai-provider-v2 ``` **Bun**: ```bash bun add ollama-ai-provider-v2 ```