MCPcopy Create free account
hub / github.com/HKUDS/AutoAgent / get_github_agent

Function get_github_agent

autoagent/agents/github_agent.py:9–25  ·  view source on GitHub ↗
(model: str)

Source from the content-addressed store, hash-verified

7
8@register_agent(name = "Github Agent", func_name="get_github_agent")
9def get_github_agent(model: str):
10 def instructions(context_variables):
11 return \
12f"""You are an agent that helps user to manage the GitHub repository named 'autoagent'.
13The user will give you the suggestion of the changes to be pushed to the repository.
14Follow the following routine with the user:
151. First, use `push_changes` to push the changes to the repository. (If the user want to push all the changes, use `push_changes` with `file_paths=None` as the argument.)
162. Then, ask the user whether to submit a pull request to a target branch. (If yes, give the `target_branch`)
173. If the user wants to submit a pull request, use `submit_pull_request` to submit the pull request, if not, just ignore this step.
18"""
19 return Agent(
20 name="Github Agent",
21 model=model,
22 instructions=instructions,
23 functions=[push_changes, submit_pull_request],
24 parallel_tool_calls = False
25 )

Callers

nothing calls this directly

Calls 1

AgentClass · 0.90

Tested by

no test coverage detected