Tutorial series

AI agents against your own company's data

Build an assistant that answers from your company's documents, queries your own database, takes real actions, and respects who is asking. One worked example, from a blank repository to something people trust.

36 chapters · 3 sections

Start with chapter 1 →

The example we build

Atlas, an internal assistant for a 200-person distributor. It answers from the company's policies, contracts and product specs, queries the orders and inventory database, and drafts quotes and tickets — and it refuses anything the person asking is not allowed to see.

1. Foundations

What you are building, whether you should build it, and the smallest version worth shipping.

  1. 01What an agent actually is4 min read
  2. 02When you need an agent, and when you do not4 min read
  3. 03The failure modes you will hit5 min read
  4. 04What "your own data" actually means5 min read
  5. 05Meet Atlas5 min read
  6. 06The architecture at a glance9 min read
  7. 07Choosing your first slice8 min read
  8. 08Setting up the project10 min read
  9. 09A hello-world agent11 min read
  10. 10What success looks like11 min read

2. The data layer

Everything that has to be true about your data before retrieval is worth attempting.

  1. 11Inventorying what the company actually has9 min read
  2. 12Documents, databases, APIs and inboxes10 min read
  3. 13Who is allowed to see what10 min read
  4. 14Reading the permission model you already have10 min read
  5. 15Structured against unstructured11 min read
  6. 16Personal data, and what never enters the system11 min read
  7. 17Residency, retention and what your contracts already promise11 min read
  8. 18Mapping sources to questions10 min read
  9. 19Freshness, source by source10 min read
  10. 20The data you should refuse to connect9 min read
  11. 21Building the source registry11 min read
  12. 22A dry run, by hand11 min read

3. Ingestion

Getting the data in: fetching, parsing, chunking, and keeping it current without re-reading everything.

  1. 23The ingestion pipeline, end to end12 min read
  2. 24Pulling from a document store12 min read
  3. 25Pulling from a relational database11 min read
  4. 26Pulling from a third-party API11 min read
  5. 27Parsing PDFs, and why it is harder than it looks12 min read
  6. 28Spreadsheets, and the tables inside documents12 min read
  7. 29Email and chat archives12 min read
  8. 30Chunking: the decision that quietly determines quality12 min read
  9. 31Chunk size, overlap, and measuring instead of guessing11 min read
  10. 32Keeping document structure through the chunker11 min read
  11. 33Metadata: what to attach to every chunk11 min read
  12. 34Incremental sync and change detection11 min read
  13. 35Deletions, and the chunk that outlives its document12 min read
  14. 36Running the first full ingest12 min read