# pip install -qU deepagents langchain-google-genaifrom deepagents import create_deep_agentdef get_weather(city: str) -> str: """Get weather for a given city.""" return f"It's always sunny in {city}!"agent = create_deep_agent( model="google_genai:gemini-3.1-pro-preview", tools=[get_weather], system_prompt="You are a helpful assistant",)# Run the agentagent.invoke( {"messages": [{"role": "user", "content": "what is the weather in sf"}]})
# pip install -qU deepagents langchain-openaifrom deepagents import create_deep_agentdef get_weather(city: str) -> str: """Get weather for a given city.""" return f"It's always sunny in {city}!"agent = create_deep_agent( model="openai:gpt-5.4", tools=[get_weather], system_prompt="You are a helpful assistant",)# Run the agentagent.invoke( {"messages": [{"role": "user", "content": "what is the weather in sf"}]})
# pip install -qU deepagents langchain-anthropicfrom deepagents import create_deep_agentdef get_weather(city: str) -> str: """Get weather for a given city.""" return f"It's always sunny in {city}!"agent = create_deep_agent( model="anthropic:claude-sonnet-4-6", tools=[get_weather], system_prompt="You are a helpful assistant",)# Run the agentagent.invoke( {"messages": [{"role": "user", "content": "what is the weather in sf"}]})
# pip install -qU deepagents langchain-openrouterfrom deepagents import create_deep_agentdef get_weather(city: str) -> str: """Get weather for a given city.""" return f"It's always sunny in {city}!"agent = create_deep_agent( model="openrouter:anthropic/claude-sonnet-4-6", tools=[get_weather], system_prompt="You are a helpful assistant",)# Run the agentagent.invoke( {"messages": [{"role": "user", "content": "what is the weather in sf"}]})
# pip install -qU deepagents langchain-fireworksfrom deepagents import create_deep_agentdef get_weather(city: str) -> str: """Get weather for a given city.""" return f"It's always sunny in {city}!"agent = create_deep_agent( model="fireworks:accounts/fireworks/models/qwen3p5-397b-a17b", tools=[get_weather], system_prompt="You are a helpful assistant",)# Run the agentagent.invoke( {"messages": [{"role": "user", "content": "what is the weather in sf"}]})
# pip install -qU deepagents langchain-basetenfrom deepagents import create_deep_agentdef get_weather(city: str) -> str: """Get weather for a given city.""" return f"It's always sunny in {city}!"agent = create_deep_agent( model="baseten:zai-org/GLM-5", tools=[get_weather], system_prompt="You are a helpful assistant",)# Run the agentagent.invoke( {"messages": [{"role": "user", "content": "what is the weather in sf"}]})
# pip install -qU deepagents langchain-ollamafrom deepagents import create_deep_agentdef get_weather(city: str) -> str: """Get weather for a given city.""" return f"It's always sunny in {city}!"agent = create_deep_agent( model="ollama:devstral-2", tools=[get_weather], system_prompt="You are a helpful assistant",)# Run the agentagent.invoke( {"messages": [{"role": "user", "content": "what is the weather in sf"}]})