One weather agent, built the way each framework's own documentation builds it. Press play on both and watch what really differs.
Checked against the official docs on 21 November 2026
By Google
An open-source, code-first toolkit for building, evaluating and deploying agents.
pip install google-adkBy CrewAI
An open-source framework built around Crews of role-based agents and event-driven Flows.
uv tool install crewaiWatch it run
Press Play to watch it run, or step through with ← →. Then switch to Practice and run it yourself.
# Google ADK (Python). Install: pip install google-adk
# Needs GOOGLE_API_KEY in the environment (see the ADK Python quickstart).
import asyncio
from google.adk.agents.llm_agent import Agent
from google.adk.runners import Runner
from google.adk.sessions import InMemorySessionService
from google.genai import types
APP_NAME = "weather_app"
USER_ID = "1234"
SESSION_ID = "session1234"
def get_weather(city: str) -> dict:
"""Returns the current weather in a specified city."""
if city.lower() == "chennai":
return {"status": "success", "city": city, "report": "31 C, humid"}
return {"status": "error", "error_message": f"No weather data for {city}."}
root_agent = Agent(
model='gemini-flash-latest',
name='weather_agent',
description="Tells the current weather in a specified city.",
instruction="You are a helpful assistant that tells the weather in cities. Use the 'get_weather' tool for this purpose.",
tools=[get_weather],
)
# Session and Runner
session_service = InMemorySessionService()
session = asyncio.run(
session_service.create_session(app_name=APP_NAME, user_id=USER_ID, session_id=SESSION_ID)
)
runner = Runner(agent=root_agent, app_name=APP_NAME, session_service=session_service)
# Agent Interaction
content = types.Content(role='user', parts=[types.Part(text="What's the weather in Chennai?")])
events = runner.run(user_id=USER_ID, session_id=SESSION_ID, new_message=content)
for event in events:
if event.is_final_response() and event.content and event.content.parts:
print(event.content.parts[0].text)Nothing yet. Press Play.
Watch it run
Press Play to watch it run, or step through with ← →. Then switch to Practice and run it yourself.
# CrewAI. Install the CLI: uv tool install crewai
# Needs the model provider's API key in the environment (see CrewAI LLM setup).
from crewai import Agent, Task, Crew
from crewai.tools import tool
@tool("get_weather")
def get_weather(city: str) -> str:
"""Get the current weather for a city."""
if city.lower() == "chennai":
return "31 C, humid"
return f"No weather data for {city}."
weather_agent = Agent(
role="Weather Assistant",
goal="Answer questions about the current weather in a city",
backstory="A careful assistant that always checks the weather tool before answering.",
llm="gpt-6-luna",
tools=[get_weather],
verbose=True,
)
weather_task = Task(
description="What's the weather in Chennai?",
expected_output="One sentence stating the temperature and conditions in Chennai.",
agent=weather_agent,
)
crew = Crew(
agents=[weather_agent],
tasks=[weather_task],
verbose=True,
)
result = crew.kickoff()
print(result.raw)Nothing yet. Press Play.
Translation
| Concept | Google ADK | CrewAI |
|---|---|---|
| AgentA model plus instructions and tools | Agent / LlmAgent | Agent (role, goal, backstory) |
| ToolA function the model can ask for | Function tools (FunctionTool) | @tool decorator or BaseTool |
| Conversation stateWhat is remembered inside one chat | Session and State | Flow state, Memory |
| Long-term memoryWhat is remembered across chats | Memory (MemoryService) | Memory class |
| Handing work to another agentMulti-agent delegation | sub_agents, AgentTool | allow_delegation, hierarchical process |
| Fixed workflowSteps in an order you decide, not the model | Graph-based workflows | Flows (@start, @listen) |
| Human in the loopPause and ask a person | RequestInput node, Tool Confirmation | human_input on Task, @human_feedback |
| Tracing and evaluationSee what happened, check quality | Traces (OpenTelemetry), adk eval | CrewAI Tracing, crewai test |
| Deployment in the docsWhere the docs tell you to run it | Agent Runtime, Cloud Run, GKE | CrewAI AMP |
The example agents follow each framework's own quickstart and use the model its docs use; they are shown for reading and were not benchmarked against each other. This site is independent and is not affiliated with Google or CrewAI.