git init and first deep agent with langsmith ui
This commit is contained in:
24
agent.py
Normal file
24
agent.py
Normal file
@@ -0,0 +1,24 @@
|
||||
"""Network Search Agent - Standalone script for LangGraph deployment.
|
||||
|
||||
This module creates a network search agent with internet search capabilities.
|
||||
Uses DeepAgents framework with Tavily search integration.
|
||||
"""
|
||||
|
||||
from langchain.chat_models import init_chat_model
|
||||
from deepagents import create_deep_agent
|
||||
|
||||
from network_search_agent.prompts import SYSTEM_PROMPT
|
||||
from network_search_agent.tools import internet_search
|
||||
|
||||
# 初始化模型(DeepSeek)
|
||||
model = init_chat_model(
|
||||
model="deepseek:deepseek-chat",
|
||||
temperature=0.3
|
||||
)
|
||||
|
||||
# 创建智能体
|
||||
agent = create_deep_agent(
|
||||
model=model,
|
||||
tools=[internet_search],
|
||||
system_prompt=SYSTEM_PROMPT,
|
||||
)
|
||||
Reference in New Issue
Block a user