Skip to content

Conversation

@pwoznic
Copy link
Contributor

@pwoznic pwoznic commented Oct 14, 2025

Enhanced content around configuring agent search behavior. It's not always clear that it's similar to the Query API parameters.

@pwoznic pwoznic requested a review from Copilot October 14, 2025 23:10
@pwoznic pwoznic marked this pull request as ready for review October 14, 2025 23:10
@pwoznic pwoznic requested a review from tallatshafaat October 14, 2025 23:10
@netlify
Copy link

netlify bot commented Oct 14, 2025

Deploy Preview for luxury-shortbread-acee05 ready!

Name Link
🔨 Latest commit b68d242
🔍 Latest deploy log https://app.netlify.com/projects/luxury-shortbread-acee05/deploys/69093ce9b625640008e4a40f
😎 Deploy Preview https://deploy-preview-516--luxury-shortbread-acee05.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enhances documentation for configuring agent search behavior by adding comprehensive details about query configuration parameters and clarifying the relationship to the Query API. The changes make it clearer how to configure the corpora_search tool with the same parameters available in the Query API.

  • Added a new "Configure agent search behavior" section with detailed examples and parameter explanations
  • Added tip callouts referencing the new configuration section across multiple documentation files
  • Corrected a tool type reference from "corpus_search" to "corpora_search"

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
www/docs/console-ui/agents/create-an-agent.md Added tip callout directing users to agent search behavior configuration documentation
www/docs/agents/tools.md Enhanced corpora_search description with Query API reference and added link to configuration details
www/docs/agents/agents.md Added comprehensive "Configure agent search behavior" section with detailed examples and parameter documentation
www/docs/agents/agents-quickstart.md Added tip callout referencing search behavior configuration documentation
www/docs/agents/agent-platform-overview.md Enhanced corpora search description with reference to configuration documentation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

},
"reranker": {
"type": "customer_reranker",
"reranker_name": "Rerank_Multilingual_v1",
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a trailing comma after the reranker_name value which will cause JSON parsing errors.

Suggested change
"reranker_name": "Rerank_Multilingual_v1",
"reranker_name": "Rerank_Multilingual_v1"

Copilot uses AI. Check for mistakes.
* Optional tool configurations, for example Corpora Search tools configured
to grant access to various corpora
:::tip Note
When using the corpora search tool
Copy link

Copilot AI Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The tip note appears incomplete - it starts to mention something about the corpora search tool but doesn't provide any actual information or guidance.

Suggested change
When using the corpora search tool
When using the corpora search tool, ensure that your agent's `query_configuration` is set up correctly. This allows you to specify search parameters such as which corpora to query, filters, and ranking options. For more details, see the [Query API documentation](/docs/api-reference/search-apis/search) and the [corpora_search tool reference](/docs/agents/tools/corpora-search).

Copilot uses AI. Check for mistakes.
@pwoznic pwoznic requested a review from koala-woman October 14, 2025 23:10
* Optional tool configurations, for example Corpora Search tools configured
to grant access to various corpora
:::tip Note
When using the corpora search tool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Incomplete sentence?

API. For more information, check out our [**Agents Quick Start**](/docs/agents/agents-quickstart).
:::

## Configure agent search behavior
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we have web search too, perhaps make it clear by saying "corpus search" instead of just "search".


## Configure agent search behavior

You configure search behavior for Vectara agents using the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

corpus search


You configure search behavior for Vectara agents using the
`query_configuration` parameter within the `corpora_search` tool. This
parameter uses the same `search` object formatting as the [Query API](/docs/api-reference/search-apis/search). Before
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really accurate? Isn't this both the search object, and generation?
Also, perhaps also add reference to the api doc page where this objects are? https://docs.vectara.com/docs/rest-api/query-corpus
wdyt?

layout="stacked"
/>

### Search configuration
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we really repeat this configuration here or just reference the docs? By referring, if a new parameter is added, it'll automatically get reflected.

parameter uses the same `search` object formatting as the [Query API](/docs/api-reference/search-apis/search). Before
using this tool, ensure that you have at least one indexed corpus with
data. The LLM cannot modify these predefined search parameters during
conversation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where do we document the additional_parameters arg?

@pwoznic pwoznic requested a review from nikron October 28, 2025 22:52
@pwoznic
Copy link
Contributor Author

pwoznic commented Oct 28, 2025

@nikron This PR started as updates to clarify agent search behavior. I decided to also incorporate some of the items from yesterday's meeting like moving the agent 101 stuff, making instructions more prominent, architecture updates, session keys, etc.

lets you customize instructions based on who is talking to the agent.
- **Tools use dynamic references**: Tools can use `argument_override` to
dynamically reference session metadata. This allows tools to filter data or
customize behavior based on the current user or context.
Copy link
Contributor

@nikron nikron Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Giving the agent a restricted tool fit for purpose.


Both agents and sessions use unique keys for identification:

- **Agent keys** (pattern: `agt_*`): You can specify a custom key like
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

agent keys don't require the agt_ prefix

@cjcenizal cjcenizal self-requested a review October 29, 2025 01:14
Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pwoznic I have some deep edits to suggest for the intro. Happy to hop on a call to go over them if you want! I haven't reviewed the other pages yet because I wanted to hear your thoughts on my suggestions first.

applications that go beyond basic question answering. Agents interpret user
input, reason through context, leverage external tools, and maintain continuity
across multi-turn interactions.
[AI agents](/docs/learn/ai-agents) are autonomous systems or programs that understand natural language
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we need this link, since it just goes to the next page in the section. I clicked it, thinking it would bring me to some other resource to provide new context, but when it took me to the next page it felt a little silly. 😄

Also, I think this paragraph can be simplified to:

Agents are autonomous systems that understand natural language and use tools and reasoning to accomplish tasks.

[**Learn more about Sessions →**](/docs/agents/sessions)


## Getting Started
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest elevating this section to immediately follow the initial introductory sentence. Engineers learn by doing.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, the order is incorrect. Writing instructions should go before tools.

Corpus["Corpus Search"]
Web["Web Search"]
%% Tools layer
AvailableTools["**Tools** (Corpora Search, Web Search, Lamba Tools)"]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo: "Lamba" -> "Lambda"

- Define the agent's persona and objectives.
- Customize responses based on context.
- Support dynamic variable substitution.
Vectara agents follow a structured flow where **instructions** define the
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move this content under a "Concepts" heading, along with everything below up until "Getting started".

I think we should also adjust this wording so that it's clearer that we're just snapping our fingers here and saying, "Listen up this is important. If you are to take anything away from this, it's this bit here."

The core concept to understand about agents is that their behavior is defined by instructions. The agent uses these instructions alongside information from a conversation session to determine how to respond to user input, including which tools to use.


---

- **Instructions guide agent behavior**: Instructions define the agent's persona,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove this section. It's largely redundant with the information from the Agents, Instructions, Tools, and Sessions sections below. It also introduces low-level details such as session metadata and tools' argument_override, which is better surfaced in the API docs, and discusses "templates" which are a detail of instructions and not a top-level concept on par with them (IMO).


## Agents

Agents act as the orchestration layer of the platform. They coordinate
Copy link
Collaborator

@cjcenizal cjcenizal Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is confusing to me because we're defining them as both "autonomous systems" and "orchestration layers". I don't know how to make sense of that?

There's also a lot of low-level detail that will be more helpful in the REST API docs.

agent's persona and objectives, customize responses based on context, and
support dynamic variable substitution from session metadata.

Instructions are the most important component to configure. Start here when
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this statement is redundant with the intro and the Getting Started section.

## Tools

Tools provide agents with capabilities to interact with data and external
systems. Vectara provides the following built-in tools:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The list of tools is better in the REST API docs. It will also make maintenance better because there will be fewer places to update.


[**Learn more about Tools →**](/docs/agents/tools)

## Sessions
Copy link
Collaborator

@cjcenizal cjcenizal Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should condense these four headings into bullets under a "Concepts" heading.

Concepts

The core concept to understand about agents is that their behavior is defined by instructions. The agent uses these instructions alongside information from a conversation session to determine how to respond to user input, including which tools to use.

These are the other core concepts when it comes to agents:

  • Tools: Tools provide agents with capabilities to interact with data and external
    systems.
  • Sessions: Sessions preserve context throughout a conversation so the agent can consider prior information when responding to a query.


## Sessions

Sessions maintain the state of conversations. They track all interactions
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like there is a lot of redundant info here:

  • state of conversation
  • track all interactions within a conversation
  • context across multiple turns

I think these are all the same thing?

Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a few comments to clarify the diagram:

  • I think "User/Application" should simply be "User", since there will also be a user of the application, so it all boils down to the user entering a query.
  • The agent can respond with things other than answers, e.g. clarifying questions, tool outputs, images, and search results. I suggest changing "Answer" to "Response", to capture all the possibilities.
  • "Agent" looks like a component of "Agent session" here which seems inverted. I chatted a bit with Pranav and he suggested swapping the two, which really helped me make sense of this entire diagram. Let's also just call it "Session", since we make it very clear in this page how they relate to agents.
  • Unless we care to explain the difference between "Direct answer" and "Synthesize response" I think we should just remove "Direct answer". From the diagram, it's not clear what the difference is between the two.
  • Agents use an MCP tool to access the MCP client, so I suggest renaming this bit to "MCP Tool + Client" to create symmetry with the other Tools.
  • There are many colors and line treatments here, the meaning of which aren't clear. I suggest we use the same gray boxes for everything inside of Vectara (Agent, Session, Instructions, Tools, Agent Query, MCP Tool + Client), and the same black boxes for everything outside of Vectara (User, External MCP Server). I also suggest we avoid using the dashed lines, and just use the same line style for all of the arrows. The meaning of the different line styles aren't clear to me.
Image

Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pwoznic I reviewed the Instructions section and will move onto Tools tomorrow.

behavior, and guidelines of an agent before any user interaction begins.
:::

You can configure instructions for an agent in two ways: **inline** or
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the Inline Instructions and Shared (Reference) Instructions sections should be moved into the POST Create Instruction API docs because that's where the engineer will be looking when they need this info.

Also, the API docs need to be reordered, so that Instructions, Tools, and Tool Servers follow Agent Sessions.

Image

Copy link
Contributor Author

@pwoznic pwoznic Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll initially make updates/moves to the long-form API docs (API Concepts chapter). Adding different headings and subsections to the yaml is more complex. It can be done, but separately on the platform repo. The reordering must also be done in the yaml in the tag section.

and providing the rules for the underlying Large Language Model (LLM).

Instructions use the [Apache Velocity](https://velocity.apache.org/) templating
Instructions define the behavior that agents follow. They are the most important
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest replacing this content with what we have in the overview. The repetition is useful because a) it helps folks connect the dots and b) if someone has already read it they know they can skip over it. Mentioning Velocity templating is out of place here IMO because it's too low-level. Better to save that for the section dedicated to the topic.

An agent's behavior is defined by the instructions you give it. The agent uses these instructions alongside information from a conversation session to determine how to respond to user input, including which tools to use.

engine, which enables you to dynamically insert variables into your prompts.


- **Define agent behavior**: Set the persona, objectives, response
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These bullets confuse me... can we remove them? They're a lot of very specific detail, and yet there isn't enough information for me to make use of the detail. I end up kind of overloaded when I read it. For example, the ${session.metadata.field} and argument_override stuff doesn't mean anything to me without more explanation.

:::tip Note
Instructions in Vectara are referred to **system prompts** in other LLM APIs
(such as Gemini, Mistral, and OpenAI). If you are familiar with _system prompts_
terminology, instructions work the same way. Instructions define the role,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This tip is great, but instead of "work the same way", I think we should phrase it as "serve a similar purpose". Our instructions don't work the same way, e.g. our instructions can be used as templates.

layout="stacked"
/>

## Template Context
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should change this heading to "Templating". "Templating" is a concept, whereas "Template context" is a technical term, and I think concept come across as more accessible to folks who may not be familiar with the technical details yet.


### Tools context

- `$tools`: A list of tools available to the agent. You can iterate over tools to display their names and descriptions in your instructions.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This shouldn't be a bullet.

- `${agent.metadata.field}`: Access agent-level metadata (version,
configuration, environment).

## Use metadata in instructions
Copy link
Collaborator

@cjcenizal cjcenizal Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this section or the "Session metadata examples" are useful. By describing "you can do X" without showing how to do it, it sounds like marketing. I suggest removing them.

Copy link
Collaborator

@cjcenizal cjcenizal Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think what we should really do is ask a PM or DevRel to choose 3 or 4 of the coolest items from these lists and then write up a blog post showing how to implement them step-by-step. CC @koala-woman @ofermend

- `escalation_needed` (true/false): Track when to hand off to human.
- `channel` (web, mobile, API, voice): Adjust response format and length.

### Metadata usage example
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OTOH this example is very useful! I suggest taking the entire example and moving it into the "Metadata context" section. It doesn't need a new heading.

The instruction renders as:
> "Hello! I see you're John Doe from North America. I'm here to help you with billing inquiries."
### Custom variables
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this content belongs in the POST Test Instruction API docs.

render with different context values before deploying them in production agents.

:::note Important
For the current version, agent and session metadata are not directly included
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very easy to overlook because it looks like a footnote. But it contains critical information for actually using the stuff described above.

However, I'm confused about what's described here. It mentions "instruction template scope" but then it mentions "tool excecution". Is this about instructions, tools, or both? @pranavh4 Can you clarify this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We are adding this to the instruction template scope very soon, I agree we should remove this note

Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the Tools page.

* An input schema describing accepted parameters (in JSON Schema format).
* Metadata for categorization.
* Runtime availability (enabled/disabled).
* Runtime availability (enabled or disabled).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should focus long-form doc intros on the concept, and leave details to the REST API docs. I suggest removing these bullets and echoing the same language we used in the top-level intro.

Tools provide agents with capabilities to interact with data and external systems. An agent uses the conversational context and its instructions to decide which tools to call, and how use the tools' responses to respond to the user's query.

Vectara offers a number of useful tools out-of-the-box, but you can also build your own. For a complete list of available tools, refer to the Tools API docs.

* **web_search:** Retrieves results from the public web.
Vectara Agents support the following tool types:

### Built-in tools
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all of this information about specific tools should be moved to the List Tools API docs.

control over document structure, sections, metadata, tables, and images. This tool
enables agents to dynamically add content to your knowledge base during conversations.

## Tool permissions and security
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove this section, unless we can link out to a resource that provides more context.

Augmented Generation (RAG). This tool provides summary and relevant search results using
the same default parameters as the [Query API](/docs/api-reference/search-apis/search).
For more details about configuring the `corpora_search` tool, see
[**Configure Agent Search Behavior**](/docs/agents/#configure-agent-search-behavior).
Copy link
Collaborator

@cjcenizal cjcenizal Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should extract the "Configure agent corpus search behavior" section from the Agent page and move it into this page instead, since that section is a great example on how to configure tools for their most common use case (retrieval). I think "Searching corpora with tools" would be a more accessible heading.

Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the Agent page.

agent decides how to respond to user input, when to invoke tools, and how to
manage conversation state.

```mermaid
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "core orchestration unit" is a very internal way of looking at agents. I think we should avoid this language, to keep the docs accessible and developer-focused. We can still explain how things work internally, but we can make these explanations accessible by anchoring them to concepts.

I suggest rewriting the intro at the top of this page as:

Agents are autonomous systems that understand natural language and use tools and reasoning to accomplish tasks. To do this, they must make decisions:

  • Interpreting user input
  • Calling tools, and with what arguments
  • Managing conversation state

Internally, they use an LLM-driven orchestration pipeline to make these decisions.

```

Each agent is configured with:
:::tip Quick Start
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is an odd place to surface the link to the Quick Start. I think this will be more discoverable in the top-level Agents page.

For a complete step-by-step guide with code examples, see [**Agent Quick Start**](/docs/agents/agents-quickstart).
:::

## Configure agents
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all of the content under this heading belongs in the Create Agent API docs.

treat `first_step` as "the step." It's the only step your agent executes.
:::

Agents operate through a conversational step architecture, processing user
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this paragraph is redundant though. I think we should remove it.

API. For more information, check out our [**Agents Quick Start**](/docs/agents/agents-quickstart).
:::

## Configure agent corpus search behavior
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As mentioned prior I think this should move to the Tools page.

layout="stacked"
/>

This example demonstrates a complete `tool_configurations` object for a
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove this example. It kind of makes the point that the Corpora Search tool supports the same configuration options as the Query API, but it's a bit over the top IMO. The Query API docs have tons of examples already.




## Example agent definition
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this belongs in the API docs.

layout="stacked"
/>

## Model configuration
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"LLM" is more recognizable and meaningful, and I think we can also tie back to the role of the LLM within the agent, to make this heading clearer. So I suggest changing this heading to "Orchestrating behavior with the LLM".

- **Cost optimization**: Balance performance with token usage.
- **Retry configuration**: Configure automatic retry behavior for transient failures.

### Retry configuration
Copy link
Collaborator

@cjcenizal cjcenizal Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we make this section much terser? It seems strange to dedicate so much content to retries.

Can we also change the heading to "Using retries to improve user experience"?

Using retries to improve user experience

When agents interact with LLMs, transient failures like network interruptions can disrupt communication between the agent and the LLM. You can configure your agent to resume disrupted communication to ensure a smooth user experience.

Here's a brief explanation of how retries work:

  • max_retries: After an error, the agent will retry its request to the LLM this many times.
  • initial_backoff_ms: This is how many milliseconds the agent will wait before retrying, to give the cause of the error time to resolve.
  • backoff_factor: Every time the agent retries, it can multiply the last retry delay by this number, increasing the wait between retries. This is like giving a toddler a longer and longer timeout if it continues to misbehave.
  • max_backoff_ms: The maximum time you want the agent to wait between retries, so the backoff_factor doesn't create an unreasonably long delay for your users.

I'd delete the section under the "Exponential backoff" heading, too, because it goes way too deep into this topic.

layout="stacked"
/>

### 2. Send messages to the agent
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should move the entire "Chat with your agent" section into the "Sessions" page and we should end this page with "To chat with your agent, read on about Sessions".

Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the Sessions page.


import CodePanel from '@site/src/theme/CodePanel';

A session is a contextual container for a conversation between a user (or
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can make this more accessible and much simpler by focusing on the concept. My suggestion:

Agents keep track of their conversations with sessions. One conversation is one session. To begin chatting with an agent, you need to create a session first. Each message sent by the user and each response from the agent is appended to the session.

Sessions support lifecycle operations such as creation, update, retrieval,
listing, and deletion.

## Session keys
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's insert a section preceding this one called "Chatting with an agent". This section will contain the example from the end of the Agent page. That way folks will get an immediate example of the concepts just described in the intro, and it will also enable them with a mini "quick start".


## Session keys

Every session has a unique `key` that identifies it in API calls. You have
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the content under this heading belongs in the API docs.

When we move them there, I suggest we elaborate a bit and tie back to why the reader should care.

When issuing API requests to retrieve or chat with a session, you need to identify which session you're referring to. You do this with the session's key, which is assigned when the session is first created. If you don't specify the key when you create the session, Vectara will automatically generate one for you. If you prefer your session keys to convey meaning, you can define the key as part of the request.

Every session has a unique `key` that identifies it in API calls. You have
two options for session keys, **auto-generated** or **custom**:

### Auto-generated keys
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think these code examples are necessary. The above explanation is sufficient for the reader to understand.

layout="stacked"
/>

**Common patterns:**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove this. The reader is in a better position to decide what kinds of keys make the most sense.

- Support ticket: `ticket_{ticket_number}_session`


## Session Metadata
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about "Define session context with session metadata" to bring it back to the use case?


## Session Metadata

Session metadata provides context-specific data to agents, enabling
Copy link
Collaborator

@cjcenizal cjcenizal Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we frame this in terms of the user a bit more? For example:

Let's say you want to make the agent aware of the user's preferred language, so that it can respond in that language. Or imagine you want to tell the agent that the user is only permitted access to a specific type of data. You can do all this with session metadata. Session metadata enables you to inject arbitrary information into the session context, which your instructions and tools can refer to.

Here's how you might implement the language preference and access control examples.

(Code snippet from below)

Then you'd write an instruction like this, to respond in the preferred language.

(New code snippet)

And you'd configure a corpora search tool like this, to limit the user's access to certain corpora.

(New code snippet)

"key": "user_12345_session",
"name": "Customer Support Session",
"metadata": {
"customer_id": "12345",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's limit this to just language and user_role, to support the preferred language and access control examples.

/>


## Agent events
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can move the rest of the content from here, down, into the API docs.

Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not part of this PR, but I reviewed the MCP section. I think we should remove the content under the "Why MCP is important" heading, to keep the docs focused on how MCP pertains to Vectara.

Let's also remove the entire "Conversational AI" section. I don't find it very helpful.

Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK all done! I reviewed the remaining pages. Thank you so much for working so hard on this @pwoznic. It will make a big difference for the folks using our agents.

First, let's create a simple research assistant agent that can search the web.
This example requires no corpus setup, so you can follow along immediately.

:::tip Tip
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should edit this page down to minimize the time it takes to go from zero to agent.

Let's reduce the intro to:

Build a simple research assistant agent that can search the web in response to user queries. To learn more about agents, refer to the Agents API docs or read about agent concepts.

Then let's walk the user through creating the agent in Console, show the user the underlying API request for creating the agent, and then provide code snippets for creating a session and sending user message events to it with the API.

The "Response example", "Complete Example" (with curl), "Expected response", and "Response format" sections can be removed. I think they provide too much detail for a quick start.

"type": "inline",
"name": "Additional Guidelines",
"template": "Always be polite and professional. Today's date is currentDate.",
"template": "Always be polite and professional. Today's date is ${currentDate}.",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docusaurus is trying to interpolate currentDate which causes this page to throw an error. You need to escape the $, {, and } characters like this:

\$\{currentDate\}

## What is an agent?

An agent is comprised of three main components of functionality:
An agent is an AI-powered orchestrator comprised of three main components:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it really confusing to have an entire parallel set of docs called "API concepts", while we also have long-form concept-focused docs and REST API docs. Much of the content is duplicated, which makes it harder for the reader to know where to look for the info they need. I think we should remove these and divvy up the content among the long-form docs and REST API docs.

models, instructions, and tools to handle queries intelligently. You can
create agents with the Vectara Console or programmatically through the API.
The Console is ideal for quick setups, while the API suits automation or advanced integrations.
The Console is ideal for quick setups, while the API suits automation or advanced
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think folks need a manual on how to use Console. We should remove most of these Console docs, and lean on a few quick starts to help users get momentum. For the most part the Console UI should be self-explanatory.

@@ -0,0 +1,88 @@
---
id: ai-agents
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should delete this page. It repeats a lot of content that exists elsewhere and contains a lot of claims of capabilities but zero guidance on applying them.

other context you provide when creating a session.
- **Guide tool usage**: Tell the agent when and how to use specific tools,
what information to gather, and how to structure responses.
- **Work with argument overrides**: Instructions guide what the agent does,
Copy link
Contributor

@pranavh4 pranavh4 Oct 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I dont think argument_overrides should even be mentioned in instructions.md, since they're not related at all. They only apply to tool_configurations and are difficult to understand as it is

Copy link
Collaborator

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Had some comments re artifacts.

use these references to access files without including the full content in
every request.

## How artifacts work
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This heading should be nested under "Artifacts".


To chat with your agent, read on about [Sessions](/docs/agents/sessions).

## Artifacts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because artifacts are so pertinent to the session, I think this content should be moved to the Sessions page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants