Files
wehub-resource-sync e64161ec32
Release / release_and_publish (push) Waiting to run
CI / ci (3.11) (push) Has been cancelled
CI / ci (3.10) (push) Has been cancelled
CI / dependabot (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 13:36:15 +08:00

18 lines
685 B
Python

from pydantic_ai.mcp import MCPServerStreamableHTTP
from rdagent.components.agent.base import PAIAgent
from rdagent.components.agent.rag.conf import SETTINGS
from rdagent.utils.agent.tpl import T
class Agent(PAIAgent):
"""
A specific agent for RAG
"""
def __init__(self, system_prompt: str | None = None):
toolsets = [MCPServerStreamableHTTP(SETTINGS.url, timeout=SETTINGS.timeout)]
if system_prompt is None:
system_prompt = "You are a Retrieval-Augmented Generation (RAG) agent. Use the retrieved documents to answer the user's queries accurately and concisely."
super().__init__(system_prompt=system_prompt, toolsets=toolsets)