File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -185,6 +185,11 @@ If the MCP server implements the HTTP with SSE transport, instantiate
185
185
[ ` MCPServerSse ` ] [ agents.mcp.server.MCPServerSse ] . Apart from the transport, the API is identical to the Streamable HTTP server.
186
186
187
187
``` python
188
+
189
+ from agents import Agent, Runner
190
+ from agents.model_settings import ModelSettings
191
+ from mcp import MCPServerSse
192
+
188
193
workspace_id = " demo-workspace"
189
194
190
195
async with MCPServerSse(
@@ -212,6 +217,8 @@ proofs of concept or when the server only exposes a command line entry point.
212
217
213
218
``` python
214
219
from pathlib import Path
220
+ from agents import Agent, Runner
221
+ from agents.mcp import MCPServerStdio
215
222
216
223
current_dir = Path(__file__ ).parent
217
224
samples_dir = current_dir / " sample_files"
@@ -298,6 +305,8 @@ methods:
298
305
- ` get_prompt(name, arguments) ` fetches a concrete prompt, optionally with parameters.
299
306
300
307
``` python
308
+ from agents import Agent
309
+
301
310
prompt_result = await server.get_prompt(
302
311
" generate_code_review_instructions" ,
303
312
{" focus" : " security vulnerabilities" , " language" : " python" },
You can’t perform that action at this time.
0 commit comments