AdalFlow is a Python library to build and auto-optimize LM workflows, including chatbots, RAG, and agents. It provides a PyTorch-like framework with auto-differentiation for prompts and few-shot optimization. Latest releases span 2024-2025; repository shows active updates and documentation links.
Collecting history — the radar snapshots this repo daily. The trend line appears after 3 days of data (1 so far).
What it is
AdalFlow is a PyTorch-like library to build and auto-optimize any LM workflows, from Chatbots, RAG, to Agents.
How it works
The project offers trainable task pipelines defined via Parameter objects passed to a Generator, enabling prompt tuning through textual gradients and few-shot demonstrations. It provides components such as AdalComponent and Trainer to manage training, evaluation, and gradient-based optimization of prompts and demonstrations.
Getting started
Install AdalFlow with pip:
pip install adalflow
The README includes a Hello World Agent Example showing how to define tools (calculator, web_search, counter), construct an Agent with a model client, and run synchronous, asynchronous, and streaming modes. The example imports and uses OpenAIClient from adalflow.components.model_client.openai_client and various RunItem types from adalflow.core.types.
from adalflow import Agent, Runner
from adalflow.components.model_client.openai_client import OpenAIClient
from adalflow.core.types import (
ToolCallActivityRunItem,
RunItemStreamEvent,
ToolCallRunItem,
ToolOutputRunItem,
FinalOutputItem
)
1. Synchronous Call Mode
result = runner.call(
prompt_kwargs={"input_str": "Calculate 15 * 7 + 23 and count to 5"}
)
2. Asynchronous Call Mode
result = await runner.acall(
prompt_kwargs={"input_str": "What's the weather in SF and calculate 42 * 3"}
)
3. Async Streaming Mode
streaming_result = runner.astream(
prompt_kwargs={"input_str": "Calculate 100 + 50 and count to 3"},
)
Set your OPENAI_API_KEY environment variable to run these examples.
Recent releases
Latest 5 releases listed with dates:
- v1.1.3 Release v1.1.3 (2025-09-25): AdalFlow v1.1.3
- v1.1.2 Release v1.1.2 (2025-08-16): AdalFlow v1.1.2
- v1.1.1 Release v1.1.1 (2025-08-10): AdalFlow v1.1.1
- v1.0.5a1 v1.0.5a1 Release (2025-07-17): Add agent, runner, mcp tools and modify generator output
- v0.1.0.beta.1 v0.1.0.beta.1 (2024-07-15): Follow the changelog.md
Traction
Stars: 4189 Forks: 383 Open issues: 68
Behind the repo
The project is linked to SylphAI-Inc and collaborates with institutions such as the VITA Group at UT Austin; no external startup/company page is provided in the data.
Caveats
License: MIT Created: 2024-04-19 Last push: 2026-05-29 Language: Python
Notes:
- The repository describes a unified framework for auto-optimization of LM workflows, including prompt tuning (PROMPT) and few-shot demonstrations (DEMO).
- It presents documentation and Colab quickstart links, and references model providers via a generic model_client interface.






