Async Scala client for the OpenAI API and many other LLM providers, covering chat, responses, streaming, batches, and more.
kennethreitz/simplemind
Python client library that wraps multiple AI provider APIs behind one simple interface for text, structured data, and conversations.
- Stars
- 538
- Forks
- 33
- Open issues
- 8
- Last commit
- 8 days ago
What is it?
Simplemind is a Python library for calling large language model APIs. It offers one consistent set of functions, such as generate_text, generate_data, and create_conversation, that work the same way across providers including Anthropic, OpenAI, Google Gemini, xAI, Groq, DeepSeek, Ollama, Amazon Bedrock, and MiniMax. Switching models is a matter of changing the llm_provider and llm_model arguments.
Beyond plain text generation, the library can return responses as Pydantic models when the chosen model supports structured output, and it supports streaming. Conversations keep message history and can be extended with plugins that run hooks before each send. Tools let models call ordinary Python functions, and a decorator can generate tool schemas automatically using an LLM.
The project positions itself as a lighter alternative to frameworks such as LangChain and LangGraph for common use cases. Session objects let you set default provider and model settings once and override them per call.
Key features
- 01Single API surface for Anthropic, OpenAI, Gemini, xAI, Groq, DeepSeek, Ollama, Bedrock and MiniMax
- 02Structured output into Pydantic models via generate_data
- 03Streaming text generation
- 04Multi-turn conversations with message history and plugin hooks
- 05Function calling with Python functions, plus LLM-generated tool schemas via a decorator
Use cases
- Prototyping an app that needs to compare or switch between several LLM providers
- Extracting structured data from text into typed Python objects
- Building a chatbot or assistant that calls your own Python functions as tools
- Replacing a heavier LangChain-based setup for simple LLM calls
Quick start
- 1
Install the library with its full extras
pip install 'simplemind[full]' - 2
Set your provider API key as an environment variable
export OPENAI_API_KEY="sk-..." - 3
Import Simplemind and start calling it
Things to know
- Most providers require an API key, and many are paid services.
In collections
Topics
FAQ
- What is simplemind?
- Python client library that wraps multiple AI provider APIs behind one simple interface for text, structured data, and conversations. Simplemind is a Python library for calling large language model APIs. It offers one consistent set of functions, such as generate_text, generate_data, and create_conversation, that work the same way across providers including Anthropic, OpenAI, Google Gemini, xAI, Groq, DeepSeek, Ollama, Amazon Bedrock, and MiniMax. Switching models is a matter of changing the llm_provider and llm_model arguments.
- Is simplemind free to use? What license does it have?
- simplemind is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is simplemind still maintained?
- Actively maintained. The last commit to simplemind was on Oct 30, 2026.
- What can I use simplemind for?
- Prototyping an app that needs to compare or switch between several LLM providers Extracting structured data from text into typed Python objects Building a chatbot or assistant that calls your own Python functions as tools Replacing a heavier LangChain-based setup for simple LLM calls
- How do I install simplemind?
- Install the library with its full extras: pip install 'simplemind[full]' Set your provider API key as an environment variable: export OPENAI_API_KEY="sk-..." Import Simplemind and start calling it
- Where can I get simplemind?
- The source code and installation instructions are on GitHub: https://github.com/kennethreitz/simplemind
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A TypeScript-first DSPy-style framework for building typed, structured LLM programs with agents, flows, and optimizers, also compiled to Python, Java, C++, Go, and Rust.
A community-maintained PHP client for the Gemini API, covering text, media, streaming, tools, and file and cache management.
Type-safe, provider-agnostic TypeScript SDK for streaming chat, tool calling, agents, and multimodal apps across major LLM providers and UI frameworks.
A Laravel package for building, tool-equipping and deploying LLM-powered AI agents with persistent memory, tracing and a web dashboard (now retired; v0.0.48 is final).
A Go command-line tool for querying OpenAI-compatible LLMs from the terminal, generating shell commands, code, and images.