A step-by-step guide to integrating local OCR into a .NET AI agent using LiteParse. The architecture separates concerns by routing document parsing through a dedicated tool: files are uploaded via an endpoint that returns a file ID, a DocumentTools class resolves the ID and shells out to the `lit` CLI to extract structured text, and the agent uses that text to answer questions or take actions. The tutorial covers building a budget tracker demo where the agent can read receipts and add transactions, with full code for the agent setup, file storage service, upload endpoint, parsing tool, and dependency injection wiring.

12m read timeFrom gettingstarted.ai
Post cover image
Table of contents
What you'll buildWhy this pattern worksPrerequisitesStep 1: Make sure the agent can use a document toolStep 3: Expose an upload endpoint that returns the file IDStep 4: Add the document parsing toolStep 5: Run LiteParse locally from .NETStep 6: Register everything in Program.csStep 7: Try the flow end to endWhat to expect when it worksTroubleshootingNext stepsConclusion

Sort: