import os
from crewai import Agent, Task, Crew, Process, LLM
llm = LLM(
model="neosantara/gemini-3.8-flash",
api_key=os.environ["NEOSANTARA_API_KEY"]
)
# Define Agents
researcher = Agent(
role="AI Infrastructure Analyst",
goal="Identify emerging trends in Indonesian LLM gateways and routing latency",
backstory="You are an experienced systems researcher specializing in Indonesian AI infrastructure and latency optimization.",
llm=llm,
verbose=True
)
writer = Agent(
role="Technical Content Strategist",
goal="Compose a crisp 2-paragraph briefing based on the research report",
backstory="You are a technical writer who communicates infrastructure concepts clearly and concisely.",
llm=llm,
verbose=True
)
# Define Tasks
task_research = Task(
description="Analyze the key advantages of Indonesia's AI Gateway for local developer teams over US-only endpoints.",
expected_output="A bulleted summary highlighting latency benefits, local billing currency, and Indonesian data guardrails.",
agent=researcher
)
task_write = Task(
description="Write a 2-paragraph technical briefing using the research output.",
expected_output="A 2-paragraph executive briefing ready for publication.",
agent=writer
)
# Assemble and Kick off the Crew
crew = Crew(
agents=[researcher, writer],
tasks=[task_research, task_write],
process=Process.sequential,
verbose=True
)
result = crew.kickoff()
print(result)