> For the complete documentation index, see [llms.txt](https://docs.karini.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.karini.ai/agentic-ai-workshops/ai-foundation-labs.md).

# AI Foundation Labs

Five hands-on labs that teach the core building blocks of agentic AI on Karini AI: retrieval, vision, text-to-SQL, document automation, and multi-agent workflows.

Every production AI application is built from the same handful of patterns: an agent that searches your knowledge and cites its sources, one that reads images and documents, one that turns a question into a database query, and workflows that run on their own when another system calls them. These five labs teach those patterns one at a time, each through a complete, working use case you can open in a browser by the end.

The use cases span legal research, building codes, sales analytics, purchase orders, and legacy code, but the skills carry to any industry. Once you've built them here, you'll recognize them in every lab that follows.

## The Labs

| Lab                                                                                                              | What you build                                                                        | Pattern you learn                          | Time         |
| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ------------------------------------------ | ------------ |
| [Agentic RAG \[Legal\]](/agentic-ai-workshops/ai-foundation-labs/agentic-rag-legal.md)                           | A legal research copilot that answers from Supreme Court opinions with citations      | Retrieval, reranking, and guardrails       | 45 to 60 min |
| [Agentic RAG \[Building Inspector\]](/agentic-ai-workshops/ai-foundation-labs/agentic-rag-building-inspector.md) | A copilot that answers building code questions and reviews floor plans for violations | Retrieval plus vision on uploaded drawings | 45 to 60 min |
| [Generative BI Agentic Assistant](/agentic-ai-workshops/ai-foundation-labs/generative-bi-agentic-assistant.md)   | A sales analytics copilot that turns plain-language questions into SQL                | Catalogs and text-to-SQL                   | 45 to 60 min |
| [Intelligent Document Processing](/agentic-ai-workshops/ai-foundation-labs/intelligent-document-processing.md)   | A workflow that extracts purchase orders to JSON and sends a notification             | OCR, extraction, and webhook triggers      | About 60 min |
| [Code Optimization Agent](/agentic-ai-workshops/ai-foundation-labs/code-optimization-agent.md)                   | A workflow where one agent reviews a SAS script and another optimizes and commits it  | Multi-agent handoff and REST API tools     | About 60 min |

## Suggested Order

Start with [Agentic RAG \[Legal\]](/agentic-ai-workshops/ai-foundation-labs/agentic-rag-legal.md): it introduces prompts, tools, recipes, and copilots with a single agent. [Building Inspector](/agentic-ai-workshops/ai-foundation-labs/agentic-rag-building-inspector.md) adds vision, and [Generative BI](/agentic-ai-workshops/ai-foundation-labs/generative-bi-agentic-assistant.md) swaps documents for a database. Finish with [Intelligent Document Processing](/agentic-ai-workshops/ai-foundation-labs/intelligent-document-processing.md) and [Code Optimization](/agentic-ai-workshops/ai-foundation-labs/code-optimization-agent.md), which run as webhook-triggered workflows with no chat window at all.

## Before You Begin

* A Karini AI account, set up by your Karini AI representative
* A short platform orientation with a Karini AI instructor
* Datasets, templates, and credentials prepared by your instructor for each lab

Ready for industry-specific use cases? The [Automotive & Manufacturing](/agentic-ai-workshops/automotive-and-manufacturing.md) labs build on these same patterns with deep agents, knowledge graphs, and live event triggers.
