Skip to main content

Knowledge Repo

Empower your agents with semantic search capabilities over your Knowledge Repositories.

This guide will walk you through configuring the Knowledge Repository tool to enable Agentic-Retrieval-Augmented Generation (A-RAG).

πŸ’‘ Core Concepts​

To configure this tool, you need to understand how the search and scoping work.

1. Search Scoping (Filtering)​

You can restrict the search to specific data subsets using IDs:

  • Knowledge Repo ID (k_repo_id): Restricts search to a specific repository UUID.
  • Document ID (doc_id): Restricts search to a specific document UUID within a repository.
Access Control

The tool automatically enforces permission checks. If a k_repo_id is provided, the tool verifies that the current user (the creator of the agent) has permission to access that specific repository.

warning

If your Knowledge repository is global, anyone with the UUID can access it.

danger

If your Knowledge repository is private, only the creator can access it. If a user already has permission to access an agent associated with the Knowledge repository in your organization, you do not need to configure permissions separately for the Knowledge repository. The user’s agent permissions are automatically inherited by the associated Knowledge repository.


βš™οΈ Configuration Steps​

Follow these steps to integrate the Knowledge Repository tool.

Configure Tool in Agent​

Add the KnowledgeRepo tool to your agent's configuration. You must map the credentials to the config block.

Required Configuration Parameters:

  • QDRANT_COLLECTION_NAME
  • QDRANT_URL
  • KR_API_KEY
SVAHNAR Key Vault

We strongly recommend using ${VARIABLE_NAME} syntax to reference SVAHNAR Key Vault rather than hardcoding sensitive keys in your YAML.

define Agent Function​

Instruct your agent on when to use this tool.

  • Example Instruction: "If the user asks about internal policies, use the KnowledgeRepo tool to find the answer."
  • Query Input: The agent will automatically generate the query string based on the user's conversation.

πŸ“š Practical Recipes (Examples)​

Recipe 1: Basic Global Search of Knowledge Repository​

Use Case: An agent that searches the entire Knowledge Repository without restriction.

create_vertical_agent_network:
agent-1:
agent_name: researcher_agent
LLM_config:
params:
model: gpt-5-mini
tools:
tool_assigned:
- name: KnowledgeRepo
config:
k_repo_id: UUID
agent_function:
- "Search the knowledge repository for relevant passages and answer the user's question."
incoming_edge:
- Start
outgoing_edge: []

Recipe 2: Scoped Search of Knowledge Repository (Specific Document)​

Use Case: An agent restricted to searching a specific document within a Knowledge Repository (e.g., "HR Policies" only).

create_vertical_agent_network:
agent-1:
agent_name: hr_policy_bot
LLM_config:
params:
model: gpt-5-mini
tools:
tool_assigned:
- name: KnowledgeRepo
config:
k_repo_id: "550e8400-e29b-41d4-a716-446655440000"
doc_id: "550e8400-e29b-41d4-a716-446655440000"
agent_function:
- "You are an HR assistant. Use the KnowledgeRepo tool to answer policy questions."
incoming_edge:
- Start
outgoing_edge: []


πŸš‘ Troubleshooting​

  • "Invalid Knowledge Repository ID" Error

    • Ensure the k_repo_id provided is a valid UUID format.
  • "You do not have permission to access..."

    • This occurs if the k_repo_id exists but belongs to a different user/organization, and is not marked as is_global.
    • Verify the ownership of the Knowledge Repository you are trying to access.