25 lines
653 B
Python
25 lines
653 B
Python
"""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,
|
|
)
|