> Source: https://builder-docs.ema.ai/agent-reference/core/knowledge-search
> Title: Knowledge Search Agent

# Knowledge Search Agent

The Knowledge Search Agent runs a search over one or more connected data sources and returns a ranked set of passages with source references that downstream agents can cite.

## Use Cases

-   Your AI Employee needs to retrieve information from uploaded documents, connected data sources, or indexed content.
-   You are building a FAQ bot, policy lookup, or documentation search.
-   You need grounded answers backed by source documents.

## Inputs

Input

Required

Description

Query

Yes

The search text.

Data Sources

No

The knowledge bases to search. Usually wired at config time, can also be overridden per run.

Filter by Filename

No

Comma separated file names to restrict the search to specific documents. Quoted names containing commas are supported.

## Outputs

Output

Description

Search Results

A ranked list of passages. Each entry carries the text snippet, a reference to the source document, and a relevance score used for ranking downstream.

## Advanced Configurations

Parameter

Description

Default

Number of Search Results

How many results to fetch from each connected data source before ranking.

10

Max Sources

Maximum number of source documents included in the final output after ranking.

10

Max Chunks per Result

Maximum number of content chunks pulled from each matched document.

5

Number of Previous Chunks

Neighboring chunks to include before each match, for surrounding context.

0

Number of Next Chunks

Neighboring chunks to include after each match, for surrounding context.

0

Disable Images

Turns off image retrieval. When off, image results are returned alongside text passages.

Off

Max Images

Maximum number of image results returned per match.

5

Enable Filtering by Document Validity Dates

Only returns documents whose validity window covers the current date.

Off

## How to Use This Agent

The standard search and respond pattern:

```
chat_trigger -> knowledge_search -> respond_agent -> workflow_output
```

With conversation context for multi-turn:

```
chat_trigger -> conversation_summarizer -> knowledge_search -> respond_agent -> workflow_output
```

## Related Agents

-   [Respond Agent](/legacy-docs/agent-reference/core/respond-to-a-query), the standard downstream agent for generating responses from search results.
-   [Conversation Summarizer](/legacy-docs/agent-reference/core/conversation-summarizer), converts multi-turn conversations into search queries.
-   [Combine Search Results](/legacy-docs/agent-reference/core/combine-search-results), merges results from multiple search agents.
-   [Rerank Search Results](/legacy-docs/agent-reference/core/rerank-search-results), LLM-based reranking for improved relevance.
-   [Agentic Search and Respond](/legacy-docs/agent-reference/core/agentic-search-and-respond), for complex research that requires iterative searching.
-   [Document Synthesis](/legacy-docs/agent-reference/core/document-synthesis), for searches that need image and table awareness.
