Skip to main content
The knowledge base integrates with the DeepAgents framework through two Agent tools. When a user passes knowledge_base_ids in the invoke() request, these tools are automatically registered in the Agent’s toolset.

search_knowledge_base

The Agent proactively searches the knowledge base for relevant information. Supports parallel retrieval across multiple knowledge bases with adjustable retrieval weights.
query
string
required
Search query (natural language)
knowledge_base_id
string
Specific knowledge base ID. If not specified, searches all configured knowledge bases
top_k
number
default:"5"
Number of results to return
vector_weight
number
default:"0.6"
Vector search weight (0-1)
keyword_weight
number
default:"0.4"
Keyword search weight (0-1)
use_rerank
boolean
default:"true"
Whether to use RRF reranking. When disabled, returns vector search results directly (faster)

Agent Call Examples

# Search all configured knowledge bases
search_knowledge_base("product usage instructions")

# Search a specific knowledge base
search_knowledge_base("XYZ-2000 product specifications", knowledge_base_id="kb_123")

# Increase keyword weight (suitable for exact term searches)
search_knowledge_base("getUserInfo API parameters", keyword_weight=0.7, vector_weight=0.3)

# Fast mode, skip RRF reranking
search_knowledge_base("quick query", use_rerank=False)

parse_resource_file

Parses files uploaded by the user in the Resource panel. Supports all document formats and images (via Vision API).
file_id
string
required
Resource file ID
parse_images
boolean
default:"true"
Whether to use Vision API to recognize image content
max_length
number
default:"5000"
Maximum returned text length

Agent Call Examples

# Parse an uploaded PDF document
parse_resource_file(file_id="res_abc123")

# Parse an image (using Vision API)
parse_resource_file(file_id="res_img456", parse_images=True)

# Limit return length
parse_resource_file(file_id="res_abc123", max_length=2000)