agents
latest
false
UiPath logo, featuring letters U and I in white

Agents user guide

Last updated Feb 18, 2026

Contexts

Using indexes in agents

Indexes give agents access to permissioned knowledge bases. This helps agents reason using business-specific data. For guidance on effectively leveraging context, refer to Best practices for context engineering.

To add context for your agent, take the following steps in the Contexts section:

  1. Select Add context.
  2. Select an index from the available list or Create new to create a new index in Orchestrator. For details, refer to Indexes.
  3. Provide a Description for your context.
  4. Configure the Search Strategy using the Properties panel. You can control the query type, precision, and relevance of the context using the following settings:
    • Semantic: Select this option for semantic queries if you are using text data sources.
      • Relevance score threshold: Refers to a similarity score threshold applied after the retrieval and re-ranking of relevant chunks. Any relevant chunks that are scored below this threshold are not returned. Use this field to make results more precise. As you increase this number, Context Grounding filters and grounds prompts with only the best scores.
      • Max results generated: Refers to the number of chunks returned by Context Grounding from a user's query. This helps with making the grounding payload of the LLM generation (overall token size of the LLM call) smaller and can help act as an additional filter on the results you get from Context Grounding. Increasing the number of results increases the amount of chunks that are returned.
      • Query – The query for the search strategy. This field supports static values, Static, Argument, Dynamic modes.
    • Structured (Preview): Select this option for structured queries if you are using tabular data sources. Supports CSV data format.
    • DeepRAG: Select this option to enable advanced multi-document synthesis and retrieval. For details, refer to Using DeepRAG.
      • Enable citations – Enable for citations for DeepRAG queries.
      • Prompt – The prompt for the DeepRAG query. This field supports static values, Static, Argument, Dynamic modes.
  5. Limit the search scope using the following settings:
    • Folder path prefix – Use this field to specify the folder path where your target documents are stored. You can either manually enter a static path, such as /documents/project, or use a dynamic argument, allowing the agent to search different folders based on runtime inputs.
    Note:

    By default, only files located directly in the specified folder are indexed. Files stored in subfolders are not included automatically. To include files from subfolders, append /** to the path (for example, /documents/project/**). If files in subfolders are not included, you may see the following error: "No valid files to use for DeepRAG. Please update and resync your index, or use a different matching pattern."

    • File extension – Select the file types contained in the index. For DeepRAG, only PDF files are currently supported.

Just-in-time context using files

Just-in-time context lets you provide files to an agent at runtime without managing long-lived indexes or persistent datasources. Instead of syncing files into a permanent index, the agent works with files directly. This approach reduces operational overhead, improves throughput, and avoids unnecessary storage costs. Use just-in-time context whenever your use case requires the agent to work with files provided at runtime and you do not need to maintain the indexed data afterward.

  1. Select Add context and choose Use File Inputs. This option is available only when File type arguments are defined for your agent in the Data Manager.

Use file inputs

  1. Use the Name field to set a descriptive name for your files index.
  2. (Optional) In Description, document what kind of documents this context will provide.
  3. In Files, bind the input that contains the files or attachments (for example, an array of documents from the conversation or from a tool).
  4. Configure the remaining settings just as you would for a regular index.

Configuring a just-in-time context

During execution, the temporary index is created, queried according to your configuration, and then discarded. The agent receives the relevant extracted context as part of its reasoning process, without requiring you to manage data sources, index syncs, or cleanup.

Requirements and limits

When using just-in-time context, the following constraints apply:

  • Input attachments: Up to 25 attachments per run, with a total maximum size of 128 MB.
  • Supported file types: All file types supported by Context Grounding.
  • Output format: Matches the standard output formats of existing Context Grounding tools.
  • TTL (time to live): Temporary indexes are automatically deleted 24 hours after last use. This allows reusing the same index during debugging without re-ingestion.
  • Up to 1,000 temporary indexes per tenant can be active at once. A higher quota can be requested on a case by case basis.
  • Using indexes in agents
  • Just-in-time context using files
  • Requirements and limits

Was this page helpful?

Get The Help You Need
Learning RPA - Automation Courses
UiPath Community Forum
Uipath Logo
Trust and Security
© 2005-2026 UiPath. All rights reserved.