<CodeGroup>
    ```python Google
    from dataclasses import dataclass
    
    from deepagents import create_deep_agent
    from langchain.tools import ToolRuntime, tool
    
    
    @dataclass
    class Context:
        user_id: str
        api_key: str
    
    
    @tool
    def fetch_user_data(query: str, runtime: ToolRuntime[Context]) -> str:
        """Fetch data for the current user."""
        user_id = runtime.context.user_id
        return f"Data for user {user_id}: {query}"
    
    
    agent = create_deep_agent(
        model="google_genai:gemini-3.6-flash",
        tools=[fetch_user_data],
        context_schema=Context,
    )
    
    result = agent.invoke(
        {"messages": [{"role": "user", "content": "Get my recent activity"}]},
        context=Context(user_id="user-123", api_key="sk-..."),
    )
    ```

    ```python OpenAI
    from dataclasses import dataclass
    
    from deepagents import create_deep_agent
    from langchain.tools import ToolRuntime, tool
    
    
    @dataclass
    class Context:
        user_id: str
        api_key: str
    
    
    @tool
    def fetch_user_data(query: str, runtime: ToolRuntime[Context]) -> str:
        """Fetch data for the current user."""
        user_id = runtime.context.user_id
        return f"Data for user {user_id}: {query}"
    
    
    agent = create_deep_agent(
        model="openai:gpt-5.5",
        tools=[fetch_user_data],
        context_schema=Context,
    )
    
    result = agent.invoke(
        {"messages": [{"role": "user", "content": "Get my recent activity"}]},
        context=Context(user_id="user-123", api_key="sk-..."),
    )
    ```

    ```python Anthropic
    from dataclasses import dataclass
    
    from deepagents import create_deep_agent
    from langchain.tools import ToolRuntime, tool
    
    
    @dataclass
    class Context:
        user_id: str
        api_key: str
    
    
    @tool
    def fetch_user_data(query: str, runtime: ToolRuntime[Context]) -> str:
        """Fetch data for the current user."""
        user_id = runtime.context.user_id
        return f"Data for user {user_id}: {query}"
    
    
    agent = create_deep_agent(
        model="anthropic:claude-sonnet-4-6",
        tools=[fetch_user_data],
        context_schema=Context,
    )
    
    result = agent.invoke(
        {"messages": [{"role": "user", "content": "Get my recent activity"}]},
        context=Context(user_id="user-123", api_key="sk-..."),
    )
    ```

    ```python OpenRouter
    from dataclasses import dataclass
    
    from deepagents import create_deep_agent
    from langchain.tools import ToolRuntime, tool
    
    
    @dataclass
    class Context:
        user_id: str
        api_key: str
    
    
    @tool
    def fetch_user_data(query: str, runtime: ToolRuntime[Context]) -> str:
        """Fetch data for the current user."""
        user_id = runtime.context.user_id
        return f"Data for user {user_id}: {query}"
    
    
    agent = create_deep_agent(
        model="openrouter:z-ai/glm-5.2",
        tools=[fetch_user_data],
        context_schema=Context,
    )
    
    result = agent.invoke(
        {"messages": [{"role": "user", "content": "Get my recent activity"}]},
        context=Context(user_id="user-123", api_key="sk-..."),
    )
    ```

    ```python Fireworks
    from dataclasses import dataclass
    
    from deepagents import create_deep_agent
    from langchain.tools import ToolRuntime, tool
    
    
    @dataclass
    class Context:
        user_id: str
        api_key: str
    
    
    @tool
    def fetch_user_data(query: str, runtime: ToolRuntime[Context]) -> str:
        """Fetch data for the current user."""
        user_id = runtime.context.user_id
        return f"Data for user {user_id}: {query}"
    
    
    agent = create_deep_agent(
        model="fireworks:accounts/fireworks/models/glm-5p2",
        tools=[fetch_user_data],
        context_schema=Context,
    )
    
    result = agent.invoke(
        {"messages": [{"role": "user", "content": "Get my recent activity"}]},
        context=Context(user_id="user-123", api_key="sk-..."),
    )
    ```

    ```python Baseten
    from dataclasses import dataclass
    
    from deepagents import create_deep_agent
    from langchain.tools import ToolRuntime, tool
    
    
    @dataclass
    class Context:
        user_id: str
        api_key: str
    
    
    @tool
    def fetch_user_data(query: str, runtime: ToolRuntime[Context]) -> str:
        """Fetch data for the current user."""
        user_id = runtime.context.user_id
        return f"Data for user {user_id}: {query}"
    
    
    agent = create_deep_agent(
        model="baseten:zai-org/GLM-5.2",
        tools=[fetch_user_data],
        context_schema=Context,
    )
    
    result = agent.invoke(
        {"messages": [{"role": "user", "content": "Get my recent activity"}]},
        context=Context(user_id="user-123", api_key="sk-..."),
    )
    ```

    ```python Ollama
    from dataclasses import dataclass
    
    from deepagents import create_deep_agent
    from langchain.tools import ToolRuntime, tool
    
    
    @dataclass
    class Context:
        user_id: str
        api_key: str
    
    
    @tool
    def fetch_user_data(query: str, runtime: ToolRuntime[Context]) -> str:
        """Fetch data for the current user."""
        user_id = runtime.context.user_id
        return f"Data for user {user_id}: {query}"
    
    
    agent = create_deep_agent(
        model="ollama:north-mini-code-1.0",
        tools=[fetch_user_data],
        context_schema=Context,
    )
    
    result = agent.invoke(
        {"messages": [{"role": "user", "content": "Get my recent activity"}]},
        context=Context(user_id="user-123", api_key="sk-..."),
    )
    ```
</CodeGroup>
