from crewai import Agent, Crew, Task
from crewai.a2a import A2AServerConfig
analyst = Agent(
role="News Analyst",
goal="Assess whether news is material to a company",
backstory="Expert at filtering signal from noise in financial news",
llm="gpt-4o",
a2a=A2AServerConfig(
url="https://your-server.com",
port=8000,
),
)
task = Task(
description="Analyze the given news item for the specified company",
expected_output="Salience assessment with rationale",
agent=analyst,
)
crew = Crew(agents=[analyst], tasks=[task])
if __name__ == "__main__":
crew.serve(port=8000)