Get started
Last updated
Was this helpful?
Last updated
Was this helpful?
WorkflowAI Python SDK is a library that allows you to programmatically create and run agents in Python, while being able to use the full power of the WorkflowAI platform.
Get your API key from your or from your self-hosted WorkflowAI dashboard.
Set the WORKFLOWAI_API_KEY
environment variable.
An agent is in essence an async function with the added constraints that:
it has a single argument that is a Pydantic model, which is the input to the agent
it has a single return value that is a Pydantic model, which is the output of the agent
it is decorated with the @workflowai.agent()
decorator
The following agent, given a city, returns the country, capital, and a fun fact about the city.
You have created your first agent! Congratulations.
run.workflowai.com
is our
is a very popular and powerful library for data validation and parsing.
Agents created by the SDK are also available in the .
Runs are automatically logged as well from the section.
Let's go through in more detail .