Skip to main content

Knowledge Overview

Knowledge allows your agents to answer questions using your own documents - PDFs, text files, web pages, and more.

How It Works

  1. Add documents → Chunked and indexed
  2. Ask questions → Agent retrieves relevant context
  3. Get answers → With source citations

Quick Start

from praisonaiagents import Agent

agent = Agent(
    name="Research Assistant",
    knowledge=["research.pdf", "docs/"]
)

response = agent.start("What are the key findings?")
That’s it! The agent can now answer questions using your documents.

When to Use

ApproachBest ForLink
Agent(knowledge=[...])Most use casesQuick Start →
Knowledge() classCustom indexingKnowledge API →
RAG() classCustom pipelinesRAG Module →

Knowledge vs Memory vs RAG

FeatureKnowledgeMemoryRAG
PurposeAnswer from documentsRemember conversationsRetrieve + Generate
Data SourceFiles, URLsConversationsKnowledge base
UpdatesManual (re-index)AutomaticUses Knowledge
Best ForQ&A, researchChat continuityCitations, search

Next Steps