git init and first deep agent with langsmith ui

This commit is contained in:
Lamueno
2026-01-11 18:51:27 +08:00
commit 20458643df
12 changed files with 3100 additions and 0 deletions

24
agent.py Normal file
View 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,
)