File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11import asyncio
2- import os
32import shutil
43
54from agents import Agent , Runner , trace
65from agents .mcp import MCPServer , MCPServerStdio
76
7+
88async def run (mcp_server : MCPServer , directory_path : str ):
99 agent = Agent (
1010 name = "Assistant" ,
1111 instructions = f"Answer questions about the git repository at { directory_path } , use that for repo_path" ,
1212 mcp_servers = [mcp_server ],
1313 )
1414
15- message = f "Who's the most frequent contributor?"
15+ message = "Who's the most frequent contributor?"
1616 print ("\n " + "-" * 40 )
1717 print (f"Running: { message } " )
1818 result = await Runner .run (starting_agent = agent , input = message )
1919 print (result .final_output )
2020
21- message = f "Summarize the last change in the repository."
21+ message = "Summarize the last change in the repository."
2222 print ("\n " + "-" * 40 )
2323 print (f"Running: { message } " )
2424 result = await Runner .run (starting_agent = agent , input = message )
@@ -45,4 +45,4 @@ async def main():
4545 if not shutil .which ("uvx" ):
4646 raise RuntimeError ("uvx is not installed. Please install it with `pip install uvx`." )
4747
48- asyncio .run (main ())
48+ asyncio .run (main ())
You can’t perform that action at this time.
0 commit comments