-
Notifications
You must be signed in to change notification settings - Fork 15
update(docs): Enhance details about configuring agent search behavior #516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
pwoznic
wants to merge
10
commits into
vectara:main
Choose a base branch
from
pwoznic:updates/agt-qry-cfg
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 5 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
e163d69
Add more details about configuring agent search behavior
pwoznic 05c74a4
updates based on review
pwoznic e43700d
Some reorganizing and clarifications on agent and instruction behavior
pwoznic 2c44d35
Update agent-platform-overview.md
pwoznic 960f0af
Update agent-platform-overview.md
pwoznic bfbb953
Update agent-platform-overview.md
pwoznic dbefd9b
updates
pwoznic e485c76
Add artifact information
pwoznic 4545758
Move artifacts from agents to sessions
pwoznic b68d242
Update sessions.md
pwoznic File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,171 +1,88 @@ | ||
| --- | ||
| id: agent-platform-overview | ||
| title: Agents | ||
| title: How Vectara agents work | ||
| sidebar_label: Agents | ||
| --- | ||
|
|
||
| Vectara Agents enable enterprises to build sophisticated, enterprise-grade intelligent | ||
| applications that go beyond basic question answering. Agents interpret user | ||
| input, reason through context, leverage external tools, and maintain continuity | ||
| across multi-turn interactions. | ||
| Agents are autonomous systems that understand natural language and use tools | ||
| and reasoning to accomplish tasks. | ||
|
|
||
| Unlike traditional RAG systems that simply retrieve documents and pass them to | ||
| a language model, Vectara agents provide orchestrated workflows capable of | ||
| taking action, retrieving information, invoking APIs, or maintaining user | ||
| sessions. | ||
|
|
||
| ## What are agents? | ||
|
|
||
| Agents provide a comprehensive framework for building AI-powered | ||
| applications with the following capabilities: | ||
|
|
||
| - **Understand context**: Maintain conversation history across multiple | ||
| interactions. | ||
| - **Use tools**: Access and manipulate data through a variety of tools, including | ||
| corpus search and web search. | ||
| - **Follow instructions**: Execute complex workflows based on customizable | ||
| instructions and templates. | ||
| - **Stream responses**: Provide real-time updates as agents process requests. | ||
|
|
||
| ## What agents can accomplish | ||
|
|
||
| | **Desired outcome** | **Workflow** | | ||
| |---|---| | ||
| | **Automate customer support workflows** | <ol><li>Agent handles L1 support</li><li>Searches knowledge bases</li><li>Escalates complex issues</li><li>Creates tickets</li></ol> | | ||
| | **Build intelligent research assistants** | <ol><li>Agent searches multiple data sources</li><li>Synthesizes findings</li><li>Maintains research context across sessions</li></ol> | | ||
| | **Create workflow automation systems** | <ol><li>Agent triggers business processes</li><li>Sends notifications</li><li>Updates CRM systems based on natural language requests</li></ol> | | ||
| | **Develop conversational enterprise tools** | <ol><li>Agent maintains context</li><li>Handles multi-step processes</li><li>Integrates with existing business systems</li></ol> | | ||
| | **Deploy autonomous business processes** | <ol><li>Agent monitors conditions</li><li>Makes decisions</li><li>Executes actions without human intervention</li></ol> | | ||
|
|
||
| :::tip Conversational AI Platform | ||
| Agents are perfect for building conversational AI experiences like virtual | ||
| assistants and chatbots. [**Learn more about Vectara's Conversational AI →**](/docs/agents/conversational-ai) | ||
| ::: | ||
|
|
||
| ## How agents work | ||
|
|
||
| Agents use **tools** to access information and take action. Each tool provides | ||
| a specific capability, such as searching a specific corpus, accessing a web | ||
| page, or interacting with an external service. When creating or configuring an | ||
| agent, you select which tools it can use which helps ensure the following: | ||
|
|
||
| * A clear separation between orchestration logic (the agent) and the | ||
| capabilities provided by tools. | ||
| * Auditable permissions for every data retrieval or external action. | ||
| * Reusable tools that can serve multiple agents. | ||
|
|
||
| ## Agents | ||
|
|
||
| Agents act as the orchestration layer of the platform: | ||
| - Coordinate between different tools and data sources. | ||
| - Maintain conversation context through sessions. | ||
| - Follow customizable instructions to guide behavior. | ||
| - Support streaming responses for real-time interaction. | ||
| ## Getting Started | ||
|
|
||
| ## Tools | ||
| To build your first agent: | ||
|
|
||
| Tools provide agents with capabilities to interact with data and external systems: | ||
| - **Corpora Search**: Query your Vectara corpora with semantic search. | ||
| - **Web Search**: Access current information from the internet. | ||
| - **MCP Tools**: Integrate with external services through the [Model Context Protocol (MCP)](mcp). | ||
| 1. [**Create an agent**](/docs/console-ui/agents/create-an-agent): Define the agent's name, description, and available tools. | ||
| 2. [**Write instructions**](/docs/console-ui/agents/create-an-agent#instructions): Create templates that guide the agent's behavior. | ||
| 3. [**Configure tools**](/docs/console-ui/agents/create-an-agent#tools): Set up corpus access permissions and any external integrations. | ||
| 4. [**Test agents with sessions**](/docs/console-ui/agents/use-agents): Start conversations and iterate on your configuration. | ||
|
|
||
| ## Sessions | ||
| ## Concepts | ||
|
|
||
| Sessions maintain the state of conversations: | ||
| - Track all interactions (also known as events) within a conversation. | ||
| - Preserve context across multiple turns. | ||
| - Enable multi-turn reasoning and follow-up questions. | ||
| 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 | ||
| These are the other core concepts when it comes to agents: | ||
|
|
||
| Instructions guide agent behavior using Velocity templates: | ||
| - Define the agent's persona and objectives. | ||
| - Customize responses based on context. | ||
| - Support dynamic variable substitution. | ||
| * **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. | ||
|
|
||
| <div className="mermaid-container"> | ||
| ```mermaid | ||
| flowchart TD | ||
| %% Nodes | ||
| User["User / Application"] | ||
| Session["**Agent Session**"] | ||
| Agent["**Agent**"] | ||
| User["User"] | ||
| Session["**Agent**"] | ||
| Agent["**Session**"] | ||
| Inst["**Instructions**"] | ||
| Query["**Agent Query**"] | ||
|
|
||
| %% Tools + execution layer | ||
| Tool["**Tool**"] | ||
| ToolServer["**Tool Server**"] | ||
|
|
||
| %% Data/targets | ||
| Corpus["Corpus Search"] | ||
| Web["Web Search"] | ||
| %% Tools layer | ||
| AvailableTools["**Tools** (Corpora Search, Web Search, Lambda Tools)"] | ||
|
|
||
| %% MCP | ||
| MCP["**MCP Client**"] | ||
| MCP["**MCP Tool + Client**"] | ||
| ExtMCP["External MCP Server"] | ||
|
|
||
| %% Core flow | ||
| User -->|Query| Session | ||
| Session -->|Provides context| Agent | ||
| Agent --> Inst | ||
| Inst --> Query | ||
| Agent --> Query | ||
| Query -->|Direct answer| Session | ||
| Query e4@<==> Tool | ||
| Tool e5@<==> Query | ||
|
|
||
| %% Internal tool execution paths | ||
| Tool e3@<--> ToolServer | ||
| ToolServer e7@<--> Tool | ||
| ToolServer --> Corpus | ||
| ToolServer -.-> Web | ||
| Session -->|Conversation state| Agent | ||
| Agent --> |Configured with| Inst | ||
| Inst --> |Guide agent behavior| Query | ||
| Query --> Session | ||
|
|
||
| %% Tool execution paths | ||
| Query <--> AvailableTools | ||
|
|
||
| %% Optional MCP path (de-emphasized) | ||
| Tool e2@<--> MCP | ||
| MCP e6@<--> Tool | ||
| Query <--> MCP | ||
| MCP -.-> ExtMCP | ||
|
|
||
| %% Return to user | ||
| Query e1@==>|Synthesizes response| Session | ||
| Session -->|Answer| User | ||
| Query -->|Synthesizes response| Session | ||
| Session -->|Response| User | ||
|
|
||
| %% Classes for color grouping | ||
| classDef userEntry fill:#0D2FFF,color:#fff,stroke:#0D2FFF,stroke-width:2px; | ||
| classDef session fill:#182033,color:#fff,stroke:#0D2FFF,stroke-width:2px; | ||
| classDef agentic fill:#07E3D7,color:#182033,stroke:#00ABA0,stroke-width:2px; | ||
| classDef userEntry fill:#182033,color:#fff,stroke:#0D2FFF,stroke-width:2px; | ||
| classDef session fill:#EEF2F8,color:#182033,stroke:#787878,stroke-width:2px; | ||
| classDef agentic fill:#EEF2F8,color:#182033,stroke:#787878,stroke-width:2px; | ||
| classDef toolLayer fill:#EEF2F8,color:#182033,stroke:#787878,stroke-width:2px; | ||
| classDef corpus fill:#E9368E,color:#fff,stroke:#E9368E,stroke-width:2px; | ||
| classDef external fill:#F3F4F6,color:#111827,stroke:#9CA3AF,stroke-width:1.5px,stroke-dasharray: 6 4; | ||
| classDef mcpTP fill:#FFF4B8,color:#182033,stroke:#FFD700,stroke-width:1.5px,stroke-dasharray: 6 4; | ||
| classDef external fill:#182033,color:#fff,stroke:#0D2FFF,stroke-width:2px; | ||
| classDef mcpTP fill:#EEF2F8,color:#182033,stroke:#787878,stroke-width:2px; | ||
|
|
||
| %% Assign classes | ||
| class User userEntry; | ||
| class Session session; | ||
| class Agent,Inst,Query agentic; | ||
| class Tool,ToolServer toolLayer; | ||
| class Corpus corpus; | ||
| class Web,ExtMCP external; | ||
| class AvailableTools toolLayer; | ||
| class ExtMCP external; | ||
| class MCP mcpTP; | ||
|
|
||
| %% Animations | ||
| e1@{ animation: slow } | ||
| e2@{ animation: slow } | ||
| e3@{ animation: slow } | ||
| e4@{ animation: slow } | ||
| e5@{ animation: slow } | ||
| e6@{ animation: slow } | ||
| e7@{ animation: slow } | ||
| ``` | ||
| </div> | ||
|
|
||
| ## Getting Started | ||
|
|
||
| To build your first agent: | ||
|
|
||
| 1. [**Create an agent**](/docs/console-ui/agents/create-an-agent): Define the agent's name, description, and available tools. | ||
| 2. [**Configure tools**](/docs/console-ui/agents/create-an-agent#tools): Set up corpus access permissions and any external integrations. | ||
| 3. [**Write instructions**](/docs/console-ui/agents/create-an-agent#instructions): Create templates that guide the agent's behavior. | ||
| 4. [**Test agents with sessions**](/docs/console-ui/agents/use-agents): Start conversations and iterate on your configuration. | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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:
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.