SimpleMind is a Python library that gives you one clean interface to every major AI provider. OpenAI, Anthropic, Google, and others, all through the same API. Switch models by changing a string, not rewriting your code.
$ uv add simplemind
What It Looks Like
import simplemind as sm
# Generate text. Pick your provider.
response = sm.generate_text(
"Explain quantum computing in one paragraph.",
llm_provider="anthropic",
llm_model="claude-sonnet-4-20250514",
)
print(response)
That's the simple case. Here's where it gets interesting:
# Generate structured data with Pydantic.
from pydantic import BaseModel
class Recipe(BaseModel):
name: str
ingredients: list[str]
instructions: list[str]
prep_time_minutes: int
recipe = sm.generate_data(
"Give me a recipe for chocolate chip cookies.",
response_model=Recipe,
llm_provider="openai",
llm_model="gpt-4o",
)
print(recipe.name)
print(recipe.ingredients)
# Conversations with memory.
conversation = sm.create_conversation(
llm_provider="anthropic",
llm_model="claude-sonnet-4-20250514",
)
conversation.add_message("user", "What is the capital of France?")
response = conversation.send()
conversation.add_message("user", "What is its population?")
response = conversation.send() # Remembers we're talking about Paris.
# Sessions for repeated use.
claude = sm.Session(
llm_provider="anthropic",
llm_model="claude-sonnet-4-20250514",
)
response = claude.generate_text("Hello!")
One import. One interface. Every major AI provider.
Plugins
SimpleMind supports a plugin system for extending conversations:
import simplemind as sm
class MemoryPlugin(sm.BasePlugin):
"""Remember facts across conversations."""
def pre_send_hook(self, conversation):
# Inject remembered context before each message.
memory = load_memory()
if memory:
conversation.add_message(
"system",
f"Previously remembered: {memory}",
)
def post_send_hook(self, conversation, response):
# Extract and store facts from the response.
facts = extract_facts(response.text)
save_memory(facts)
conversation = sm.create_conversation(
llm_provider="anthropic",
llm_model="claude-sonnet-4-20250514",
plugins=[MemoryPlugin()],
)
Plugins hook into the conversation lifecycle: before sending, after receiving, on errors. Build memory systems, logging, content filters, or whatever your application needs.
The Philosophy
The AI landscape is fragmented. Every provider has its own SDK, its own conventions, its own way of handling conversations and structured output. If you want to compare models or build provider-agnostic tools, you end up writing adapter code that has nothing to do with your actual problem.
SimpleMind is Requests for the AI era. The same conviction that drove every "for humans" library I've built: if you're spending more time on the interface than on the work, the interface is broken. SimpleMind fixes the interface so you can focus on what you're building.
It's also deeply personal. AI collaboration has become central to how I think and work. The ideas I explore in my writing about consciousness and human-AI partnership are directly informed by the tools I use every day. SimpleMind is one of those tools: built because I needed it, refined because I use it constantly.
Install
$ uv add simplemind
Set your API keys as environment variables:
export OPENAI_API_KEY=sk-...
export ANTHROPIC_API_KEY=sk-ant-...
export GOOGLE_API_KEY=...
Resources
History
simplemind applies the "For Humans" philosophy to AI tooling. Where LangChain gives you a framework that requires understanding chains, agents, tools, memory systems, and dozens of abstractions before you can do anything useful, simplemind gives you a function call. The same instinct that turned urllib2 into requests.get(url) turns the LLM toolchain into sm.generate_text("hello").
AI libraries in 2024 looked like urllib2 in 2011, technically powerful, architecturally sound, and hostile to the person sitting at the keyboard. LangChain required learning an entire abstraction vocabulary. LangGraph demanded graph theory. The common case. "talk to an LLM and get text back", was buried under layers of enterprise scaffolding.
No chains. No agents. No graph theory. Just ask and receive.
Same philosophy, new frontier. Each library takes a domain where developers were fighting the tool and removes the fight. The pattern hasn't changed in thirteen years, only the domain.
simplemind powers the AI collaboration behind Interpretations (24 tracks composed in Python), the pytheory music theory library, and Kenneth's ongoing consciousness research. It's not theoretical, it's the tool he reaches for daily.
Related
- Requests: The original "for humans" library. SimpleMind carries the same philosophy forward.
- Programming as Spiritual Practice: The contemplative approach to building tools.
- The Recursive Loop: How the tools we build shape how we think.
- From HTTP to Consciousness: The through-line from Requests to SimpleMind.