import asyncio
from definable.agent import Agent
from definable.agent.team import Team, TeamMode
researcher = Agent(
model="gpt-4o",
instructions="You are a research specialist. Gather facts and data on assigned topics.",
)
designer = Agent(
model="gpt-4o",
instructions="You are a UX designer. Create wireframes and design specifications.",
)
developer = Agent(
model="gpt-4o",
instructions="You are a developer. Write implementation plans and code outlines.",
)
team = Team(
name="product-team",
model="gpt-4o",
members=[researcher, designer, developer],
mode=TeamMode.tasks,
max_iterations=10,
instructions="Build a complete product specification for the given feature.",
)
async def main():
result = await team.arun("Design a user onboarding flow for a SaaS product.")
print(result.content)
asyncio.run(main())