from upsonic.tools.builtin_tools import FileSearchTool
from upsonic import Agent, Task
from upsonic.models.openai import OpenAIResponsesModel
model = OpenAIResponsesModel(
model_name="gpt-4o",
provider="openai"
)
# Search across multiple vector stores (max 2 for OpenAI)
file_search = FileSearchTool(
file_store_ids=["vs_policies", "vs_procedures"]
)
task = Task(
description="""
Search through the company documents and answer the following:
1. What is the remote work policy?
2. What are the guidelines for expense reporting?
""",
tools=[file_search]
)
agent = Agent(model=model, name="HR Knowledge Agent")
result = agent.print_do(task)
print("Result:", result)