← all repositories
kennethreitz/simplemind

Swapping LLM vendors should be a one-line affair

Simplemind unifies eight AI providers behind a single, readable Python API that aims to make LangChain feel like overkill.

541 stars Python Language ModelsML Frameworks
simplemind
Not currently ranked — collecting fresh signals.
star history

What it does Simplemind is a unified Python client for eight LLM providers—OpenAI, Anthropic, Gemini, Groq, Ollama, and others. It exposes the same methods whether you are calling GPT-4o, Claude, or a local Llama model: generate_text, generate_data for Pydantic-structured responses, and create_conversation for stateful chat. A Session class lets you lock in defaults so you do not repeat the provider string on every call.

The interesting bit The library is essentially a bet that AI integration is still just HTTP client work, and that most developers need a Kenneth Reitz-style abstraction—readable, minimal, and provider-agnostic—rather than a graph-based orchestration framework. If your use case fits in a script rather than a DAG, this is the appeal.

Key highlights

  • One API shape across eight backends, including Bedrock and xAI.
  • Structured output via Pydantic, handled by Instructor under the hood.
  • Streaming responses via a stream=True flag.
  • A lightweight plugin hook for injecting memory or system context into conversations.
  • Tool-calling support to let models invoke Python functions directly.

Caveats

  • The README demonstrates straightforward completion and chat flows, but complex agent logic or chaining—key LangGraph territory—is absent, so the “replace LangChain” ambition is not yet proven in the docs.
  • The tool-calling example is truncated, leaving its maturity an open question.
  • There is no mention of async interfaces, retries, or error-handling strategy.

Verdict Ideal for developers who want to hit multiple LLM APIs from Python without framework fatigue; avoid if you are building multi-step agent pipelines that need built-in observability.

Frequently asked

What is kennethreitz/simplemind?
Simplemind unifies eight AI providers behind a single, readable Python API that aims to make LangChain feel like overkill.
Is simplemind open source?
Yes — kennethreitz/simplemind is open source, released under the Apache-2.0 license.
What language is simplemind written in?
kennethreitz/simplemind is primarily written in Python.
How popular is simplemind?
kennethreitz/simplemind has 541 stars on GitHub.
Where can I find simplemind?
kennethreitz/simplemind is on GitHub at https://github.com/kennethreitz/simplemind.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.