Create your first assistant: Gardening Assistant¶
First Tutorial Agent Marketplace Research Agent
The DistillerClient
module is a core component of the AI Refinery SDK, specifically engineered to orchestrate and manage complex workflows within AI-driven environments.
Objective¶
Use the SDK to create and run an AI system to provide users with assistance on gardening.
Steps¶
1. Configuration file¶
As a first step, you simply need to create a yaml file with all the required configuration. You can customize your assistant agent in this simple YAML configuration file.
utility_agents:
- agent_class: SearchAgent
agent_name: "Garden Scout"
agent_description:
The Garden Scout can search the Web for relevant gardening information
such as how often plants should be watered, the best watering methods, and
how deep and far apart should seeds be planted
config:
output_style: "conversational"
contexts:
- "chat_history"
orchestrator:
agent_list:
- agent_name: "Garden Scout"
2. Python file¶
Now, you can start the development of your assistant using these few lines of code:
from dotenv import load_dotenv
from air import login, DistillerClient
import os
load_dotenv() # This loads your ACCOUNT and API_KEY from your local '.env' file
login(
account=str(os.getenv("ACCOUNT")),
api_key=str(os.getenv("API_KEY")),
)
distiller_client = DistillerClient()
project = "gardening_project"
distiller_client.create_project(
config_path="config.yaml",
project=project
)
response = distiller_client.interactive(
project=project,
uuid="test_user",
)
Methods¶
login()
¶
Login to the AIR-SDK with the ACCOUNT
and API_KEY
environment variables. Make sure to set these environment variables before running the script above.
account
: Account identifier.api_key
: API key for authentication.
distiller_client.create_project()
¶
Create the project gardening_project using the yaml
file we have defined.
config_path
: Path the configuration file.project
: Project name.
distiller_client.interactive()
¶
Runs the project in an interactive mode with the gardening assistant.
project
: Project Name.uuid
: You username.