import os
from crewai import Agent, Task, Crew, LLM
llm = LLM(
model="zai-org/GLM-5.3-Flash",
base_url="https://api.telnyx.com/v2/ai/openai",
api_key=os.getenv("TELNYX_API_KEY"),
reasoning_effort="high",
)
researcher = Agent(
role="Research Analyst",
goal="Find and analyze information",
backstory="You are an experienced research analyst.",
llm=llm,
)
writer = Agent(
role="Technical Writer",
goal="Write clear, accurate reports",
backstory="You are a skilled technical writer.",
llm=llm,
)
research_task = Task(
description="Research the latest trends in AI infrastructure",
agent=researcher,
)
write_task = Task(
description="Write a summary report based on the research findings",
agent=writer,
)
crew = Crew(agents=[researcher, writer], tasks=[research_task, write_task])
result = crew.kickoff()
print(result)