from crewai import Agent, Task, Crew
researcher = Agent(
role="Research Analyst",
goal="Find accurate, real-time data using ACN services",
backstory="You are a research analyst who uses ACN to access "
"real-time data services. Always check costs before executing.",
tools=[acn_discover, acn_execute, acn_balance],
verbose=True
)
writer = Agent(
role="Content Writer",
goal="Write clear, concise reports based on research data",
backstory="You write reports based on data provided by the research team.",
verbose=True
)
research_task = Task(
description="Get the current prices of Bitcoin, Ethereum, and Solana in USD",
expected_output="A dictionary of cryptocurrency prices",
agent=researcher
)
report_task = Task(
description="Write a brief market summary based on the price data",
expected_output="A 3-paragraph market summary",
agent=writer
)
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, report_task],
verbose=True
)
result = crew.kickoff()