Skip to main content
Knowledge gives agents access to your documents, PDFs, and data - so they can answer questions about YOUR content.

Quick Start

from praisonaiagents import Agent

# Agent with knowledge from a PDF
agent = Agent(
    instructions="Answer questions from the document",
    knowledge=["company-handbook.pdf"]
)

agent.start("What is our vacation policy?")
Just add knowledge=["your-file.pdf"] to give agents access to your documents.

Supported File Types

PDF

.pdf

Text

.txt, .md

Documents

.docx

Folders

Entire directories
# Multiple sources
agent = Agent(
    instructions="Answer from all documents",
    knowledge=[
        "handbook.pdf",
        "policies.txt",
        "docs/",  # Entire folder
    ]
)

How It Works

StepWhat Happens
LoadDocuments are processed and indexed
SearchAgent finds relevant sections
AnswerResponse is generated from found content

Advanced Configuration

1

Basic - Just Files

agent = Agent(
    instructions="Answer questions",
    knowledge=["file.pdf"]
)
2

Custom Vector Store

agent = Agent(
    instructions="Answer questions",
    knowledge={
        "sources": ["docs/"],
        "vector_store": {
            "provider": "chroma",
            "config": {
                "collection_name": "my_docs",
                "path": ".praison"
            }
        }
    }
)
3

With Memory

agent = Agent(
    instructions="Answer questions and remember context",
    knowledge=["docs/"],
    memory=True  # Remember conversation
)

Complete Example

from praisonaiagents import Agent

# Customer support agent with company knowledge
support_agent = Agent(
    name="SupportBot",
    instructions="""You are a customer support agent.
    Answer questions using the company documentation.
    If you don't find the answer, say so.""",
    knowledge=[
        "faq.pdf",
        "product-manual.pdf",
        "policies/"
    ]
)

# Ask questions about your documents
support_agent.start("How do I return a product?")
support_agent.start("What's the warranty period?")

Use Cases

Customer Support

Answer questions from FAQs and manuals

HR Assistant

Answer policy questions from handbooks

Research

Query research papers and reports

Documentation

Search technical documentation

Best Practices

Begin with a few key documents, then expand
Well-organized documents work better than many messy ones
Refresh knowledge when documents change
Verify the agent finds correct information

Next: Agent Tasks

Learn how to define and manage agent tasks.