-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy pathagent.py
More file actions
31 lines (26 loc) · 922 Bytes
/
Copy pathagent.py
File metadata and controls
31 lines (26 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import logging
import warnings
from google.adk import Agent
from .config import Config
from .prompts import INSTRUCTION
# Define your tools to interact with the external systems / outside world
from .tools.tools import GitHubTools, AuthMethod
github_tools = GitHubTools(auth_method=AuthMethod.APP)
warnings.filterwarnings("ignore", category=UserWarning, module=".*pydantic.*")
configs = Config()
# configure logging __name__
logger = logging.getLogger(__name__)
root_agent = Agent(
model=configs.agent_settings.model,
instruction=INSTRUCTION,
name=configs.agent_settings.name,
tools=[
github_tools.fetch_github_issue,
github_tools.fetch_github_directory,
github_tools.post_github_comment,
github_tools.create_github_branch,
github_tools.update_github_file,
github_tools.create_github_pull_request,
github_tools.fetch_github_pr_changes,
],
)