Free

How to build a first AI agent for documents

Start with three sample notes and a read-only task. Test a sourced answer, missing information, unauthorized access and a tool failure.

All chapters

An AI agent uses the tools available to it to complete a task, such as finding a document and answering with a source link. For your first project, choose one operation that is easy to check manually. Do not start with an assistant for everything.

A practice agent can answer questions using three fictional delivery notes. Asked about delivery times, it should find the right note and show the evidence. If there is no information about returns, it reports that no answer is available. This exercise does not need email sending or access to every file on the computer.

Prepare questions with known answers, a question without an answer and a document the agent is not allowed to access. Also test a tool failure. The agent should explain the problem rather than replace a missing source with a guess. Save the original notes and results so you can repeat the checks after changes.

Start with the full plan: An assistant for your own documents. It divides the work into steps with prompts.

To choose your first practical task, paste into Codex or Work:

Prepare a practice agent that answers using three fictional delivery notes in a separate folder. Identify the available tools and limit the task to reading those notes. Test an answer with a source, a missing answer, an inaccessible document and a tool failure. Save a working example and explain how to stop it. If a required tool is unavailable, show the specific obstacle.
Saved