


from crewai import Agent, Task, Crew, Process
# Define your agents
researcher = Agent(
role="Senior Research Analyst",
goal="Find accurate, recent information",
backstory="Meticulous researcher",
verbose=True
)
writer = Agent(
role="Content Writer",
goal="Create engaging content",
backstory="Write for busy professionals",
verbose=True
)
editor = Agent(
role="Editor",
goal="Polish content for publication",
backstory="Catch what others miss",
verbose=True
)
# Execute
crew = Crew(
agents=[researcher, writer, editor],
tasks=[research_task, writing_task, editing_task],
process=Process.sequential
)
result = crew.kickoff(inputs={"topic": "AI agents"})from langgraph.graph import StateGraph, START, END
from typing import TypedDict
class AgentState(TypedDict):
question: str
analysis: str
data: list
recommendation: str
def analyze_question(state):
llm = ChatOpenAI(model="gpt-4o")
response = llm.invoke(f"Break down: {state['question']}")
return {"analysis": response.content}
def gather_data(state):
# Call actual data sources
return {"data": [response.content]}
def synthesize(state):
# Provide recommendation
return {"recommendation": response.content}
# Build graph
workflow = StateGraph(AgentState)
workflow.add_node("analyze", analyze_question)
workflow.add_node("gather", gather_data)
workflow.add_node("synthesize", synthesize)
workflow.add_edge(START, "analyze")
workflow.add_edge("analyze", "gather")
workflow.add_edge("gather", "synthesize")
workflow.add_edge("synthesize", END)
app = workflow.compile()
result = app.invoke({"question": "Should we expand?"})
from google.adk import Agent, Tool
@Tool
def get_weather(city: str) -> str:
"""Get current weather for a city."""
return f"Weather in {city}: 22°C, Sunny"
# Create agent
agent = Agent(
name="assistant",
model="gemini-2.0-flash",
tools=[get_weather],
instruction="Help with weather queries."
)
# Run
response = agent.run("Weather in Mumbai?")
print(response)"What's the 10x improvement?"


You have 48 hours. Clock starts now.