Agentflow is a powerful yet user-friendly tool to run workflows powered by LLMs. You can:
Agentflow fills the gap between chat and autonomous interfaces:
Agentflow offers a balanced solution: Workflows that LLMs follow step-by-step.
Agentflow is currently in development. To try it:
.env
file from example.env and add your OpenAI API key.pip install -r requirements.txt
to install dependencies.Now you can run flows from the command line, like this:
python -m run --flow=example
variables
to pass variables to your flowpython -m run --flow=example_with_variables --variables 'market=college students' 'price_point=$50'
v
(verbose) to see task completion in real-timepython -m run --flow=example -v
Copy example.json or example_with_variables.json or create a flow from scratch in this format:
{
"system_message": "An optional message that guides the model's behavior.",
"tasks": [
{
"action": "Instruct the LLM here!"
},
{
"action": "Actions can have settings, including function calls and temperature, like so:",
"settings": {
"function_call": "save_file",
"temperature": 0.5
}
},
{
"action": "..."
}
]
}
Copy save_file.py and modify it, or follow these instructions (replace "function_name" with your function name):
function_name.py
in the functions folder.FunctionName
that inherits from BaseFunction
.get_definition()
and execute()
in the class. See descriptions of these in BaseFunction
.That's it! You can now use your function in function_call
as shown above. However, you should probably:
Agentflow is licensed under the MIT License.