from raglight.config.agentic_config import AgenticRAGConfig
from raglight.rag.agentic_api import AgenticPipeline
from raglight.config.settings import Settings
# Define MCP Server connection
mcp_servers = [
{"url": "http://127.0.0.1:8001/sse"}
]
# Configure Agentic RAG
config = AgenticRAGConfig(
provider=Settings.OPENAI,
model="gpt-4o",
k=10,
mcp_config=mcp_servers,
knowledge_base="./company_data"
)
# The agent now has access to both your documents AND the MCP tools
agent = AgenticPipeline(config)
agent.build()
# Complex query requiring both retrieval and tool use
response = agent.chat("Check the database for user 'Alice' and summarize her recent support tickets from the docs.")
print(response)