Skip to main content
Load and process documents for agent knowledge.

Quick Start

1

Load Documents

use praisonai::{Agent, Knowledge};

let knowledge = Knowledge::new()
    .add_file("report.pdf")
    .add_file("notes.txt")
    .add_directory("docs/")
    .build()?;

let agent = Agent::new()
    .name("Analyst")
    .knowledge(knowledge)
    .build()?;

agent.chat("Summarize the report").await?;

Supported Formats

FormatExtension
PDF.pdf
Text.txt
Markdown.md
Word.docx
HTML.html