# Embed an agent introduction

> You're reading the Mindset v3 documentation. v3 is no longer sold; this is reference for existing customers. Mindset 4 docs are at /docs.

Global overview on how to embed an Agent into your website

## Introduction

Mindset AI provides the Chat SDK to embed the AI agent Component into your web application or portal. This documentation provides the technical instructions and important points in order to achieve that..

> **Info:** Before embedding an agent, you need to create the agent and set it up.\
> There are 2 ways to create an agent:
>
> - Through the App administration portal: (see [Creating Agents from the portal](https://docs4.mindset.ai/v3/build-optimize/guides/agents/howto-create-agents))
> - Using the [Agents API](https://docs4.mindset.ai/v3/deploy/api/agents-api)

> **Info:** You may then probably need to create `Contexts` and upload source files (PDF, Video, Doc, ...) called `Context Files`. There are 2 ways to do that:
>
> - Through the App administration portal: (see [Knowledge contexts](https://docs4.mindset.ai/v3/features/build/contexts))
> - Using the [Contexts API](https://docs4.mindset.ai/v3/deploy/api/contexts-api) and [ContextFiles API](https://docs4.mindset.ai/v3/deploy/api/context-files-api)

> **Info:** Finally, you may have to give your agent access to the created `Contexts`, given your own users' and tenants' roles and permissions system.
>
> - Read more about [Agent and Knowledge Context Provisioning](https://docs4.mindset.ai/v3/deploy/sdk3/sdk3-agent-knowledge-context-provisioning)

## Embedding the AI Agent

Regardless of whether your agent uses [authenticated or anonymous access](https://docs4.mindset.ai/v3/features/deploy/Deployment), there is one [**Front-end**](https://docs4.mindset.ai/v3/deploy/sdk3/sdk3-frontend) script to integrate.

In the case that your agent uses the **authenticated access** (default mode), there is an additional [**Back-end authentication**](https://docs4.mindset.ai/v3/deploy/sdk3/sdk3-backend) script to integrate, which is in charge of getting an **authentication token** from the Mindset AI system.

![Embed an agent introduction](https://docs4.mindset.ai/v3/assets/images/embedding-agent-overview.png)

![Embed an agent introduction](https://docs4.mindset.ai/v3/assets/images/embedding-agent-overview.png)

In the case that your agent uses **anonymous access**, there is no need for any back-end script, but you will have to whitelist URLs in your Agent Management Studio.
