File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
1
import asyncio
2
- import os
3
2
import shutil
4
3
5
4
from agents import Agent , Runner , trace
6
5
from agents .mcp import MCPServer , MCPServerStdio
7
6
7
+
8
8
async def run (mcp_server : MCPServer , directory_path : str ):
9
9
agent = Agent (
10
10
name = "Assistant" ,
11
11
instructions = f"Answer questions about the git repository at { directory_path } , use that for repo_path" ,
12
12
mcp_servers = [mcp_server ],
13
13
)
14
14
15
- message = f "Who's the most frequent contributor?"
15
+ message = "Who's the most frequent contributor?"
16
16
print ("\n " + "-" * 40 )
17
17
print (f"Running: { message } " )
18
18
result = await Runner .run (starting_agent = agent , input = message )
19
19
print (result .final_output )
20
20
21
- message = f "Summarize the last change in the repository."
21
+ message = "Summarize the last change in the repository."
22
22
print ("\n " + "-" * 40 )
23
23
print (f"Running: { message } " )
24
24
result = await Runner .run (starting_agent = agent , input = message )
@@ -45,4 +45,4 @@ async def main():
45
45
if not shutil .which ("uvx" ):
46
46
raise RuntimeError ("uvx is not installed. Please install it with `pip install uvx`." )
47
47
48
- asyncio .run (main ())
48
+ asyncio .run (main ())
You can’t perform that action at this time.
0 commit comments