Description
The py-vectara-agentic library empowers developers to construct sophisticated AI assistants and agents by leveraging Vectara's capabilities and the Agentic RAG pattern. Built upon the LlamaIndex Agent framework, this Python library streamlines the process of creating tools that interface with Vectara corpora. Its core strength lies in its ability to rapidly generate Vectara RAG tools or search tools with minimal code, significantly accelerating development.
This library offers flexibility in agent design, supporting various agent types such as ReAct and Function Calling. It boasts pre-built domain-specific tools tailored for sectors like finance and legal, enhancing its applicability across different industries. A key advantage is its multi-LLM integration, allowing seamless connection with popular providers including OpenAI, Anthropic, Gemini, GROQ, Together.AI, Cohere, and AWS Bedrock. For developers focused on understanding agent behavior and performance, py-vectara-agentic includes built-in observability support with Arize Phoenix.
Advanced users can extend agent capabilities through custom workflows defined using the `run()` method, enabling structured, multi-step interactions. The library also provides robust streaming and real-time response generation, crucial for interactive applications and improving user experience by displaying responses as they are generated. Vectara Hallucination Correction (VHC) is integrated, allowing for the analysis and correction of agent responses based on factual content retrieved by VHC-eligible tools. The library also includes features for tool validation and supports custom tool creation from Python functions.
Key features include rapid tool creation for Vectara RAG and search, support for diverse agent types, multi-LLM integration, built-in observability, and workflow support for complex interactions. The library is suitable for developers, AI engineers, and researchers looking to build intelligent agents that can effectively query and utilize data stored within Vectara, with a focus on grounded and accurate responses.
py-vectara-agentic's Core Features
Rapid creation of Vectara RAG and search tools
Support for ReAct and Function Calling agent types
Integration with OpenAI, Anthropic, Gemini, GROQ, Together.AI, Cohere, and Bedrock LLMs
Built-in observability with Arize Phoenix
Customizable workflows via the `run()` method
Streaming and real-time response generation
Built-in support for Vectara Hallucination Correction (VHC)
Tool validation to ensure custom instructions match available tools
Ability to create custom tools from Python functions
Pre-built domain-specific tools for finance and legal
Support for metadata filtering in Vectara queries
Human-readable tool output formatting
Getting Started with py-vectara-agentic
Clone: Obtain the library from its GitHub repository.
Install: Run `pip install vectara-agentic` to install dependencies.
Configure: Set up Vectara API keys and corpus keys, and optionally LLM API keys.
Initialize: Create a `VectaraToolFactory` and define agent instructions.
Create Tools: Use `create_rag_tool` or `create_search_tool` for Vectara integration.
Instantiate Agent: Create an `Agent` instance with your tools and custom instructions.
Execute: Interact with the agent using chat, achat, stream_chat, or astream_chat methods.
Analyze: Utilize VHC or workflows for advanced response analysis and complex interactions.
py-vectara-agentic's Use Cases
- AI Assistant Development
- RAG Application Creation
- Data Analysis Agents
- Interactive Chatbots
- Workflow Automation
- LLM Integration








