cai/src/agents
Rohan Mehta f28848e850 [1/n] Add MCP types to the SDK
### Summary:
1. Add the MCP dep for python 3.10, since it doesn't support 3.9 and below
2. Create MCPServer, which is the agents SDK representation of an MCP server
3. Create implementations for HTTP-SSE and StdIO servers, directly copying the [MCP SDK example](https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/clients/simple-chatbot/mcp_simple_chatbot/main.py)
4. Add a util to transform MCP tools into Agent SDK tools

Note: I added optional caching support to the servers. That way, if you happen to know a server's tools don't change, you can just cache them.

### Test Plan:

Checks pass. I added tests at the end of the stack.
2025-03-25 12:51:40 -04:00
..
extensions Merge pull request #8 from openai/repo/gitignore 2025-03-11 11:17:37 -07:00
mcp [1/n] Add MCP types to the SDK 2025-03-25 12:51:40 -04:00
models Fix parallel_tool_calls when False 2025-03-25 14:52:48 +00:00
tracing Improve tracing error messages 2025-03-23 18:14:10 -04:00
util Pretty print result classes 2025-03-17 11:11:39 -04:00
voice Make the optional dependency installation compatible with zsh 2025-03-21 10:01:24 +09:00
__init__.py update tests 2025-03-20 13:08:38 -04:00
_config.py Add examples and documentation for using custom model providers 2025-03-12 17:34:38 -07:00
_debug.py Initial commit 2025-03-11 09:42:28 -07:00
_run_impl.py refactor: improve comments for clarity in tool_choice reset logic 2025-03-23 20:41:18 +08:00
agent.py Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
agent_output.py utils directory 2025-03-16 18:48:45 -04:00
computer.py Initial commit 2025-03-11 09:42:28 -07:00
exceptions.py Initial commit 2025-03-11 09:42:28 -07:00
function_schema.py fix: resolve linting issues 2025-03-12 16:00:20 +05:30
guardrail.py utils directory 2025-03-16 18:48:45 -04:00
handoffs.py utils directory 2025-03-16 18:48:45 -04:00
items.py Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
lifecycle.py Initial commit 2025-03-11 09:42:28 -07:00
logger.py Initial commit 2025-03-11 09:42:28 -07:00
model_settings.py Add max_tokens and documentation to model settings 2025-03-12 13:35:10 -07:00
py.typed Create py.typed 2025-03-21 11:16:24 -04:00
result.py Pretty print result classes 2025-03-17 11:11:39 -04:00
run.py utils directory 2025-03-16 18:48:45 -04:00
run_context.py Initial commit 2025-03-11 09:42:28 -07:00
stream_events.py revert src/ change per request 2025-03-22 01:06:01 +01:00
strict_schema.py Initial commit 2025-03-11 09:42:28 -07:00
tool.py Introduce tool_use_behavior on agents 2025-03-18 21:55:12 -04:00
usage.py Initial commit 2025-03-11 09:42:28 -07:00
version.py Initial commit 2025-03-11 09:42:28 -07:00