1
Install the library
Gwenflow requires Python 3.11 to 3.13.Optional extras add what some features need:See Installation for the packages each tool and store needs.
2
Set an API key
Each provider reads its key from the environment. For OpenAI:The other providers use
ANTHROPIC_API_KEY, GOOGLE_API_KEY, MISTRAL_API_KEY, DEEPSEEK_API_KEY, GWENLAKE_API_KEY… See Installation for the full list; every client also accepts api_key= directly.3
Call a model
ChatOpenAI for ChatAnthropic, ChatGoogle or any other client: the rest of the code does not change.4
Run an agent with a tool
An agent calls the model, runs the tools it asks for, sends the results back and repeats until the model answers. Any function with type annotations and a docstring becomes a tool:
5
Continue the conversation
The agent keeps its history between runs, so a follow-up question sees the previous answer:
Next steps
Core concepts
How LLMs, agents, tools, memory and flows fit together.
Tools
Function tools, tool classes, retries and the built-in library.
Structured output
Get a validated Pydantic object instead of text.
Examples
Runnable scripts in the repository, by theme.