How to build an AI Agent using Tars that answers questions from knowledge sources

Have you ever wondered how to create an AI agent that can answer questions from your company’s knowledge base? Whether your data lives in website content, PDF documentation, internal Notion docs, or SharePoint, building an intelligent assistant to access this information can transform how your team and customers find answers.
In this guide, I’ll walk you through creating an AI agent that can pull information from various knowledge sources to provide accurate, helpful responses. You’ll learn the entire process from start to finish, including a demonstration of a working agent and the backend configuration that powers it.
What You’ll Learn
- A demonstration of a fully functional AI agent built on internal documentation
- How to train a knowledge base using different loaders (websites, PDFs, CSVs)
- The concept of tools and using knowledge sources as tools
- Effective prompting strategies to enhance the user experience
Seeing the Agent in Action
Let’s start by looking at a complete AI agent I’ve already built. This particular assistant is trained on our company’s HR documentation and product knowledge. When team members (both new and existing) have questions about our HR processes, leave policies, insurance details, or even customer-related inquiries, they can simply ask this agent.
For example, when I ask, “How do I apply for leave?” the agent retrieves information from its knowledge base and provides a neatly formatted response. It explains the entire process, including details about emergency leave, approval processes, and application steps. The agent also cites where it found this information, ensuring transparency.
This type of AI agent has numerous applications:
- Customer support automation
- Website assistance for prospects and customers
- Internal team support for IT service management
- New employee onboarding
- And many more scenarios where quick access to information is valuable
Check out our case studies to see how businesses are implementing these solutions.
Building the Agent: The Backend Process
Creating this agent is simpler than you might think. Here’s how to do it using our platform:
- Visit hellotars.com and sign up for an account
- Access our AI agent builder
- Create a new agent
The interface uses a canvas with blocks (which we call “gambits”) that represent each step in the conversation flow. Let me walk you through setting up the key components:
Step 1: Configure the AI Agent Gambit
The first gambit is where you establish what the agent will do:
- Create a detailed prompt that defines the agent’s role and purpose
- Example: “You are an AI-powered team assistant for a company”
- Specify that the agent is connected to multiple knowledge sources
- Select the AI model you want to use
- Configure any additional settings as needed
The initial prompt is crucial as it sets the parameters for how the agent will behave. We have a separate video dedicated to effective prompting techniques that you can check out for more details.
Step 2: Connect Knowledge Tools
For the agent to access information, it needs knowledge tools:
- Add an AI Tools gambit to your flow
- Select “Knowledge as a Tool” from the available options
- Connect your prepared knowledge bases
The beauty of using knowledge as a tool is that you can have different knowledge sources for different types of information. The agent will intelligently choose which knowledge source to reference based on the question it receives.
For example, in my agent:
- One knowledge tool contains HR-related documentation (clearly titled “HR Process”)
- Another contains product information
- Each has a specific description that helps the agent determine which to use
When someone asks about leave policies, the agent knows to check the HR knowledge base rather than the product knowledge base. This separation prevents confusion and improves accuracy.
Step 3: Fine-tune the Agent’s Behavior
In the prompt, I’ve included specific instructions:
- Always pull information from the most relevant knowledge source
- Do not provide answers that aren’t in the knowledge base
- Always use the knowledge tool to prevent hallucination
I’ve also defined the tone and interaction style to ensure a consistent user experience.
That’s it! With just an agent gambit connected to knowledge tools, you can create a functional AI assistant in minutes.
Creating and Training Knowledge Bases
Now, let’s look at how to prepare the knowledge that powers your agent.
From your dashboard, access the Knowledge Bases section. Here, you can see all your existing knowledge bases and create new ones.
To add a new knowledge base:
- Click “Add Knowledge Base”
- Select the source type:
- Websites
- PDF documents
- CSV files
- Zendesk
- Slack
- And more
- Add your content:
- For websites: Enter URLs to be crawled
- For PDFs: Upload your documents
- Click “Train” to process the information
For example, if I want to add our main website as a source, I simply enter the URL, give it a name like “Main Website,” and start the training process. The system will crawl the site and make the content available to the agent.
You can continuously update knowledge bases by adding more sources. For PDFs, just upload additional documents and retrain.
Conclusion
Building an AI agent that answers questions from your knowledge sources doesn’t have to be complicated. With the right tools, you can create a powerful assistant that:
- Provides accurate information from your documentation
- Knows which knowledge source to reference for different questions
- Maintains a consistent tone and follows your guidelines
Whether you’re supporting customers on your website, helping new employees navigate company policies, or streamlining internal information access, these AI agents can transform how people interact with your knowledge base.
Ready to create your own AI agent? Visit hellotars.com, sign up for an account, and start building. Existing users can log in and access these features immediately.
In just minutes, you can have an intelligent assistant that puts your organization’s knowledge to work.
Want to learn more? Follow us on LinkedIn and X for the latest updates, or explore our YouTube channel for more tutorials.
Ish is the co-founder at Tars. His day-to-day activities primarily involve making sure that the Tars tech team doesn’t burn the office to the ground. In the process, Ish has become the world champion at using a fire extinguisher and intends to participate in the World Fire Extinguisher championship next year.
Learn why businesses trust us to automate their pre-sales and post-sales customer journeys.
Recommended Reading: Check Out Our Favorite Blog Posts!
Recommended Reading: Check Out Our Favorite Blog Posts!

This AI Hack will cut your content creation time in half — build your own Content Repurposing Agent today!

AI Agent to automate your LinkedIn content creation

The Ultimate Guide To WhatsApp Marketing For Retail & E-commerce
Our achievements in numbers
7+
years in the Enterprise Conversational AI space
700+
global brands that we’ve worked with
50m+
customer conversations automated
10+
countries with deployed Chatbots