agents/apiTHE ENCYCLOPEDIA
Tools & integrations

RAG, file search & vector stores

Connect private knowledge through retrieval, and distinguish a search index from an agent workspace.

Source documents
Search index
Relevant passages
Model context
Grounded answer

Retrieval supplies evidence

Retrieval-augmented generation brings relevant document passages into model context before an answer is produced. It is useful when the answer depends on a knowledge base rather than only model knowledge. Keep document permissions attached to the retrieval request.

Hosted file search belongs to its documented API

OpenAI documents file_search as a Responses API tool using uploaded files and vector stores. The hosted tool performs semantic and keyword retrieval. Set up the vector store and ingestion first; uploading a file alone is not the same as preparing a searchable knowledge base.

Connect retrieval to Agents API

For managed Agents API work, expose your retrieval service as an application function or MCP tool using the supported tool schema. Return relevant passages with source identifiers. Do not assume a Responses file_search configuration is accepted unchanged in an Agents API session.

Workspace files solve a different problem

Sandbox files provide a working filesystem for scripts and artifacts. A vector store provides a retrieval index. Neither is automatically a replacement for application storage or access controls. Evaluate relevance, answer grounding, and citation accuracy separately.

Read the official reference

Check the source for current API fields, account requirements, and service limits.

OpenAI: tools-file-search

23 matching topics

What is the OpenAI Agents API?FoundationsAgents API vs Agents SDK vs Responses APIComparisonsAgents API quickstartGetting startedSessions, turns & durable stateCore conceptsHosted vs self-hosted sandboxesInfrastructureConnect MCP servers to Agents APITools & integrationsFunction calling & application toolsTools & integrationsMulti-agent orchestrationCore conceptsStreaming, webhooks & event handlingIntegration guidesFiles, outputs & published artifactsCore conceptsVaults & MCP authenticationTools & integrationsAgent security & credential boundariesProductionTracing, usage & debuggingProductionAgents API pricing & cost planningProductionOpenAI Agents API with PythonGetting startedAgents API with TypeScript & Next.jsIntegration guidesWhat is the OpenAI Agents SDK?FoundationsResponses API in the agent stackFoundationsAgent Skills & SKILL.mdTools & integrationsProgrammatic Tool CallingTools & integrationsRAG, file search & vector storesTools & integrationsWeb search & source citationsTools & integrationsChatKit & Agent BuilderIntegration guides
K to open Esc to close