- Home
- Design & Media
- AdalFlow
Rating
Votes
0
score
Downloads
0
total
Price
Free
API key required
Works With
About
-->
⚡ AdalFlow is a PyTorch-like library to build and auto-optimize any LM workflows, from Chatbots, RAG, to Agents. ⚡
AdalFlow proudly powers AdaL CLI — The AI coding agent
View Documentation Models | Retrievers | Agents | LLM evaluation | Trainer & Optimizers -->
For AI researchers, product teams, and software engineers who want to learn the AI way.
-->
AdalFlow is a PyTorch-like library to build and auto-optimize any LM workflows, from Chatbots, RAG, to Agents.
-->
-->
-->
Why AdalFlow
- 1.100% Open-source Agents SDK: Lightweight and requires no additional API to setup
`Human-in-the-LoopandTracing` Functionalities. - 2.Say goodbye to manual prompting: AdalFlow provides a unified auto-differentiative framework for both zero-shot optimization and few-shot prompt optimization. Our research,
`LLM-AutoDiffandLearn-to-Reason Few-shot In Context Learning`, achieve the highest accuracy among all auto-prompt optimization libraries. - 3.Switch your LLM app to any model via a config: AdalFlow provides
Model-agnosticbuilding blocks for LLM task pipelines, ranging from RAG, Agents to classical NLP tasks.
-->
-->
View Documentation
Quick Start
Install AdalFlow with pip:
pip install adalflowHello World Agent Example
from adalflow import Agent, Runner
from adalflow.components.model_client.openai_client import OpenAIClient
from adalflow.core.types import (
ToolCallActivityRunItem,
RunItemStreamEvent,
ToolCallRunItem,
ToolOutputRunItem,
FinalOutputItem
)
import asyncio
# Define tools
def calculator(expression: str) -> str:
"""Evaluate a mathematical expression."""
try:
result = eval(expression)
return f"The result of {expression} is {result}"
except Exception as e:
return f"Error: {e}"
async def web_search(query: str="what is the weather in SF today?") -> str:
"""Web search on query."""
await asyncio.sleep(0.5)
return "San Francisco will be mostly cloudy today with some afternoon sun, reaching about 67 °F (20 °C)."
def counter(limit: int):
"""A counter that counts up to a limit."""
final_output = []
for i in range(1, limit + 1):
stream_item = f"Count: {i}/{limit}"
final_output.append(stream_item)
yield ToolCallActivityRunItem(data=stream_item)
yield final_output
# Create agent with tools
agent = Agent(
name="MyAgent",
tools=[calculator, web_search, counter],
model_client=OpenAIClient(),
model_kwargs={"model": "gpt-4o", "temperature": 0.3},
max_steps=5
)
runner = Runner(agent=agent)Don't lose this
Three weeks from now, you'll want AdalFlow again. Will you remember where to find it?
Save it to your library and the next time you need AdalFlow, it’s one tap away — from any AI app you use. Group it into a bench with the rest of the team for that kind of task and you can pull the whole stack at once.
⚡ Pro tip for geeks: add a-gnt 🤵🏻♂️ as a custom connector in Claude or a custom GPT in ChatGPT — one click and your library is right there in the chat. Or, if you’re in an editor, install the a-gnt MCP server and say “use my [bench name]” in Claude Code, Cursor, VS Code, or Windsurf.
a-gnt's Take
Our honest review
AdalFlow: The library to build & auto-optimize LLM applications. Best for anyone looking to make their AI assistant more capable in design & media. It's completely free and works across most major AI apps. This one just landed in the catalog — worth trying while it's fresh.
Tips for getting started
Tap "Get" above, pick your AI app, and follow the steps. Most installs take under 30 seconds.
Heads up: this needs an API key to work. You'll get one from the service's website (usually free). The setup guide tells you exactly where.
What's New
Imported from GitHub
Ratings & Reviews
0.0
out of 5
0 ratings
No reviews yet. Be the first to share your experience.