File size: 899 Bytes
28fad98
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
from google.adk.agents import Agent
from google.adk.tools.mcp_tool.mcp_toolset import MCPToolset
from google.adk.tools.mcp_tool.mcp_session_manager import StdioConnectionParams
from mcp import StdioServerParameters

from src.tools import get_current_time
from src.prompts import READ_AGENT
from src.db import DB_PATH


read_agent = Agent(
    name="read_agent",
    model=READ_AGENT.config.model,
    description="Agent that specialized in reading transaction",
    instruction=READ_AGENT.prompt,
    tools=[
        MCPToolset(
            connection_params=StdioConnectionParams(
                server_params=StdioServerParameters(
                    command="npx",
                    args= [
                        "-y",
                        "@executeautomation/database-server",
                        f"{DB_PATH}"
                    ]
                )
            )
        )
    ]
)