Agentic Doc Library

When using Agentic Doc Library for document extraction from my local system, does the OCR or PDF reading happen locally, or are the files directly passed to an API? If the latter, what is the purpose of the various libraries included in the Agentic Doc wrapper?