zico-agent / src /agents /lending /agent.py
github-actions[bot]
Deploy from GitHub Actions: 12672d66072fdd7aba634bb75156488f27655abc
5a724fc
raw
history blame contribute delete
536 Bytes
import logging
from src.agents.lending.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 LendingAgent:
"""Agent for handling lending operations (supply, borrow, repay, withdraw)."""
def __init__(self, llm):
self.llm = llm
self.agent = create_react_agent(
model=llm,
tools=get_tools() + [get_user_portfolio_tool],
name="lending_agent"
)