Gwenflow is the open-source Python framework by Gwenlake for building applications around AI agents and large language models. It gives you one API over every major LLM provider, an agent that runs tools in a loop until the task is done, and the pieces production needs around it: context management, long-term memory, multi-agent flows, retrieval, tracing and durable execution with Temporal.

Quickstart

Install the library, call a model and run your first agent in five minutes.

Core concepts

LLMs, agents, tools, memory and flows, and how a run moves between them.

Agents

The agentic loop: instructions, tools, history, limits and usage.

Flows

Chain agents and data steps in a DAG, in Python or YAML.

What you can do

OpenAI, Anthropic, Google, Mistral, Azure OpenAI, DeepSeek, Ollama and Gwenlake, with the same invoke / stream methods, the same messages and the same responses. Reasoning and images, audio or PDFs work the same way across providers. See Models, Reasoning and Multi-modal input.
Turn any Python function into a tool, use the built-in ones (web search, Wikipedia, finance, files, shell, Python), connect MCP servers, ask for a structured answer, and pause on sensitive tools until a human approves. See Agents, Tools and Tool approvals.
Give an agent a team of specialists, let it spawn sub-agents on demand, or run a preset coding agent sandboxed to a directory. See Teams, Sub-agents and Coding agent.
The history is measured against the model’s window and compacted in tiers, cheapest first; a markdown memory carries what matters from one conversation to the next. See Context management and Long-term memory.
Describe a pipeline of HTTP calls, readers, databases and agents as a DAG in YAML, run independent branches in parallel, or let an LLM plan the flow for you. See Flows and AutoFlow.
Read PDFs, Office files and websites, split them, index them in a vector store and let the agent retrieve what it needs. See Retrieval (RAG).
Make agents and flows survive crashes and restarts with Temporal, and trace every LLM call, tool call and flow node with OpenTelemetry. See Durable execution and Telemetry.

Get help

The library is open source under the MIT license on GitHub, with runnable scripts in its examples/ directory (see Examples) and a guide for contributors. For questions about Gwenlake’s platform, Gwenlake Atlas, or your account, write to info@gwenlake.com.