Define the yaml schema as use the model name registered
agent_yaml = """
apiVersion: flo/alpha-v1
kind: FloRoutedTeam
name: invite-handler
team:
name: Personal-Assistant-Bot
router:
name: Personal-Assistant
kind: supervisor
model: silver
agents:
- name: EmailFriends
job: You job is to send an invite to the christmas party at my house to my friends and friends only, not collegues, invite their spouses too. Keep the email warm and friendly.
role: personal ai assistant
model: bronze
tools:
- name: SendEmailTool
- name: EmailColleagues
job: You job is to send an invite to the christmas party at my house to my colleagues and not friends. Keep the email formal, and DO NOT invite the spouses.
role: office ai assistant
model: gold
tools:
- name: SendEmailTool
"""
This lets you use different models in different agents, here is how this works:
EmailFriends: This agent will use the bronze model, which is in this case gpt35
EmailColleagues: This agent will use the gold model, which in this case is gpt4o
The router Personal-Assistant will use silver model to work with these agents
If you are using code, you can directly pass the model object like below:
blogger = FloAgent.create(
session,
llm=<llm object>
name="BlogWriter",
role="Thought Leader", # optional
job="Able to write a blog using information provided",
tools=[TavilySearchResults()]
)