Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/packages/a2a/agent_framework_a2a/_a2a_executor.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class A2AExecutor(AgentExecutor):
from a2a.server.tasks import InMemoryTaskStore
from a2a.types import AgentCapabilities, AgentCard, AgentInterface
from agent_framework.a2a import A2AExecutor
from agent_framework.openai import OpenAIResponsesClient
from agent_framework.openai import OpenAIChatClient
from starlette.applications import Starlette

public_agent_card = AgentCard(
Expand All @@ -81,7 +81,7 @@ class A2AExecutor(AgentExecutor):
)

# Create an agent
agent = OpenAIResponsesClient().as_agent(
agent = OpenAIChatClient().as_agent(
name="Food Agent",
instructions="A simple agent that provides food-related information.",
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,7 @@ def get_code_interpreter_tool(
name: The name for this tool. Defaults to "code_execution".

Returns:
A dict-based tool configuration ready to pass to ChatAgent.
A dict-based tool configuration ready to pass to an Agent.

Examples:
.. code-block:: python
Expand All @@ -481,7 +481,7 @@ def get_web_search_tool(
name: The name for this tool. Defaults to "web_search".

Returns:
A dict-based tool configuration ready to pass to ChatAgent.
A dict-based tool configuration ready to pass to an Agent.

Examples:
.. code-block:: python
Expand Down Expand Up @@ -569,7 +569,7 @@ def get_mcp_tool(
authorization_token: Authorization token for the MCP server (e.g., Bearer token).

Returns:
A dict-based tool configuration ready to pass to ChatAgent.
A dict-based tool configuration ready to pass to an Agent.

Examples:
.. code-block:: python
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async def delete_file(self, file_id: str) -> None:
class OpenAIFileSearchBackend(_OpenAICompatBackend):
"""File search backend for OpenAI Responses API.

Use with ``OpenAIChatClient`` or ``AzureOpenAIResponsesClient``.
Use with ``OpenAIChatClient``, including when it targets Azure OpenAI through ``azure_endpoint``.
Requires an ``AsyncOpenAI`` or ``AsyncAzureOpenAI`` client.

Args:
Expand Down
2 changes: 1 addition & 1 deletion python/packages/claude/agent_framework_claude/_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"connects to MCP servers itself, so a framework-managed MCPTool would keep none of its "
"framework behavior. Configure the server natively instead, for example "
"default_options={{'mcp_servers': {{'{name}': "
"{{'type': 'stdio', 'command': 'python', 'args': ['server.py']}}}}}}, or use a ChatAgent, "
"{{'type': 'stdio', 'command': 'python', 'args': ['server.py']}}}}}}, or use an Agent with a chat client, "
"where the framework owns the connection."
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ def _provider_service_session_state_keys(agent: object, client: object | None) -
"connects to MCP servers itself, so a framework-managed MCPTool would keep none of its "
"framework behavior. Configure the server natively instead, for example "
"default_options={{'mcp_servers': {{'{name}': {{'type': 'stdio', 'command': 'python', "
"'args': ['server.py'], 'tools': ['*']}}}}}}, or use a ChatAgent, where the framework owns "
"the connection."
"'args': ['server.py'], 'tools': ['*']}}}}}}, or use an Agent with a chat client, where the "
"framework owns the connection."
)


Expand Down
25 changes: 15 additions & 10 deletions python/packages/openai/agent_framework_openai/_chat_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -1323,11 +1323,12 @@ def get_code_interpreter_tool(
or provide a TypedDict with custom container settings.

Returns:
A CodeInterpreter tool parameter ready to pass to ChatAgent.
A CodeInterpreter tool parameter ready to pass to an Agent.

Examples:
.. code-block:: python

from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient

# Basic code interpreter
Expand All @@ -1337,7 +1338,7 @@ def get_code_interpreter_tool(
tool = OpenAIChatClient.get_code_interpreter_tool(file_ids=["file-abc123"])

# Use with agent
agent = ChatAgent(client, tools=[tool])
agent = Agent(client=OpenAIChatClient(), tools=[tool])
"""
container_config: CodeInterpreterContainerCodeInterpreterToolAuto = (
container if isinstance(container, dict) else {"type": "auto"}
Expand Down Expand Up @@ -1365,11 +1366,12 @@ def get_web_search_tool(
filters: Additional search filters.

Returns:
A WebSearchToolParam dict ready to pass to ChatAgent.
A WebSearchToolParam dict ready to pass to an Agent.

Examples:
.. code-block:: python

from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient

# Basic web search
Expand All @@ -1381,7 +1383,7 @@ def get_web_search_tool(
search_context_size="medium",
)

agent = ChatAgent(client, tools=[tool])
agent = Agent(client=OpenAIChatClient(), tools=[tool])
"""
web_search_tool = WebSearchToolParam(type="web_search")

Expand Down Expand Up @@ -1427,11 +1429,12 @@ def get_image_generation_tool(
output_compression: Compression level for output (0-100).

Returns:
An ImageGeneration tool parameter dict ready to pass to ChatAgent.
An ImageGeneration tool parameter dict ready to pass to an Agent.

Examples:
.. code-block:: python

from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient

# Basic image generation
Expand All @@ -1444,7 +1447,7 @@ def get_image_generation_tool(
output_format="png",
)

agent = ChatAgent(client, tools=[tool])
agent = Agent(client=OpenAIChatClient(), tools=[tool])
"""
tool: ImageGeneration = {"type": "image_generation"}

Expand Down Expand Up @@ -1586,11 +1589,12 @@ def get_mcp_tool(
headers: HTTP headers to include in requests to the MCP server.

Returns:
An Mcp tool parameter dict ready to pass to ChatAgent.
An Mcp tool parameter dict ready to pass to an Agent.

Examples:
.. code-block:: python

from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient

# Basic MCP tool
Expand Down Expand Up @@ -1618,7 +1622,7 @@ def get_mcp_tool(
},
)

agent = ChatAgent(client, tools=[tool])
agent = Agent(client=OpenAIChatClient(), tools=[tool])
"""
mcp: Mcp = {
"type": "mcp",
Expand Down Expand Up @@ -1659,11 +1663,12 @@ def get_file_search_tool(
max_num_results: Maximum number of results to return. Defaults to 50 if not specified.

Returns:
A FileSearchToolParam dict ready to pass to ChatAgent.
A FileSearchToolParam dict ready to pass to an Agent.

Examples:
.. code-block:: python

from agent_framework import Agent
from agent_framework.openai import OpenAIChatClient

# Basic file search
Expand All @@ -1677,7 +1682,7 @@ def get_file_search_tool(
max_num_results=10,
)

agent = ChatAgent(client, tools=[tool])
agent = Agent(client=OpenAIChatClient(), tools=[tool])
"""
tool = FileSearchToolParam(
type="file_search",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ def get_web_search_tool(

Note: For the Chat Completions API, web search is passed via the `web_search_options`
parameter rather than in the `tools` array. This method returns a dict that can be
passed as a tool to ChatAgent, which will handle it appropriately.
passed as a tool to an Agent, which will handle it appropriately.

Keyword Args:
web_search_options: The full WebSearchOptions configuration. This TypedDict includes:
Expand All @@ -534,11 +534,12 @@ def get_web_search_tool(
- search_context_size: One of "low", "medium", "high".

Returns:
A dict configuration that enables web search when passed to ChatAgent.
A dict configuration that enables web search when passed to an Agent.

Examples:
.. code-block:: python

from agent_framework import Agent
from agent_framework.openai import OpenAIChatCompletionClient

# Basic web search
Expand All @@ -555,7 +556,7 @@ def get_web_search_tool(
}
)

agent = ChatAgent(client, tools=[tool])
agent = Agent(client=OpenAIChatCompletionClient(), tools=[tool])
"""
tool: dict[str, Any] = {"type": "web_search"}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

from agent_framework import (
Agent,
AgentExecutor, # Wraps a ChatAgent as an Executor for use in workflows
AgentExecutor, # Wraps an Agent as an Executor for use in workflows
AgentExecutorRequest, # The message bundle sent to an AgentExecutor
AgentExecutorResponse, # The structured result returned by an AgentExecutor
AgentResponseUpdate,
Expand Down
Loading