zico-agent / src /agents /swap /agent.py
github-actions[bot]
Deploy from GitHub Actions: 347c54a3c8bb23a024f5952b8812538513a507f7
7e3d17c
raw
history blame contribute delete
525 Bytes
import logging
from src.agents.swap.tools import get_tools
from src.agents.portfolio.tools import get_user_portfolio_tool
from langgraph.prebuilt import create_react_agent
logger = logging.getLogger(__name__)
class SwapAgent:
"""Agent for handling swap operations and any other swap related questions"""
def __init__(self, llm):
self.llm = llm
self.agent = create_react_agent(
model=llm,
tools=get_tools() + [get_user_portfolio_tool],
name="swap_agent"
)