Documents
Process and analyze documents
Load and process documents for agent knowledge.
graph LR
subgraph "Document Processing"
F[📁 Files] --> L[📥 Loader]
L --> D[📄 Documents]
D --> K[📚 Knowledge]
end
classDef file fill:#6366F1,stroke:#7C90A0,color:#fff
classDef doc fill:#10B981,stroke:#7C90A0,color:#fff
class F file
class L,D,K docQuick Start
- Load Documents
rust 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
| Format | Extension |
|---|---|
.pdf | |
| Text | .txt |
| Markdown | .md |
| Word | .docx |
| HTML | .html |